# Java Documentation

## com.tomorrowx.core.rules.base Class Rule <a href="#toc323288332" id="toc323288332"></a>

```
java.lang.Object
    -> com.tomorrowx.core.rules.base.Rule
```

> public abstract class **Rule**
>
> extends java.lang.Object

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Field Summary</strong></td><td></td></tr><tr><td>static int</td><td><strong>PERFLEVEL_ALL</strong><br>Performance monitoring for transactions and timing, individual URI performance and connection pools</td></tr><tr><td>static int</td><td><strong>PERFLEVEL_TIMING</strong><br>Performance monitoring for both transactions and timing</td></tr><tr><td>static int</td><td><strong>PERFLEVEL_TRANSACTIONS</strong><br>Performance monitoring for transactions only</td></tr><tr><td>static int</td><td><strong>PERFLEVEL_UNKNOWN</strong><br>Performance monitoring is not set</td></tr><tr><td>static int</td><td><strong>PERFLEVEL_URI</strong><br>Performance monitoring for transactions and timing and individual URI performance</td></tr><tr><td>static int</td><td><strong>RUNTYPE_DEBUG_OFF</strong><br>Bit mask to disable debug messages (console alerts)</td></tr><tr><td>static int</td><td><strong>RUNTYPE_NORMAL</strong><br>Bit mask for running in normal mode</td></tr><tr><td>static int</td><td><strong>RUNTYPE_SEND_ALERTS</strong><br>Bit mask for allowing sending of alerts</td></tr><tr><td>static int</td><td><strong>RUNTYPE_WRITE_CASES</strong><br>Bit mask for writing cases into case managers</td></tr><tr><td>static int</td><td><strong>RUNTYPE_WRITE_DATA</strong><br>Bit mask for allowing write of data</td></tr><tr><td>static int</td><td><strong>VAR_NUMBER</strong><br>The data provided is a number</td></tr><tr><td>static int</td><td><strong>VAR_STRING</strong><br>The data provided is a string</td></tr><tr><td>static int</td><td><strong>VAR_VARIABLE</strong><br>The data provided is a variable</td></tr></tbody></table>

| **Constructor Summary** |   |
| ----------------------- | - |
| **Rule**()              |   |

<table data-header-hidden><thead><tr><th width="243"></th><th></th></tr></thead><tbody><tr><td><strong>Method Summary</strong></td><td></td></tr><tr><td>void</td><td><strong>addMonitoredFile</strong>(java.io.File file)<br>Add a file to be monitored by the rule.</td></tr><tr><td>void</td><td><strong>addPerformanceData</strong>(java.lang.StringBuffer data, java.lang.String ruleSet)<br>Get the performance data for the currently running <code class="expression">space.vars.X_Agent_Name_Single</code> and add it to the provided StringBuffer as well-formed XML Note: This approach is not synchronized and can suffer from inaccuracies on a busy system</td></tr><tr><td>void</td><td><strong>addTransaction</strong>()<br>Increment transaction count</td></tr><tr><td>void</td><td><strong>addTransactionTime</strong>(long time)<br>Increment inline timings</td></tr><tr><td>com.tomorrowx.core.rules.base.VariableAttributeObject</td><td><strong>chainAll</strong>(com.tomorrowx.core.rules.base.VariableAttributeObject vao, <strong>Rule</strong> source)<br>Chain through to all the chain points in sequence</td></tr><tr><td>com.tomorrowx.core.rules.base.VariableAttributeObject</td><td><strong>chainTo</strong>(java.lang.String name, com.tomorrowx.core.rules.base.VariableAttributeObject vao, <strong>Rule</strong> source)<br>Chain through to a chain point</td></tr><tr><td>abstract void</td><td><strong>cleanup</strong>()<br>Clean up any allocated resources before shutting down</td></tr><tr><td>com.tomorrowx.core.rules.base.VariableAttributeObject</td><td><strong>execute</strong>(com.tomorrowx.core.rules.base.VariableAttributeObject vao, com.tomorrowx.core.rules.base.ChainPoint source)<br>Wrap the processing of the rule and its performance testing, exception handling This method is for the <code class="expression">space.vars.X_Agent_Name_Single</code> only and should not be called directly</td></tr><tr><td>java.lang.String</td><td><strong>getConfigurationSetting</strong>(java.lang.String key)<br>Return a configuration setting for the <code class="expression">space.vars.X_Agent_Name_Single</code>.</td></tr><tr><td>java.lang.String</td><td><strong>getCredentialsValue</strong>(java.lang.String key, java.lang.String field)<br>Obtain the value for a given credential key and field</td></tr><tr><td>java.lang.String</td><td><strong>getId</strong>()<br>Get the ID of this rule</td></tr><tr><td>java.lang.String</td><td><strong>getLabel</strong>()<br>Get the text label for this rule</td></tr><tr><td>java.util.Hashtable</td><td><strong>getProperties</strong>()<br>Get the specific properties of this rule to show for maintenance</td></tr><tr><td>java.util.Hashtable</td><td><strong>getRuleChainPoints</strong>()<br>Get a list of points into which this rule can chain</td></tr><tr><td>com.tomorrowx.core.rules.base.RuleSet</td><td><strong>getRuleSet</strong>()<br>Get the parent rule set for this rule</td></tr><tr><td>java.lang.String</td><td><strong>getRuntimeValue</strong>(com.tomorrowx.core.rules.base.VariableAttributeObject vao, java.lang.String value)<br>Resolve the runtime value of a given parameter, based on the string supplied to it</td></tr><tr><td>java.lang.String</td><td><strong>getRuntimeValue</strong>(com.tomorrowx.core.rules.base.VariableAttributeObject vao, java.lang.String value, int maxLength)<br>Resolve the runtime value of a given parameter, based on the string supplied to it</td></tr><tr><td>int</td><td><strong>getRunType</strong>()<br>Obtain the run-type for this rule as defined by the RUNTYPE constants</td></tr><tr><td>long</td><td><strong>getTransactions</strong>()<br>Get the transaction count for this rule</td></tr><tr><td>java.lang.String</td><td><strong>getValueString</strong>(java.lang.String value)<br>Resolve the string value type of a provided value parameter, removing any quote characters</td></tr><tr><td>int</td><td><strong>getValueType</strong>(java.lang.String value)<br>Detect what kind of value has been passed as a parameter.</td></tr><tr><td>abstract void</td><td><strong>initialize</strong>()<br>Initialize the internal state of the rule, based on the set properties</td></tr><tr><td>boolean</td><td><strong>isChainPointAddAllowed</strong>()<br>Are new (custom) chain points allowed</td></tr><tr><td>void</td><td><strong>log</strong>(int level, java.lang.String message, java.lang.Throwable exception)<br>Use this method to log rule exceptions to any installed LogAdapter.</td></tr><tr><td>void</td><td><strong>log</strong>(int level, java.lang.String message, java.lang.Throwable exception, <strong>Rule</strong> rule, com.tomorrowx.core.rules.base.VariableAttributeObject vao)<br>Use this method to log rule exceptions to any installed LogAdapter.</td></tr><tr><td>void</td><td><strong>materializeRule</strong>(com.tomorrowx.core.rules.base.RuleSet ruleSet)<br>Prepare this rule to be executable (connect all chain points to their rules)</td></tr><tr><td>abstract com.tomorrowx.core.rules.base.VariableAttributeObject</td><td><strong>processRule</strong>(com.tomorrowx.core.rules.base.VariableAttributeObject vao, com.tomorrowx.core.rules.base.ChainPoint source)<br>Process the rule to the depth of all connected subrules.</td></tr><tr><td>void</td><td><strong>removeFileMonitor</strong>()<br>Removes all file monitors for this rule</td></tr><tr><td>java.lang.String</td><td><strong>renderMessage</strong>(java.lang.String errorCode, java.lang.String[] parms)<br>Record the fact on the console that a warning was detected.</td></tr><tr><td>void</td><td><strong>setError</strong>(java.lang.String errorCode, java.lang.String[] parms)<br>Record the fact that an error has occured.</td></tr><tr><td>void</td><td><strong>setId</strong>(java.lang.String id)<br>Set the ID of this rule</td></tr><tr><td>void</td><td><strong>setLabel</strong>(java.lang.String label)<br>Set the text label for this rule</td></tr><tr><td>void</td><td><strong>setProperties</strong>(java.util.Hashtable properties)<br>Set rule specific properties</td></tr><tr><td>void</td><td><strong>setRuleChainPoint</strong>(java.lang.String chainPointId, com.tomorrowx.core.rules.base.ChainPoint chainPoint)<br>Attach a rule to a chain point</td></tr><tr><td>void</td><td><strong>setRuleSet</strong>(com.tomorrowx.core.rules.base.RuleSet ruleSet)<br>Set the parent rule set for this rule</td></tr><tr><td>void</td><td><strong>setRunType</strong>(int runType)<br>Set the run-type for this rule</td></tr><tr><td>void</td><td><strong>setTransactions</strong>(long transactions)<br>Set the transaction count for this rule</td></tr><tr><td>void</td><td><strong>setWarning</strong>(java.lang.String errorCode, java.lang.String[] parms)<br>Record the fact on the console that a warning was detected.</td></tr><tr><td>void</td><td><strong>writeConsole</strong>(java.lang.String message)<br>Send a message to the console</td></tr></tbody></table>

| **Methods inherited from class java.lang.Object**                         |
| ------------------------------------------------------------------------- |
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |

### RUNTYPE\_NORMAL <a href="#toc323288333" id="toc323288333"></a>

public static final int **RUNTYPE\_NORMAL**

Bit mask for running in normal mode

**See Also:**

Constant Field Values

### RUNTYPE\_WRITE\_DATA <a href="#toc323288334" id="toc323288334"></a>

public static final int **RUNTYPE\_WRITE\_DATA**

Bit mask for allowing write of data

**See Also:**

Constant Field Values

### RUNTYPE\_SEND\_ALERTS <a href="#toc323288335" id="toc323288335"></a>

public static final int **RUNTYPE\_SEND\_ALERTS**

Bit mask for allowing sending of alerts

**See Also:**

Constant Field Values

### RUNTYPE\_WRITE\_CASES <a href="#toc323288336" id="toc323288336"></a>

public static final int **RUNTYPE\_WRITE\_CASES**

Bit mask for writing cases into case managers

**See Also:**

Constant Field Values

### RUNTYPE\_DEBUG\_OFF <a href="#toc323288337" id="toc323288337"></a>

public static final int **RUNTYPE\_DEBUG\_OFF**

Bit mask to disable debug messages (console alerts)

**See Also:**

Constant Field Values

### PERFLEVEL\_UNKNOWN <a href="#toc323288338" id="toc323288338"></a>

public static final int **PERFLEVEL\_UNKNOWN**

Performance monitoring is not set

**See Also:**

Constant Field Values

### PERFLEVEL\_TRANSACTIONS <a href="#toc323288339" id="toc323288339"></a>

public static final int **PERFLEVEL\_TRANSACTIONS**

Performance monitoring for transactions only

**See Also:**

Constant Field Values

### PERFLEVEL\_TIMING <a href="#toc323288340" id="toc323288340"></a>

public static final int **PERFLEVEL\_TIMING**

Performance monitoring for both transactions and timing

**See Also:**

Constant Field Values

### PERFLEVEL\_URI <a href="#toc86843849" id="toc86843849"></a>

public static final int **PERFLEVEL\_URI**

Performance monitoring for transactions and timing and individual URI performance

**See Also:**

Constant Field Values

### PERFLEVEL\_ALL <a href="#toc86843850" id="toc86843850"></a>

public static final int **PERFLEVEL\_ALL**

Performance monitoring for transactions and timing, individual URI performance and connection pools

**See Also:**

Constant Field Values

### VAR\_NUMBER <a href="#toc323288343" id="toc323288343"></a>

public static final int **VAR\_NUMBER**

The data provided is a number

**See Also:**

Constant Field Values

### VAR\_STRING <a href="#toc323288344" id="toc323288344"></a>

public static final int **VAR\_STRING**

The data provided is a string

**See Also:**

Constant Field Values

### VAR\_VARIABLE <a href="#toc323288345" id="toc323288345"></a>

public static final int **VAR\_VARIABLE**

The data provided is a variable

**See Also:**

Constant Field Values

### Rule <a href="#toc323288346" id="toc323288346"></a>

public **Rule**()

### setError <a href="#toc323288347" id="toc323288347"></a>

public void **setError**(java.lang.String errorCode,

java.lang.String\[] parms)

Record the fact that an error has occured. Setting an error causes the <code class="expression">space.vars.X\_Agent\_Name\_Single</code> to abort with a runtime exception.

**Parameters:**

errorCode - The error code to report

parms - The parameters to inject into the error text

### getConfigurationSetting <a href="#toc86843856" id="toc86843856"></a>

public java.lang.String **getConfigurationSetting**(java.lang.String key)

Return a configuration setting for the <code class="expression">space.vars.X\_Agent\_Name\_Single</code>. This method searches the configuration setting in the order of the configuration itself, followed by the <code class="expression">space.vars.X\_Agent\_Name\_Single</code> configuration file

**Parameters:**

key -

**Returns:**

The value of the configuration setting

### getCredentialsValue <a href="#toc86843857" id="toc86843857"></a>

public java.lang.String **getCredentialsValue**(java.lang.String key,

java.lang.String field)

Obtain the value for a given credential key and field

**Parameters:**

key -

field -

**Returns:**

Valid credential value or null if not found

### renderMessage <a href="#toc86843858" id="toc86843858"></a>

public java.lang.String **renderMessage**(java.lang.String errorCode,

java.lang.String\[] parms)

Record the fact on the console that a warning was detected. The <code class="expression">space.vars.X\_Agent\_Name\_Single</code> will continue

**Parameters:**

errorCode - The error code to report

parms - The parameters to inject into the error text

**Returns:**

The rendered message

### setWarning <a href="#toc323288351" id="toc323288351"></a>

public void **setWarning**(java.lang.String errorCode,

java.lang.String\[] parms)

Record the fact on the console that a warning was detected. The <code class="expression">space.vars.X\_Agent\_Name\_Single</code> will continue

**Parameters:**

errorCode - The error code to report

parms - The parameters to inject into the error text

### addMonitoredFile <a href="#toc323288352" id="toc323288352"></a>

public void **addMonitoredFile**(java.io.File file)

Add a file to be monitored by the rule. If the file changes during the life of the rule, a notification will be sent to the rules "updateFile" method.

**Parameters:**

file - the file to monitor

### removeFileMonitor <a href="#toc323288353" id="toc323288353"></a>

public void **removeFileMonitor**()

Removes all file monitors for this rule

### getValueType <a href="#toc323288354" id="toc323288354"></a>

public int **getValueType**(java.lang.String value)

Detect what kind of value has been passed as a parameter. Return type are: VAR\_NUMBER: The parameter is a number VAR\_STRING: The parameter is a string VAR\_VARIABLE: The parameter is a variable

**Parameters:**

value - The value to test

**Returns:**

The value type of a provided value parameter

### getValueString <a href="#toc323288355" id="toc323288355"></a>

public java.lang.String **getValueString**(java.lang.String value)

Resolve the string value type of a provided value parameter, removing any quote characters

**Parameters:**

value - The value to resolve

**Returns:**

The resolved (clean) value

### getRuntimeValue <a href="#toc323288356" id="toc323288356"></a>

public java.lang.String **getRuntimeValue**(com.tomorrowx.core.rules.base.VariableAttributeObject vao,

java.lang.String value)

Resolve the runtime value of a given parameter, based on the string supplied to it

**Parameters:**

vao - The variable attribute object to use

value - The value to resolve

**Returns:**

The resolved (runtime) value

### getRuntimeValue <a href="#toc323288357" id="toc323288357"></a>

public java.lang.String **getRuntimeValue**(com.tomorrowx.core.rules.base.VariableAttributeObject vao,

java.lang.String value,

int maxLength)

Resolve the runtime value of a given parameter, based on the string supplied to it

**Parameters:**

vao - The variable attribute object to use

value - The value to resolve

maxLength - The maximum length of the returned value

**Returns:**

The resolved (runtime) value

### initialize <a href="#toc323288358" id="toc323288358"></a>

public abstract void **initialize**()

Initialize the internal state of the rule, based on the set properties

### cleanup <a href="#toc323288359" id="toc323288359"></a>

public abstract void **cleanup**()

Clean up any allocated resources before shutting down

### processRule <a href="#toc323288360" id="toc323288360"></a>

public abstract com.tomorrowx.core.rules.base.VariableAttributeObject **processRule**(com.tomorrowx.core.rules.base.VariableAttributeObject vao,

com.tomorrowx.core.rules.base.ChainPoint source)

throws java.lang.Throwable

Process the rule to the depth of all connected subrules. The outcome is the processed object with any new attributes and changes.

**Parameters:**

vao - The variable attribute object with current data

source - The originating chain point

**Returns:**

the processed object

**Throws:**

java.lang.Throwable

### execute <a href="#toc323288361" id="toc323288361"></a>

public com.tomorrowx.core.rules.base.VariableAttributeObject **execute**(com.tomorrowx.core.rules.base.VariableAttributeObject vao,

com.tomorrowx.core.rules.base.ChainPoint source)

throws java.lang.Throwable

Wrap the processing of the rule and its performance testing, exception handling This method is for the <code class="expression">space.vars.X\_Agent\_Name\_Single</code> only and should not be called directly

**Parameters:**

vao - The variable attribute object with current data

source - The originating chain point

**Returns:**

the processed object

**Throws:**

java.lang.Throwable

### addPerformanceData <a href="#toc323288362" id="toc323288362"></a>

public void **addPerformanceData**(java.lang.StringBuffer data,

java.lang.String ruleSet)

Get the performance data for the currently running <code class="expression">space.vars.X\_Agent\_Name\_Single</code> and add it to the provided StringBuffer as well-formed XML Note: This approach is not synchronized and can suffer from inaccuracies on a busy system

**Parameters:**

data - The performance data to add

ruleSet - The ID of the rule set

### getProperties <a href="#toc323288363" id="toc323288363"></a>

public java.util.Hashtable **getProperties**()

Get the specific properties of this rule to show for maintenance

**Returns:**

Hashtable with property/value value pairs as Strings

### getRuleChainPoints <a href="#toc323288364" id="toc323288364"></a>

public java.util.Hashtable **getRuleChainPoints**()

Get a list of points into which this rule can chain

**Returns:**

Hashtable with point name/chain point value pair

#### setRuleChainPoint <a href="#toc323288365" id="toc323288365"></a>

public void **setRuleChainPoint**(java.lang.String chainPointId,

com.tomorrowx.core.rules.base.ChainPoint chainPoint)

Attach a rule to a chain point

**Parameters:**

chainPointId - The Id of the rule to chain into

chainPoint - The name of the point to connect to

### isChainPointAddAllowed <a href="#toc323288366" id="toc323288366"></a>

public boolean **isChainPointAddAllowed**()

Are new (custom) chain points allowed

**Returns:**

True if yes, false if no

### materializeRule <a href="#toc323288367" id="toc323288367"></a>

public void **materializeRule**(com.tomorrowx.core.rules.base.RuleSet ruleSet)

Prepare this rule to be executable (connect all chain points to their rules)

**Parameters:**

ruleSet - The originating rule set

### getId <a href="#toc323288368" id="toc323288368"></a>

public java.lang.String **getId**()

Get the ID of this rule

**Returns:**

Returns the id.

### setId <a href="#toc323288369" id="toc323288369"></a>

public void **setId**(java.lang.String id)

Set the ID of this rule

**Parameters:**

id - The id to set.

### setProperties <a href="#toc323288370" id="toc323288370"></a>

public void **setProperties**(java.util.Hashtable properties)

Set rule specific properties

**Parameters:**

properties - The properties to set.

### getTransactions <a href="#toc323288371" id="toc323288371"></a>

public long **getTransactions**()

Get the transaction count for this rule

**Returns:**

Returns the transactions.

### setTransactions <a href="#toc323288372" id="toc323288372"></a>

public void **setTransactions**(long transactions)

Set the transaction count for this rule

**Parameters:**

transactions - The transactions to set.

### addTransaction <a href="#toc323288373" id="toc323288373"></a>

public void **addTransaction**()

Increment transaction count

### addTransactionTime <a href="#toc323288374" id="toc323288374"></a>

public void **addTransactionTime**(long time)

Increment inline timings

### chainTo <a href="#toc323288375" id="toc323288375"></a>

public com.tomorrowx.core.rules.base.VariableAttributeObject **chainTo**(java.lang.String name,

com.tomorrowx.core.rules.base.VariableAttributeObject vao,

**Rule** source)

throws java.lang.Throwable

Chain through to a chain point

**Parameters:**

name - The name of the chain point

vao - The data packet to supply

source - The originating rule

**Returns:**

the data packet processed by rules further down the chain

**Throws:**

java.lang.Throwable

### chainAll <a href="#toc323288376" id="toc323288376"></a>

public com.tomorrowx.core.rules.base.VariableAttributeObject **chainAll**(com.tomorrowx.core.rules.base.VariableAttributeObject vao,

**Rule** source)

throws java.lang.Throwable

Chain through to all the chain points in sequence

**Parameters:**

vao - The data packet to supply

source - The originating rule

**Returns:**

the data packet processed by rules further down the chain

**Throws:**

java.lang.Throwable

### getRuleSet <a href="#toc323288377" id="toc323288377"></a>

public com.tomorrowx.core.rules.base.RuleSet **getRuleSet**()

Get the parent rule set for this rule

**Returns:**

Returns the ruleSet.

### setRuleSet <a href="#toc323288378" id="toc323288378"></a>

public void **setRuleSet**(com.tomorrowx.core.rules.base.RuleSet ruleSet)

Set the parent rule set for this rule

**Parameters:**

ruleSet - The ruleSet to set.

### getRunType <a href="#toc323288379" id="toc323288379"></a>

public int **getRunType**()

Obtain the run-type for this rule as defined by the RUNTYPE constants

**Returns:**

Returns the runType.

### setRunType <a href="#toc323288380" id="toc323288380"></a>

public void **setRunType**(int runType)

Set the run-type for this rule

**Parameters:**

runType - The runType to set.

### getLabel <a href="#toc323288381" id="toc323288381"></a>

public java.lang.String **getLabel**()

Get the text label for this rule

**Returns:**

Returns the label.

### setLabel <a href="#toc323288382" id="toc323288382"></a>

public void **setLabel**(java.lang.String label)

Set the text label for this rule

**Parameters:**

label - The label to set.

### writeConsole <a href="#toc86843891" id="toc86843891"></a>

public void **writeConsole**(java.lang.String message)

Send a message to the console

**Parameters:**

message - Message to send

### log <a href="#toc323288384" id="toc323288384"></a>

public void **log**(int level,

java.lang.String message,

java.lang.Throwable exception,

**Rule** rule,

com.tomorrowx.core.rules.base.VariableAttributeObject vao)

Use this method to log rule exceptions to any installed LogAdapter.

**Parameters:**

level - The log level of the log entry as per the constants defined on this adapter

message - The message logged.

exception - Any exception caught. Can be null.

rule - Any rule that triggered the log entry. Can be null.

vao - Any data packet that caused the failure. Can be null.

## com.tomorrowx.core.rules.base Class VariableAttributeObject <a href="#toc323288386" id="toc323288386"></a>

```
java.lang.Object
    -> com.tomorrowx.core.rules.base.VariableAttributeObject
```

> public class **VariableAttributeObject**
>
> extends java.lang.Object

<table data-header-hidden><thead><tr><th width="207"></th><th></th></tr></thead><tbody><tr><td><strong>Field Summary</strong></td><td></td></tr><tr><td>static int</td><td><strong>LOOP</strong><br>The completion is for the current loop only</td></tr><tr><td>static int</td><td><strong>PROCESS</strong><br>The completion is for the entire process</td></tr><tr><td>static int</td><td><strong>RULESET</strong><br>The completion is for the current rule set only</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="249"></th><th></th></tr></thead><tbody><tr><td><strong>Method Summary</strong></td><td></td></tr><tr><td>void</td><td><strong>addTraceData</strong>(java.lang.String traceData)<br>Add a new trace data line</td></tr><tr><td>java.lang.String</td><td><strong>getAttribute</strong>(java.lang.String id)<br>Retrieve an attribute value by name.</td></tr><tr><td>int</td><td><strong>getAttributeCount</strong>()<br>Obtain a count of current attributes</td></tr><tr><td>java.util.Enumeration</td><td><strong>getAttributeNames</strong>()<br>Obtain all the current attribute names</td></tr><tr><td>int</td><td><strong>getCompletionScope</strong>()<br>Get the scope of the completion.</td></tr><tr><td>com.tomorrowx.core.rules.base.DataWrapper</td><td><strong>getDataWrapper</strong>()<br>Returns the raw data that was used as the basis for the initial variable setting</td></tr><tr><td>java.lang.Throwable</td><td><strong>getException</strong>()<br>Get the stored exception</td></tr><tr><td>java.lang.StringBuffer</td><td><strong>getLargeAttribute</strong>(java.lang.String id)<br>Retrieve a large attribute value by name.</td></tr><tr><td>java.lang.Object</td><td><strong>getObjectAttribute</strong>(java.lang.String id)<br>Retrieve an object attribute value by name.</td></tr><tr><td>java.util.Vector</td><td><strong>getTraceData</strong>()<br>get the full trace data vector</td></tr><tr><td>boolean</td><td><strong>hasAttribute</strong>(java.lang.String id)<br>Determine if a given attribute exists</td></tr><tr><td>boolean</td><td><strong>hasContent</strong>()<br></td></tr><tr><td>boolean</td><td><strong>isCompleted</strong>()<br></td></tr><tr><td>boolean</td><td><strong>isLargeAttribute</strong>(java.lang.String id)<br>Check if an attribute is large</td></tr><tr><td>boolean</td><td><strong>isObjectAttribute</strong>(java.lang.String id)<br>Check if a variable is an object (not String or String Buffer)</td></tr><tr><td>boolean</td><td><strong>isRedirected</strong>()<br>Determine if the response from the <code class="expression">space.vars.X_Agent_Name_Single</code> has resulted in a redirection (for example a HTTP redirect)</td></tr><tr><td>boolean</td><td><strong>isTrace</strong>()<br></td></tr><tr><td>void</td><td><strong>setAttribute</strong>(java.lang.String id, java.lang.String value)<br>Set the value of an attribute.</td></tr><tr><td>void</td><td><strong>setCompleted</strong>(boolean completed)<br></td></tr><tr><td>void</td><td><strong>setCompletionScope</strong>(int completionScope)<br>Set the current completion scope.</td></tr><tr><td>void</td><td><strong>setDataWrapper</strong>(com.tomorrowx.core.rules.base.DataWrapper dataWrapper)<br>Set the raw data that was used as the basis for the initial variable setting</td></tr><tr><td>void</td><td><strong>setException</strong>(java.lang.Throwable exception)<br>Store an exception for later analysis</td></tr><tr><td>void</td><td><strong>setHasContent</strong>(boolean hasContent)<br></td></tr><tr><td>void</td><td><strong>setLargeAttribute</strong>(java.lang.String id, java.lang.StringBuffer value)<br>Set the value of an attribute.</td></tr><tr><td>void</td><td><strong>setObjectAttribute</strong>(java.lang.String id, java.lang.Object value)<br>Set the value of an attribute.</td></tr><tr><td>void</td><td><strong>setRedirected</strong>(boolean redirected)<br>Advise that the response from the engine is performing a redirect</td></tr><tr><td>void</td><td><strong>setTrace</strong>(boolean trace)<br></td></tr></tbody></table>

| **Methods inherited from class java.lang.Object**                         |
| ------------------------------------------------------------------------- |
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |

### PROCESS <a href="#toc86843894" id="toc86843894"></a>

public static final int **PROCESS**

The completion is for the entire process

**See Also:**

Constant Field Values

### RULESET <a href="#toc86843895" id="toc86843895"></a>

public static final int **RULESET**

The completion is for the current rule set only

**See Also:**

Constant Field Values

### LOOP <a href="#toc86843896" id="toc86843896"></a>

public static final int **LOOP**

The completion is for the current loop only

**See Also:**

Constant Field Values

### VariableAttributeObject <a href="#toc86843897" id="toc86843897"></a>

public **VariableAttributeObject**()

### getAttribute <a href="#toc86843898" id="toc86843898"></a>

public java.lang.String **getAttribute**(java.lang.String id)

Retrieve an attribute value by name. If not found, blank will be returned

**Parameters:**

id - The name of the attribute

**Returns:**

The attribute value

### getLargeAttribute <a href="#toc86843899" id="toc86843899"></a>

public java.lang.StringBuffer **getLargeAttribute**(java.lang.String id)

Retrieve a large attribute value by name. If not found, blank will be returned

**Parameters:**

id - The name of the attribute

**Returns:**

The attribute value

### getObjectAttribute <a href="#toc86843900" id="toc86843900"></a>

public java.lang.Object **getObjectAttribute**(java.lang.String id)

Retrieve an object attribute value by name. If not found, a blank string object will be returned

**Parameters:**

id - The name of the attribute

**Returns:**

The attribute value

### isLargeAttribute <a href="#toc86843901" id="toc86843901"></a>

public boolean **isLargeAttribute**(java.lang.String id)

Check if an attribute is large

**Parameters:**

id -

**Returns:**

true if large and stored as StringBuffer, false otherwise

### isObjectAttribute <a href="#toc86843902" id="toc86843902"></a>

public boolean **isObjectAttribute**(java.lang.String id)

Check if a variable is an object (not String or String Buffer)

**Parameters:**

id -

**Returns:**

true if large and stored as StringBuffer, false otherwise

### hasAttribute <a href="#toc86843903" id="toc86843903"></a>

public boolean **hasAttribute**(java.lang.String id)

Determine if a given attribute exists

**Parameters:**

id - The name of the attribute

**Returns:**

true if the attribute exists

### setAttribute <a href="#toc86843904" id="toc86843904"></a>

public void **setAttribute**(java.lang.String id,

java.lang.String value)

Set the value of an attribute. If a banned attribute name is provided it will be ignored

**Parameters:**

id - The name of the attribute to set

value - The value to set

### setLargeAttribute <a href="#toc86843905" id="toc86843905"></a>

public void **setLargeAttribute**(java.lang.String id,

java.lang.StringBuffer value)

Set the value of an attribute. If a banned attribute name is provided it will be ignored

**Parameters:**

id - The name of the attribute to set

value - The value to set as a StringBuffer

### setObjectAttribute <a href="#toc86843906" id="toc86843906"></a>

public void **setObjectAttribute**(java.lang.String id,

java.lang.Object value)

Set the value of an attribute. If a banned attribute name is provided it will be ignored if null is provided, the attribute will be deleted

**Parameters:**

id - The name of the attribute to set

value - The value to set as an Object

### getAttributeNames <a href="#toc86843907" id="toc86843907"></a>

public java.util.Enumeration **getAttributeNames**()

Obtain all the current attribute names

**Returns:**

Enumeration of attribute names

### getAttributeCount <a href="#toc86843908" id="toc86843908"></a>

public int **getAttributeCount**()

Obtain a count of current attributes

**Returns:**

the count of attributes

### isCompleted <a href="#toc86843909" id="toc86843909"></a>

public boolean **isCompleted**()

**Returns:**

Returns the completion status of the rule set.

### setCompleted <a href="#toc86843910" id="toc86843910"></a>

public void **setCompleted**(boolean completed)

**Parameters:**

completed - The new completion status.

### getDataWrapper <a href="#toc86843911" id="toc86843911"></a>

public com.tomorrowx.core.rules.base.DataWrapper **getDataWrapper**()

Returns the raw data that was used as the basis for the initial variable setting

**Returns:**

Returns the dataWrapper.

### setDataWrapper <a href="#toc86843912" id="toc86843912"></a>

public void **setDataWrapper**(com.tomorrowx.core.rules.base.DataWrapper dataWrapper)

Set the raw data that was used as the basis for the initial variable setting

**Parameters:**

dataWrapper - The dataWrapper to set.

### getException <a href="#toc86843913" id="toc86843913"></a>

public java.lang.Throwable **getException**()

Get the stored exception

**Returns:**

Returns the exception.

### setException <a href="#toc86843914" id="toc86843914"></a>

public void **setException**(java.lang.Throwable exception)

Store an exception for later analysis

**Parameters:**

exception - The exception to set.

### getCompletionScope <a href="#toc86843915" id="toc86843915"></a>

public int **getCompletionScope**()

Get the scope of the completion. This can either resolve to: LOOP, PROCESS or RULESET

**Returns:**

Returns the completionScope.

### setCompletionScope <a href="#toc86843916" id="toc86843916"></a>

public void **setCompletionScope**(int completionScope)

Set the current completion scope. This can either be LOOP, PROCESS or RULESET

**Parameters:**

completionScope - The completionScope to set.

### isRedirected <a href="#toc86843917" id="toc86843917"></a>

public boolean **isRedirected**()

Determine if the response from the <code class="expression">space.vars.X\_Agent\_Name\_Single</code> has resulted in a redirection (for example a HTTP redirect)

**Returns:**

Returns the redirected.

### setRedirected <a href="#toc86843918" id="toc86843918"></a>

public void **setRedirected**(boolean redirected)

Advise that the response from the engine is performing a redirect

**Parameters:**

redirected - The redirected to set.

### isTrace <a href="#toc323288412" id="toc323288412"></a>

public boolean **isTrace**()

**Returns:**

Returns the trace.

### setTrace <a href="#toc323288413" id="toc323288413"></a>

public void **setTrace**(boolean trace)

**Parameters:**

trace - The trace to set.

### getTraceData <a href="#toc323288414" id="toc323288414"></a>

public java.util.Vector **getTraceData**()

get the full trace data vector

**Returns:**

The trace as a vector of Strings

### addTraceData <a href="#toc86843922" id="toc86843922"></a>

public void **addTraceData**(java.lang.String traceData)

Add a new trace data line

**Parameters:**

traceData -

### hasContent <a href="#toc86843923" id="toc86843923"></a>

public boolean **hasContent**()

**Returns:**

Returns the hasContent.

### setHasContent <a href="#toc86843924" id="toc86843924"></a>

public void **setHasContent**(boolean hasContent)

**Parameters:**

hasContent - The hasContent to set.
