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 VariableConfigurationresultprotected intresultCode-
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 VariableReferencegetAttribute(java.lang.String attributeName)Get a named attribute of the variable; e.g.intgetIntValue()Get the variable's value as an integerjava.lang.StringgetScriptValue()Get the variable's script valuebooleanhasIntValue()Check if the variable has an int valuebooleanhasScriptValue()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 ScriptExceptionCheck if the variable has a script value- Specified by:
hasScriptValuein interfaceVariable- Overrides:
hasScriptValuein classVariableBase- Throws:
ScriptException
-
hasIntValue
public boolean hasIntValue() throws ScriptExceptionCheck if the variable has an int value- Specified by:
hasIntValuein interfaceVariable- Overrides:
hasIntValuein classVariableBase- Throws:
ScriptException
-
getScriptValue
public java.lang.String getScriptValue() throws ScriptExceptionGet the variable's script value- Specified by:
getScriptValuein interfaceVariable- Overrides:
getScriptValuein classVariableBase- Throws:
ScriptException
-
getIntValue
public int getIntValue() throws ScriptExceptionGet the variable's value as an integer- Specified by:
getIntValuein interfaceVariable- Overrides:
getIntValuein 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:
getAttributein interfaceVariable- Overrides:
getAttributein classVariableBase- Throws:
ScriptException
-
-