Package io.ultreia.java4all.i18n.spi
Class I18nTemplateDefinition
- java.lang.Object
-
- io.ultreia.java4all.i18n.spi.I18nCoordinate
-
- io.ultreia.java4all.i18n.spi.I18nResource
-
- io.ultreia.java4all.i18n.spi.I18nLocalizedResource
-
- io.ultreia.java4all.i18n.spi.I18nTemplateDefinition
-
public class I18nTemplateDefinition extends I18nLocalizedResource
Describe a set of templates.Created by tchemit on 04/11/2018.
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_TEMPLATE_SET_EXTENSIONDefault extension of a i18n template file.static StringI18N_CLASS_PATHWhere to store any i18n templates in the class-path.static StringPATHPath where to store templates.-
Fields inherited from class io.ultreia.java4all.i18n.spi.I18nCoordinate
GROUP_ID_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description I18nTemplateDefinition(String packageName, String name, String templateExtension, Locale locale)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<I18nTemplateDefinition>detect(Path directory, String packageName, String templateExtension)static I18nTemplateDefinitiontemplateFromFilename(String packageName, String templateExtension, Path coordinate)static List<I18nTemplateDefinition>templateListFromCoordinate(String templateExtension, String coordinate)static Pathwrite(I18nTemplateDefinition definition, Path directory, Charset encoding, boolean usePackage, String template, boolean override)-
Methods inherited from class io.ultreia.java4all.i18n.spi.I18nLocalizedResource
getLocale, getResourcePath
-
Methods inherited from class io.ultreia.java4all.i18n.spi.I18nResource
getExtension, removeExtension
-
Methods inherited from class io.ultreia.java4all.i18n.spi.I18nCoordinate
getId, getId, getName, getPackageName, getResourcePathPrefix
-
-
-
-
Field Detail
-
DEFAULT_TEMPLATE_SET_EXTENSION
public static final String DEFAULT_TEMPLATE_SET_EXTENSION
Default extension of a i18n template file.- See Also:
- Constant Field Values
-
PATH
public static final String PATH
Path where to store templates.- See Also:
- Constant Field Values
-
I18N_CLASS_PATH
public static final String I18N_CLASS_PATH
Where to store any i18n templates in the class-path.- See Also:
- Constant Field Values
-
-
Method Detail
-
detect
public static List<I18nTemplateDefinition> detect(Path directory, String packageName, String templateExtension) throws I18nResourceInitializationException
-
write
public static Path write(I18nTemplateDefinition definition, Path directory, Charset encoding, boolean usePackage, String template, boolean override) throws IOException
- Throws:
IOException
-
templateListFromCoordinate
public static List<I18nTemplateDefinition> templateListFromCoordinate(String templateExtension, String coordinate)
-
templateFromFilename
public static I18nTemplateDefinition templateFromFilename(String packageName, String templateExtension, Path coordinate)
-
-