Package io.ultreia.java4all.i18n.spi
Class I18nKeySetDefinition
- java.lang.Object
-
- io.ultreia.java4all.i18n.spi.I18nCoordinate
-
- io.ultreia.java4all.i18n.spi.I18nResource
-
- io.ultreia.java4all.i18n.spi.I18nKeySetDefinition
-
public class I18nKeySetDefinition extends I18nResource
Describe a set of i18n keys used by a module.Created by tchemit on 26/10/2018.
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Field Summary
Fields Modifier and Type Field Description static StringI18N_CLASS_PATHWhere to store any i18n key sets in the class-path.static StringKEY_SET_EXTENSIONstatic StringPATHPath where to store key sets.-
Fields inherited from class io.ultreia.java4all.i18n.spi.I18nCoordinate
GROUP_ID_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description I18nKeySetDefinition(I18nCoordinate coordinate)I18nKeySetDefinition(String packageName, String name)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<I18nKeySetDefinition>detect(Path directory, String packageName)static I18nKeySetDefinitionnewKey(String coordinate)static I18nKeySetDefinitionnewKeyFromPath(String packageName, Path coordinate)static Pathwrite(I18nKeySetDefinition definition, Path directory, Charset encoding, boolean usePackage, Set<String> keys)-
Methods inherited from class io.ultreia.java4all.i18n.spi.I18nResource
getExtension, getResourcePath, removeExtension
-
Methods inherited from class io.ultreia.java4all.i18n.spi.I18nCoordinate
getId, getId, getName, getPackageName, getResourcePathPrefix
-
-
-
-
Field Detail
-
PATH
public static final String PATH
Path where to store key sets.- See Also:
- Constant Field Values
-
I18N_CLASS_PATH
public static final String I18N_CLASS_PATH
Where to store any i18n key sets in the class-path.- See Also:
- Constant Field Values
-
KEY_SET_EXTENSION
public static String KEY_SET_EXTENSION
-
-
Constructor Detail
-
I18nKeySetDefinition
public I18nKeySetDefinition(I18nCoordinate coordinate)
-
-
Method Detail
-
newKey
public static I18nKeySetDefinition newKey(String coordinate)
-
newKeyFromPath
public static I18nKeySetDefinition newKeyFromPath(String packageName, Path coordinate)
-
detect
public static List<I18nKeySetDefinition> detect(Path directory, String packageName) throws I18nResourceInitializationException
-
write
public static Path write(I18nKeySetDefinition definition, Path directory, Charset encoding, boolean usePackage, Set<String> keys) throws IOException
- Throws:
IOException
-
-