Class ManifoldCFConfiguration
- java.lang.Object
-
- org.apache.manifoldcf.core.interfaces.Configuration
-
- org.apache.manifoldcf.core.interfaces.ManifoldCFConfiguration
-
- All Implemented Interfaces:
IHierarchyParent
- Direct Known Subclasses:
ManifoldCF.OverrideableManifoldCFConfiguration
public class ManifoldCFConfiguration extends Configuration
This class represents the configuration data read from the main ManifoldCF configuration XML file.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.manifoldcf.core.interfaces.Configuration
Configuration.JSONReader, Configuration.JSONWriter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidstatic java.lang.StringATTRIBUTE_NAMEstatic java.lang.StringATTRIBUTE_VALUEprotected java.util.Map<java.lang.String,java.lang.String>localPropertiesstatic java.lang.StringNODE_PROPERTY-
Fields inherited from class org.apache.manifoldcf.core.interfaces.Configuration
children, JSON_ATTRIBUTE, JSON_CHILDREN, JSON_TYPE, JSON_VALUE, readOnly, rootNodeLabel
-
-
Constructor Summary
Constructors Constructor Description ManifoldCFConfiguration()Constructor.ManifoldCFConfiguration(java.io.InputStream xmlStream)Construct from XML.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConfigurationcreateNew()Create a new object of the appropriate class.voidfromXML(java.io.InputStream is)Read from an input stream.booleangetBooleanProperty(java.lang.String s, boolean defaultValue)Read a boolean propertydoublegetDoubleProperty(java.lang.String s, double defaultValue)Read a float property, either from the system properties, or from the local configuration file.intgetIntProperty(java.lang.String s, int defaultValue)Read an integer property, either from the system properties, or from the local configuration file.longgetLongProperty(java.lang.String s, long defaultValue)Read a long property, either from the system properties, or from the local configuration file.java.lang.StringgetPossiblyObfuscatedStringProperty(java.lang.String s, java.lang.String defaultValue)Read a possibly obfuscated string property, either from the system properties, or from the local configuration file.java.lang.StringgetProperty(java.lang.String s)java.lang.StringgetStringProperty(java.lang.String s, java.lang.String defaultValue)Read a (string) property, either from the system properties, or from the local configuration file.protected voidparseProperties()-
Methods inherited from class org.apache.manifoldcf.core.interfaces.Configuration
addChild, addOuterNode, clearChildren, clearOuterNodes, createDuplicate, createNewNode, equals, findChild, fromJSON, fromXML, getChildCount, hashCode, initializeFromDoc, makeReadOnly, processObject, processObject, readNode, readNode, removeChild, removeOuterNode, toJSON, toString, toXML, writeNode, writeNode
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
NODE_PROPERTY
public static final java.lang.String NODE_PROPERTY
- See Also:
- Constant Field Values
-
ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
ATTRIBUTE_VALUE
public static final java.lang.String ATTRIBUTE_VALUE
- See Also:
- Constant Field Values
-
localProperties
protected final java.util.Map<java.lang.String,java.lang.String> localProperties
-
-
Constructor Detail
-
ManifoldCFConfiguration
public ManifoldCFConfiguration()
Constructor.
-
ManifoldCFConfiguration
public ManifoldCFConfiguration(java.io.InputStream xmlStream) throws ManifoldCFExceptionConstruct from XML.- Parameters:
xmlStream- is the input XML stream.- Throws:
ManifoldCFException
-
-
Method Detail
-
getProperty
public java.lang.String getProperty(java.lang.String s)
-
getStringProperty
public java.lang.String getStringProperty(java.lang.String s, java.lang.String defaultValue)Read a (string) property, either from the system properties, or from the local configuration file.- Parameters:
s- is the property name.defaultValue- is the default value for the property.- Returns:
- the property value, as a string.
-
getPossiblyObfuscatedStringProperty
public java.lang.String getPossiblyObfuscatedStringProperty(java.lang.String s, java.lang.String defaultValue) throws ManifoldCFExceptionRead a possibly obfuscated string property, either from the system properties, or from the local configuration file.- Parameters:
s- is the property name.defaultValue- is the default value for the property.- Returns:
- the property value, as a string.
- Throws:
ManifoldCFException
-
getBooleanProperty
public boolean getBooleanProperty(java.lang.String s, boolean defaultValue) throws ManifoldCFExceptionRead a boolean property- Throws:
ManifoldCFException
-
getIntProperty
public int getIntProperty(java.lang.String s, int defaultValue) throws ManifoldCFExceptionRead an integer property, either from the system properties, or from the local configuration file.- Throws:
ManifoldCFException
-
getLongProperty
public long getLongProperty(java.lang.String s, long defaultValue) throws ManifoldCFExceptionRead a long property, either from the system properties, or from the local configuration file.- Throws:
ManifoldCFException
-
getDoubleProperty
public double getDoubleProperty(java.lang.String s, double defaultValue) throws ManifoldCFExceptionRead a float property, either from the system properties, or from the local configuration file.- Throws:
ManifoldCFException
-
parseProperties
protected void parseProperties() throws ManifoldCFException- Throws:
ManifoldCFException
-
fromXML
public void fromXML(java.io.InputStream is) throws ManifoldCFExceptionRead from an input stream.- Overrides:
fromXMLin classConfiguration- Parameters:
is- is the input XML stream. Does NOT close the stream.- Throws:
ManifoldCFException
-
createNew
protected Configuration createNew()
Create a new object of the appropriate class.- Overrides:
createNewin classConfiguration- Returns:
- the newly-created configuration object.
-
-