Class VariableResult
- java.lang.Object
-
- org.apache.manifoldcf.scriptengine.VariableBase
-
- org.apache.manifoldcf.scriptengine.VariableResult
-
- All Implemented Interfaces:
Variable
,VariableReference
public class VariableResult extends VariableBase
Variable class representing the result of an http operation. This consists of two parts: a result code, and a VariableConfiguration object.
-
-
Field Summary
Fields Modifier and Type Field Description protected VariableConfiguration
result
protected int
resultCode
-
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 VariableResult(int resultCode, java.lang.String json)
-
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.int
getIntValue()
Get the variable's value as an integerjava.lang.String
getScriptValue()
Get the variable's script valueboolean
hasIntValue()
Check if the variable has an int valueboolean
hasScriptValue()
Check if the variable has a script value-
Methods inherited from class org.apache.manifoldcf.scriptengine.VariableBase
ampersand, asterisk, composeMessage, doubleAmpersand, doubleEquals, doublePipe, exclamationEquals, getBooleanValue, getConfigurationNodeValue, getConfigurationValue, getDoubleValue, getIndexed, getQueryArgumentValue, getStringValue, getURLPathValue, greaterAngle, greaterAngleEquals, hasBooleanValue, hasConfigurationNodeValue, hasConfigurationValue, hasDoubleValue, hasQueryArgumentValue, hasStringValue, hasURLPathValue, insertAt, isNull, lesserAngle, lesserAngleEquals, minus, pipe, plus, removeAt, resolve, setReference, slash, unaryExclamation, unaryMinus
-
-
-
-
Field Detail
-
resultCode
protected int resultCode
-
result
protected VariableConfiguration result
-
-
Constructor Detail
-
VariableResult
public VariableResult(int resultCode, 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
-
hasIntValue
public boolean hasIntValue() throws ScriptException
Check if the variable has an int value- Specified by:
hasIntValue
in interfaceVariable
- Overrides:
hasIntValue
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
-
getIntValue
public int getIntValue() throws ScriptException
Get the variable's value as an integer- Specified by:
getIntValue
in interfaceVariable
- Overrides:
getIntValue
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
-
-