Class VariableConfiguration
- java.lang.Object
-
- org.apache.manifoldcf.scriptengine.VariableBase
-
- org.apache.manifoldcf.scriptengine.VariableConfiguration
-
- All Implemented Interfaces:
Variable
,VariableReference
public class VariableConfiguration extends VariableBase
Variable wrapper for Configuration object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
VariableConfiguration.NodeReference
Extend VariableReference class so we capture attempts to set the reference, and actually overwrite the child when that is done
-
Field Summary
Fields Modifier and Type Field Description protected Configuration
configuration
-
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 VariableConfiguration()
VariableConfiguration(java.lang.String json)
VariableConfiguration(Configuration c)
-
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.Configuration
getConfigurationValue()
Get the variable's value as a Configuration objectVariableReference
getIndexed(Variable index)
Get an indexed property of the variablejava.lang.String
getScriptValue()
Get the variable's script valueboolean
hasConfigurationValue()
Check if the variable has a Configuration valueboolean
hasScriptValue()
Check if the variable has a script 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, getConfigurationNodeValue, getDoubleValue, getIntValue, getQueryArgumentValue, getStringValue, getURLPathValue, greaterAngle, greaterAngleEquals, hasBooleanValue, hasConfigurationNodeValue, hasDoubleValue, hasIntValue, hasQueryArgumentValue, hasStringValue, hasURLPathValue, isNull, lesserAngle, lesserAngleEquals, minus, pipe, resolve, setReference, slash, unaryExclamation, unaryMinus
-
-
-
-
Field Detail
-
configuration
protected Configuration configuration
-
-
Constructor Detail
-
VariableConfiguration
public VariableConfiguration()
-
VariableConfiguration
public VariableConfiguration(Configuration c)
-
VariableConfiguration
public VariableConfiguration(java.lang.String json) throws ScriptException
- Throws:
ScriptException
-
-
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
-
hasConfigurationValue
public boolean hasConfigurationValue() throws ScriptException
Check if the variable has a Configuration value- Specified by:
hasConfigurationValue
in interfaceVariable
- Overrides:
hasConfigurationValue
in classVariableBase
- Throws:
ScriptException
-
getConfigurationValue
public Configuration getConfigurationValue() throws ScriptException
Get the variable's value as a Configuration object- Specified by:
getConfigurationValue
in interfaceVariable
- Overrides:
getConfigurationValue
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
-
-