Class VariableConfigurationNode
- java.lang.Object
-
- org.apache.manifoldcf.scriptengine.VariableBase
-
- org.apache.manifoldcf.scriptengine.VariableConfigurationNode
-
- All Implemented Interfaces:
Variable
,VariableReference
public class VariableConfigurationNode extends VariableBase
Variable wrapper for ConfigurationNode object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
VariableConfigurationNode.AttributeReference
Implement VariableReference to allow attributes to be set or clearedprotected class
VariableConfigurationNode.NodeReference
Extend VariableReference class so we capture attempts to set the reference, and actually overwrite the child when that is doneprotected class
VariableConfigurationNode.ValueReference
Implement VariableReference to allow values to be set or cleared
-
Field Summary
Fields Modifier and Type Field Description protected ConfigurationNode
configurationNode
-
Fields inherited from interface org.apache.manifoldcf.scriptengine.Variable
ATTRIBUTE_BOOLEAN, ATTRIBUTE_CREATEDSTATUS, ATTRIBUTE_DICT, ATTRIBUTE_FLOAT, ATTRIBUTE_INT, ATTRIBUTE_NOTFOUNDSTATUS, ATTRIBUTE_OKSTATUS, ATTRIBUTE_SCRIPT, ATTRIBUTE_SIZE, ATTRIBUTE_STRING, ATTRIBUTE_TYPE, ATTRIBUTE_UNAUTHORIZEDSTATUS, ATTRIBUTE_VALUE
-
-
Constructor Summary
Constructors Constructor Description VariableConfigurationNode(java.lang.String name)
VariableConfigurationNode(ConfigurationNode node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VariableReference
getAttribute(java.lang.String attributeName)
Get a named attribute of the variable; e.g.ConfigurationNode
getConfigurationNodeValue()
Get the variable's value as a ConfigurationNode objectVariableReference
getIndexed(Variable index)
Get an indexed property of the variablejava.lang.String
getScriptValue()
Get the variable's script valuejava.lang.String
getStringValue()
Convert to a valueboolean
hasScriptValue()
Check if the variable has a script valueboolean
hasStringValue()
Check if the variable has a string valuevoid
insertAt(Variable v, Variable index)
Insert an object into this variable at a position.VariableReference
plus(Variable v)
void
removeAt(Variable index)
Delete an object from this variable at a position.-
Methods inherited from class org.apache.manifoldcf.scriptengine.VariableBase
ampersand, asterisk, composeMessage, doubleAmpersand, doubleEquals, doublePipe, exclamationEquals, getBooleanValue, getConfigurationValue, getDoubleValue, getIntValue, getQueryArgumentValue, getURLPathValue, greaterAngle, greaterAngleEquals, hasBooleanValue, hasConfigurationNodeValue, hasConfigurationValue, hasDoubleValue, hasIntValue, hasQueryArgumentValue, hasURLPathValue, isNull, lesserAngle, lesserAngleEquals, minus, pipe, resolve, setReference, slash, unaryExclamation, unaryMinus
-
-
-
-
Field Detail
-
configurationNode
protected ConfigurationNode configurationNode
-
-
Constructor Detail
-
VariableConfigurationNode
public VariableConfigurationNode(java.lang.String name)
-
VariableConfigurationNode
public VariableConfigurationNode(ConfigurationNode node)
-
-
Method Detail
-
hasScriptValue
public boolean hasScriptValue() throws ScriptException
Check if the variable has a script value- Specified by:
hasScriptValue
in interfaceVariable
- Overrides:
hasScriptValue
in classVariableBase
- Throws:
ScriptException
-
getScriptValue
public java.lang.String getScriptValue() throws ScriptException
Get the variable's script value- Specified by:
getScriptValue
in interfaceVariable
- Overrides:
getScriptValue
in classVariableBase
- Throws:
ScriptException
-
hasStringValue
public boolean hasStringValue() throws ScriptException
Check if the variable has a string value- Specified by:
hasStringValue
in interfaceVariable
- Overrides:
hasStringValue
in classVariableBase
- Throws:
ScriptException
-
getStringValue
public java.lang.String getStringValue() throws ScriptException
Convert to a value- Specified by:
getStringValue
in interfaceVariable
- Overrides:
getStringValue
in classVariableBase
- Throws:
ScriptException
-
getConfigurationNodeValue
public ConfigurationNode getConfigurationNodeValue() throws ScriptException
Get the variable's value as a ConfigurationNode object- Specified by:
getConfigurationNodeValue
in interfaceVariable
- Overrides:
getConfigurationNodeValue
in classVariableBase
- Throws:
ScriptException
-
getAttribute
public VariableReference getAttribute(java.lang.String attributeName) throws ScriptException
Get a named attribute of the variable; e.g. xxx.yyy- Specified by:
getAttribute
in interfaceVariable
- Overrides:
getAttribute
in classVariableBase
- Throws:
ScriptException
-
getIndexed
public VariableReference getIndexed(Variable index) throws ScriptException
Get an indexed property of the variable- Specified by:
getIndexed
in interfaceVariable
- Overrides:
getIndexed
in classVariableBase
- Throws:
ScriptException
-
insertAt
public void insertAt(Variable v, Variable index) throws ScriptException
Insert an object into this variable at a position.- Specified by:
insertAt
in interfaceVariable
- Overrides:
insertAt
in classVariableBase
- Throws:
ScriptException
-
removeAt
public void removeAt(Variable index) throws ScriptException
Delete an object from this variable at a position.- Specified by:
removeAt
in interfaceVariable
- Overrides:
removeAt
in classVariableBase
- Throws:
ScriptException
-
plus
public VariableReference plus(Variable v) throws ScriptException
- Specified by:
plus
in interfaceVariable
- Overrides:
plus
in classVariableBase
- Throws:
ScriptException
-
-