public abstract class AbstractFileSet extends Object
Mojo configuration class
describing a set of files.| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
addComment
Whether or not to add a comment header to the files when exporting them
from Crowdin.
|
protected Charset |
charset
For internal use.
|
protected String |
comment
The custom comment header to add to translation files when exporting them
from Crowdin if
addComment is true. |
protected List<Conversion> |
conversions
A list of
Conversion elements to apply to the
translation file names. |
protected String |
encoding
The encoding to use when deploying the translation files.
|
protected Boolean |
escapeUnicode
Whether or not to encode Unicode characters in the form "\uxxxx" when
exporting files from Crowdin.
|
protected String |
lineSeparator
The string to use as line separator when exporting files from Crowdin.
|
protected Boolean |
sortLines
Whether or not the language strings should be sorted by their key in the
translation files when exporting them from Crowdin.
|
protected FileType |
type
The
FileType for this fileset. |
| Constructor and Description |
|---|
AbstractFileSet() |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getAddComment() |
Charset |
getCharset() |
String |
getComment() |
List<Conversion> |
getConversions() |
String |
getEncoding() |
Boolean |
getEscapeUnicode() |
String |
getLineSeparator() |
Boolean |
getSortLines() |
FileType |
getType() |
static void |
initialize(List<? extends AbstractFileSet> fileSets)
Since the constructor is called automagically by Maven, verification and
initialization of defaults is done here.
|
protected void |
initializeInstance()
Since the constructor is called automagically by Maven, verification and
initialization of defaults is done here.
|
void |
setCharset(Charset charset) |
void |
setEncoding(String encoding) |
void |
setType(FileType type) |
@Nullable protected String encoding
Charset name, or the special value
"Properties". Encoding is often determined by type and
only need to be explicitly set to deviate from the default.
The "Properties" maps to StandardCharsets.ISO_8859_1.
Together with escapeUnicode == true, any characters that
don't exist in ISO 8859-1 will be encoded as \u<xxxx> where
<xxxx> is the hexadecimal Unicode value.
@Nullable protected Boolean sortLines
Properties files. Defaults to true if encoding is
"Properties", false otherwise.@Nullable protected Boolean addComment
@Nullable protected String comment
addComment is true. If not configured, a
generic "do not modify" comment will be added.@Nullable protected String lineSeparator
@Nullable protected Boolean escapeUnicode
FileType.properties file sets.@Nullable protected FileType type
FileType for this fileset. If not specified,
auto-detection will be attempted with fall-back to
FileType.auto.@Nullable protected List<Conversion> conversions
Conversion elements to apply to the
translation file names.@Nullable public String getEncoding()
null if not set.public void setEncoding(String encoding)
encoding - the character encoding to convert translation files to
when exporting them from Crowdin or null to use the
default.@Nullable public Charset getCharset()
null to use the default.public void setCharset(@Nullable Charset charset)
charset - the Charset to convert translation files to when
exporting them from Crowdin or null to use the
default.@Nullable public Boolean getSortLines()
true if lines should be sorted when exporting files from
Crowdin, false otherwise.@Nullable public Boolean getAddComment()
true if a comment should be added at the top of the
translated files when exporting them from Crowdin, false
if it should not or null if not specified.@Nullable public String getComment()
null if the default
should be used.@Nullable public String getLineSeparator()
String to use as line separator when exporting files
from Crowdin or null to use the default.@Nullable public Boolean getEscapeUnicode()
FileType.properties files when exporting them from
Crowdin, or null if not set.@Nullable public List<Conversion> getConversions()
List of Conversions.public static void initialize(@Nullable List<? extends AbstractFileSet> fileSets) throws org.apache.maven.plugin.MojoExecutionException
fileSets - the List of file sets to initialize.org.apache.maven.plugin.MojoExecutionException - If the initialization fails.protected void initializeInstance()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - If the initialization fails.Copyright © 2024. All rights reserved.