Package org.apache.maven.doxia.module.fo
Class FoConfiguration
java.lang.Object
org.apache.maven.doxia.module.fo.FoConfiguration
A utility class to construct FO configuration parameters.
- Since:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MutableAttributeSet
Holds the single attributes.private final org.apache.commons.configuration2.XMLConfiguration
The configuration instance.private List
<?> The list of attribute sets. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addAttributes
(String attributeId) Adds an attribute to the current StringBuilder.getAttributeSet
(String attributeId) Builds a set of attributes.getAttributeString
(String attributeId) Builds a list of attributes.void
Load configuration parameters from a File.private void
Load the default fo configuration file.private void
reset()
(Re-)initialize the AttributeSet.
-
Field Details
-
attributeSet
Holds the single attributes. -
config
private final org.apache.commons.configuration2.XMLConfiguration configThe configuration instance. -
sets
The list of attribute sets.
-
-
Constructor Details
-
FoConfiguration
public FoConfiguration()Constructor.
-
-
Method Details
-
load
Load configuration parameters from a File.- Parameters:
configFile
- the configuration file.- Throws:
IOException
- if the File cannot be read or some error occurs when initializing the configuration parameters.- Since:
- 1.1.1
-
getAttributeString
Builds a list of attributes.- Parameters:
attributeId
- A unique id to identify the set of attributes. This should correspond to the name of an attribute-set defined in the configuration file.- Returns:
- A string that contains a list of attributes with the values configured for the current builder. Returns the empty string if attributeId is null or if attributeId is not a valid identifier.
-
getAttributeSet
Builds a set of attributes.- Parameters:
attributeId
- A unique id to identify the set of attributes. This should correspond to the name of an attribute-set defined in the configuration file.- Returns:
- A MutableAttributeSet that contains the attributes with the values configured for the current builder. Returns null if attributeId is null or empty, or if attributeId is not a valid identifier.
-
addAttributes
Adds an attribute to the current StringBuilder.- Parameters:
attributeId
- A unique id to identify the set of attributes. This should correspond to the name of an attribute-set defined in the configuration file.
-
loadDefaultConfig
private void loadDefaultConfig()Load the default fo configuration file. -
reset
private void reset()(Re-)initialize the AttributeSet.
-