Interface Variable
-
- All Known Implementing Classes:
VariableArray,VariableBase,VariableBoolean,VariableConfiguration,VariableConfigurationNode,VariableConnectionName,VariableDict,VariableFloat,VariableInt,VariableQueryArg,VariableResult,VariableString,VariableURL
public interface VariableThis interface represents a variable within the ManifoldCF script engine. A variable may have a value, and may have various named properties, as described below.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTRIBUTE_BOOLEANConversion to booleanstatic java.lang.StringATTRIBUTE_CREATEDSTATUSCREATED status attributestatic java.lang.StringATTRIBUTE_DICTDict attributestatic java.lang.StringATTRIBUTE_FLOATConversion to floatstatic java.lang.StringATTRIBUTE_INTConversion to intstatic java.lang.StringATTRIBUTE_NOTFOUNDSTATUSNOTFOUND status attributestatic java.lang.StringATTRIBUTE_OKSTATUSOK status attributestatic java.lang.StringATTRIBUTE_SCRIPTScript valuestatic java.lang.StringATTRIBUTE_SIZESize attributestatic java.lang.StringATTRIBUTE_STRINGConversion to stringstatic java.lang.StringATTRIBUTE_TYPEName attributestatic java.lang.StringATTRIBUTE_UNAUTHORIZEDSTATUSUNAUTHORIZED status attributestatic java.lang.StringATTRIBUTE_VALUEValue attribute
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VariableReferenceampersand(Variable v)VariableReferenceasterisk(Variable v)VariableReferencedoubleAmpersand(Variable v)VariableReferencedoubleEquals(Variable v)VariableReferencedoublePipe(Variable v)VariableReferenceexclamationEquals(Variable v)VariableReferencegetAttribute(java.lang.String attributeName)Get a named attribute of the variable; e.g.booleangetBooleanValue()Get the variable's value as a booleanConfigurationNodegetConfigurationNodeValue()Get the variable's value as a ConfigurationNode objectConfigurationgetConfigurationValue()Get the variable's value as a Configuration objectdoublegetDoubleValue()Get the variable's value as a doubleVariableReferencegetIndexed(Variable index)Get an indexed property of the variableintgetIntValue()Get the variable's value as an integerjava.lang.StringgetQueryArgumentValue()Get the variable's value as a properly-encoded query argumentjava.lang.StringgetScriptValue()Get the variable's script valuejava.lang.StringgetStringValue()Get the variable's value as a stringjava.lang.StringgetURLPathValue()Get the variable's value as a URL path componentVariableReferencegreaterAngle(Variable v)VariableReferencegreaterAngleEquals(Variable v)booleanhasBooleanValue()Check if the variable has a boolean valuebooleanhasConfigurationNodeValue()Check if the variable has a ConfigurationNode valuebooleanhasConfigurationValue()Check if the variable has a Configuration valuebooleanhasDoubleValue()Check if the variable has a double valuebooleanhasIntValue()Check if the variable has an int valuebooleanhasQueryArgumentValue()Check if the variable has a query argument valuebooleanhasScriptValue()Check if the variable has a script valuebooleanhasStringValue()Check if the variable has a string valuebooleanhasURLPathValue()Check if the variable has a URL path valuevoidinsertAt(Variable v, Variable index)Insert an object into this variable at a position.VariableReferencelesserAngle(Variable v)VariableReferencelesserAngleEquals(Variable v)VariableReferenceminus(Variable v)VariableReferencepipe(Variable v)VariableReferenceplus(Variable v)voidremoveAt(Variable index)Delete an object from this variable at a position.VariableReferenceslash(Variable v)VariableReferenceunaryExclamation()VariableReferenceunaryMinus()
-
-
-
Field Detail
-
ATTRIBUTE_STRING
static final java.lang.String ATTRIBUTE_STRING
Conversion to string- See Also:
- Constant Field Values
-
ATTRIBUTE_INT
static final java.lang.String ATTRIBUTE_INT
Conversion to int- See Also:
- Constant Field Values
-
ATTRIBUTE_FLOAT
static final java.lang.String ATTRIBUTE_FLOAT
Conversion to float- See Also:
- Constant Field Values
-
ATTRIBUTE_BOOLEAN
static final java.lang.String ATTRIBUTE_BOOLEAN
Conversion to boolean- See Also:
- Constant Field Values
-
ATTRIBUTE_SCRIPT
static final java.lang.String ATTRIBUTE_SCRIPT
Script value- See Also:
- Constant Field Values
-
ATTRIBUTE_TYPE
static final java.lang.String ATTRIBUTE_TYPE
Name attribute- See Also:
- Constant Field Values
-
ATTRIBUTE_VALUE
static final java.lang.String ATTRIBUTE_VALUE
Value attribute- See Also:
- Constant Field Values
-
ATTRIBUTE_SIZE
static final java.lang.String ATTRIBUTE_SIZE
Size attribute- See Also:
- Constant Field Values
-
ATTRIBUTE_DICT
static final java.lang.String ATTRIBUTE_DICT
Dict attribute- See Also:
- Constant Field Values
-
ATTRIBUTE_OKSTATUS
static final java.lang.String ATTRIBUTE_OKSTATUS
OK status attribute- See Also:
- Constant Field Values
-
ATTRIBUTE_NOTFOUNDSTATUS
static final java.lang.String ATTRIBUTE_NOTFOUNDSTATUS
NOTFOUND status attribute- See Also:
- Constant Field Values
-
ATTRIBUTE_CREATEDSTATUS
static final java.lang.String ATTRIBUTE_CREATEDSTATUS
CREATED status attribute- See Also:
- Constant Field Values
-
ATTRIBUTE_UNAUTHORIZEDSTATUS
static final java.lang.String ATTRIBUTE_UNAUTHORIZEDSTATUS
UNAUTHORIZED status attribute- See Also:
- Constant Field Values
-
-
Method Detail
-
hasStringValue
boolean hasStringValue() throws ScriptExceptionCheck if the variable has a string value- Throws:
ScriptException
-
getStringValue
java.lang.String getStringValue() throws ScriptExceptionGet the variable's value as a string- Throws:
ScriptException
-
hasScriptValue
boolean hasScriptValue() throws ScriptExceptionCheck if the variable has a script value- Throws:
ScriptException
-
getScriptValue
java.lang.String getScriptValue() throws ScriptExceptionGet the variable's script value- Throws:
ScriptException
-
hasConfigurationValue
boolean hasConfigurationValue() throws ScriptExceptionCheck if the variable has a Configuration value- Throws:
ScriptException
-
getConfigurationValue
Configuration getConfigurationValue() throws ScriptException
Get the variable's value as a Configuration object- Throws:
ScriptException
-
hasConfigurationNodeValue
boolean hasConfigurationNodeValue() throws ScriptExceptionCheck if the variable has a ConfigurationNode value- Throws:
ScriptException
-
getConfigurationNodeValue
ConfigurationNode getConfigurationNodeValue() throws ScriptException
Get the variable's value as a ConfigurationNode object- Throws:
ScriptException
-
hasBooleanValue
boolean hasBooleanValue() throws ScriptExceptionCheck if the variable has a boolean value- Throws:
ScriptException
-
getBooleanValue
boolean getBooleanValue() throws ScriptExceptionGet the variable's value as a boolean- Throws:
ScriptException
-
hasIntValue
boolean hasIntValue() throws ScriptExceptionCheck if the variable has an int value- Throws:
ScriptException
-
getIntValue
int getIntValue() throws ScriptExceptionGet the variable's value as an integer- Throws:
ScriptException
-
hasDoubleValue
boolean hasDoubleValue() throws ScriptExceptionCheck if the variable has a double value- Throws:
ScriptException
-
getDoubleValue
double getDoubleValue() throws ScriptExceptionGet the variable's value as a double- Throws:
ScriptException
-
hasQueryArgumentValue
boolean hasQueryArgumentValue() throws ScriptExceptionCheck if the variable has a query argument value- Throws:
ScriptException
-
getQueryArgumentValue
java.lang.String getQueryArgumentValue() throws ScriptExceptionGet the variable's value as a properly-encoded query argument- Throws:
ScriptException
-
hasURLPathValue
boolean hasURLPathValue() throws ScriptExceptionCheck if the variable has a URL path value- Throws:
ScriptException
-
getURLPathValue
java.lang.String getURLPathValue() throws ScriptExceptionGet the variable's value as a URL path component- Throws:
ScriptException
-
plus
VariableReference plus(Variable v) throws ScriptException
- Throws:
ScriptException
-
minus
VariableReference minus(Variable v) throws ScriptException
- Throws:
ScriptException
-
asterisk
VariableReference asterisk(Variable v) throws ScriptException
- Throws:
ScriptException
-
slash
VariableReference slash(Variable v) throws ScriptException
- Throws:
ScriptException
-
unaryMinus
VariableReference unaryMinus() throws ScriptException
- Throws:
ScriptException
-
greaterAngle
VariableReference greaterAngle(Variable v) throws ScriptException
- Throws:
ScriptException
-
lesserAngle
VariableReference lesserAngle(Variable v) throws ScriptException
- Throws:
ScriptException
-
doubleEquals
VariableReference doubleEquals(Variable v) throws ScriptException
- Throws:
ScriptException
-
greaterAngleEquals
VariableReference greaterAngleEquals(Variable v) throws ScriptException
- Throws:
ScriptException
-
lesserAngleEquals
VariableReference lesserAngleEquals(Variable v) throws ScriptException
- Throws:
ScriptException
-
exclamationEquals
VariableReference exclamationEquals(Variable v) throws ScriptException
- Throws:
ScriptException
-
ampersand
VariableReference ampersand(Variable v) throws ScriptException
- Throws:
ScriptException
-
pipe
VariableReference pipe(Variable v) throws ScriptException
- Throws:
ScriptException
-
doubleAmpersand
VariableReference doubleAmpersand(Variable v) throws ScriptException
- Throws:
ScriptException
-
doublePipe
VariableReference doublePipe(Variable v) throws ScriptException
- Throws:
ScriptException
-
unaryExclamation
VariableReference unaryExclamation() throws ScriptException
- Throws:
ScriptException
-
getAttribute
VariableReference getAttribute(java.lang.String attributeName) throws ScriptException
Get a named attribute of the variable; e.g. xxx.yyy- Throws:
ScriptException
-
insertAt
void insertAt(Variable v, Variable index) throws ScriptException
Insert an object into this variable at a position. Use null to insert at end.- Throws:
ScriptException
-
removeAt
void removeAt(Variable index) throws ScriptException
Delete an object from this variable at a position.- Throws:
ScriptException
-
getIndexed
VariableReference getIndexed(Variable index) throws ScriptException
Get an indexed property of the variable- Throws:
ScriptException
-
-