Package net.simplace.core.customize
Class AbstractXMLConfiguration
java.lang.Object
net.simplace.core.customize.AbstractXMLConfiguration
Abstract config file with important functions for parsing and writing Data to ASCII Configfiles
- Author:
- Andreas Enders
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.jdom2.Elementprotected org.jdom2.Documentprotected File -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractXMLConfiguration(File aConfigFile, org.jdom2.Element aConfiguration) AbstractXMLConfiguration(File aConfigFile, org.jdom2.Element aConfiguration, Map<String, Object> aParameterMap) -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()if is setModified() new Values will be written to config file.protected abstract voidhas to be implemented by FileFieldsonly if set modified values will be writtenprotected abstract voidhas to be implemented by FileFieldsprotected StringvoidreplaceParametersFromMap(Map<String, Object> aParamMap) voidonly if set modified values will be writtenvoidonly if set modified values will be writtentoString()protected voidwriteValue(String aValue, int aLineNumber, int aBeginColumnNumber, int aEndColumnNumber)
-
Field Details
-
iDocument
protected org.jdom2.Document iDocument -
iFile
-
iConfiguration
protected org.jdom2.Element iConfiguration
-
-
Constructor Details
-
AbstractXMLConfiguration
- Parameters:
aConfigFile-aConfiguration-
-
AbstractXMLConfiguration
public AbstractXMLConfiguration(File aConfigFile, org.jdom2.Element aConfiguration, Map<String, Object> aParameterMap) - Parameters:
aConfigFile-aConfiguration-aParameterMap-
-
AbstractXMLConfiguration
protected AbstractXMLConfiguration()
-
-
Method Details
-
initializeFileValues
protected abstract void initializeFileValues()has to be implemented by FileFields -
commitValues
protected abstract void commitValues()has to be implemented by FileFields -
commit
public void commit()if is setModified() new Values will be written to config file. -
readValue
-
writeValue
protected void writeValue(String aValue, int aLineNumber, int aBeginColumnNumber, int aEndColumnNumber) -
replaceParametersFromMap
- Parameters:
aParamMap-
-
getConfigurationParmeterValue
only if set modified values will be written- Parameters:
aKey-- Returns:
-
setModified
public void setModified()only if set modified values will be written -
setUnModified
public void setUnModified()only if set modified values will be written -
toString
-