JSCAPE MFT Server

com.jscape.util.workflow
Class ExpressionContext

java.lang.Object
  extended by com.jscape.util.workflow.ExpressionContext

public class ExpressionContext
extends java.lang.Object

Workflow context.

Author:
Alex

Constructor Summary
ExpressionContext()
          Creates a new context instance.
 
Method Summary
 ExpressionContext add(ExpressionContext that)
           
 java.util.Map<java.lang.String,java.lang.Object> asMap()
           
 ExpressionContext clear()
          Clears current context.
 com.jscape.util.functor.UnaryFunction<java.lang.Object[],java.lang.Object> getFunction(java.lang.String name)
           
 java.lang.Object getVariable(java.lang.String name)
          Searches and returns variable from context.
 com.jscape.util.functor.UnaryFunction<java.lang.Object[],java.lang.Object> removeFunction(java.lang.String name)
           
 java.lang.Object removeVariable(java.lang.String name)
          Removes variable from context.
 ExpressionContext setFunction(java.lang.String name, com.jscape.util.functor.UnaryFunction<java.lang.Object[],java.lang.Object> value)
           
 ExpressionContext setVariable(java.lang.String name, java.lang.Object value)
          Adds a variable to context.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExpressionContext

public ExpressionContext()
Creates a new context instance.

Method Detail

add

public ExpressionContext add(ExpressionContext that)

setVariable

public ExpressionContext setVariable(java.lang.String name,
                                     java.lang.Object value)
Adds a variable to context.

Parameters:
name - variable name
value - variable value
Returns:
current context instance

getVariable

public java.lang.Object getVariable(java.lang.String name)
Searches and returns variable from context.

Parameters:
name - variable name
Returns:
found variable or null if variable is not found

removeVariable

public java.lang.Object removeVariable(java.lang.String name)
Removes variable from context.

Parameters:
name - variable name.
Returns:
removed variable if exists

setFunction

public ExpressionContext setFunction(java.lang.String name,
                                     com.jscape.util.functor.UnaryFunction<java.lang.Object[],java.lang.Object> value)

getFunction

public com.jscape.util.functor.UnaryFunction<java.lang.Object[],java.lang.Object> getFunction(java.lang.String name)

removeFunction

public com.jscape.util.functor.UnaryFunction<java.lang.Object[],java.lang.Object> removeFunction(java.lang.String name)

clear

public ExpressionContext clear()
Clears current context.

Returns:
current context instance

asMap

public java.util.Map<java.lang.String,java.lang.Object> asMap()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

JSCAPE MFT Server

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved