com.infoengine.object.factory
Class Param

java.lang.Object
  extended bycom.infoengine.object.factory.Param
All Implemented Interfaces:
Cloneable, Serializable

public class Param
extends Object
implements Cloneable, Serializable

See Also:
Serialized Form

Field Summary
static String DATA
           
static int KEY
           
private  IeAtt myAtt
           
static String[] TYPES
           
static int UNKNOWN
           
static int VALUE
           
 
Constructor Summary
Param(IeAtt att)
          Constructs a parameter wrapper around an existing set of meta.
Param(String name, int type)
          Constructs a named parameter without a value.
Param(String name, int type, String data)
          Constructs a named parameter with a value.
Param(String name, String data)
          Constructs a named parameter without a type.
Param(String name, String type, String data)
          Constructs a named parameter with a value.
 
Method Summary
 Enumeration applyBinding(Task task)
          Bind this parameter to variable substitutions in the context of a specified task, and return the resulting value.
private  Enumeration applyDelim(String input)
          Break the input string into multiple strings using the delimiter for this parameter.
 Object clone()
          Creates a shallow copy of this parameter.
protected  IeAtt getAtt()
          Returns the parameter's internal attribute structure.
 String getData()
          Returns the value of this parameter.
 String getDefault()
          Returns this parameter's default value.
 String getDelim()
          Returns this parameter's delimiter (DELIM) value.
 String getElementSeparator()
          Returns this parameter's element separator value.
 String getName()
          Returns this parameter's name.
 int getType()
          Returns this parameter's type.
 String getValueSeparator()
          Returns this parameter's value separator value.
protected static IeAtt newStructure(String key, int type, String val)
          Builds a new webject parameter for the given key and value.
 void printTree()
          Prints the structure of the parameter to System.out.
protected  void setAtt(IeAtt att)
          Sets the parameter's internal attribute structure.
 void setData(String value)
          Sets the value of this parameter.
 void setDefault(String value)
          Sets this parameter's default value.
 void setDelim(String value)
          Sets this parameter's delimiter (DELIM) value.
 void setElementSeparator(String value)
          Sets this parameter's element separator value.
 void setName(String name)
          Sets this parameter's name.
 void setType(int type)
          Sets this parameter's type.
 void setType(String type)
          Sets this parameter's type.
 void setValueSeparator(String value)
          Sets this parameter's value separator value.
private  Vector subVariables(Task task)
          Parse the input string and return a vector of objects.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA

public static final String DATA
See Also:
Constant Field Values

TYPES

public static final String[] TYPES

UNKNOWN

public static final int UNKNOWN
See Also:
Constant Field Values

KEY

public static final int KEY
See Also:
Constant Field Values

VALUE

public static final int VALUE
See Also:
Constant Field Values

myAtt

private IeAtt myAtt
Constructor Detail

Param

public Param(String name,
             String type,
             String data)
Constructs a named parameter with a value.

Parameters:
name - the name of the parameter
type - the type of the parameter
data - the value of the parameter

Param

public Param(String name,
             int type,
             String data)
Constructs a named parameter with a value.

Parameters:
name - the name of the parameter
type - the type of the parameter
data - the value of the parameter

Param

public Param(String name,
             int type)
Constructs a named parameter without a value.

Parameters:
name - the name of the parameter
type - the type of the parameter

Param

public Param(String name,
             String data)
Constructs a named parameter without a type.

Parameters:
name - the name of the parameter
data - the value of the parameter

Param

public Param(IeAtt att)
Constructs a parameter wrapper around an existing set of meta.

Parameters:
att - an Info*Engine attribute object
Method Detail

getName

public String getName()
Returns this parameter's name.

Returns:
The parameter's current name.

setName

public void setName(String name)
Sets this parameter's name.

Parameters:
name - The parameter's new name.

getDefault

public String getDefault()
Returns this parameter's default value.

Returns:
The parameter's current default value.

setDefault

public void setDefault(String value)
Sets this parameter's default value.

Parameters:
value - The parameter's new default value.

getDelim

public String getDelim()
Returns this parameter's delimiter (DELIM) value.

Returns:
The parameter's current delimiter value.

setDelim

public void setDelim(String value)
Sets this parameter's delimiter (DELIM) value.

Parameters:
value - The parameter's new default value.

getElementSeparator

public String getElementSeparator()
Returns this parameter's element separator value.

Returns:
The parameter's current element separator value.

setElementSeparator

public void setElementSeparator(String value)
Sets this parameter's element separator value.

Parameters:
value - The parameter's new element separator value.

getValueSeparator

public String getValueSeparator()
Returns this parameter's value separator value.

Returns:
The parameter's current value separator value.

setValueSeparator

public void setValueSeparator(String value)
Sets this parameter's value separator value.

Parameters:
value - The parameter's new value separator value.

applyBinding

public Enumeration applyBinding(Task task)
Bind this parameter to variable substitutions in the context of a specified task, and return the resulting value.

Parameters:
task - The task providing the binding context
Returns:
The string value of this param after binding.

subVariables

private Vector subVariables(Task task)
Parse the input string and return a vector of objects. Simple strings are returned as a string. Substitution syntax is returned as an enumeration of strings.

Parameters:
task - The task providing the binding context
Returns:
A vector of objects.

applyDelim

private Enumeration applyDelim(String input)
Break the input string into multiple strings using the delimiter for this parameter.

Parameters:
input - A string with delimiting characters
Returns:
A vector of strings.

getType

public int getType()
Returns this parameter's type.

Returns:
The parameter's current type.

setType

public void setType(int type)
Sets this parameter's type.

Parameters:
type - The parameter's new type.

setType

public void setType(String type)
Sets this parameter's type.

Parameters:
type - The parameter's new type.

getData

public String getData()
Returns the value of this parameter.

Returns:
This parameter's current string value.

setData

public void setData(String value)
Sets the value of this parameter.

Parameters:
value - This parameter's string value.

clone

public Object clone()
Creates a shallow copy of this parameter.

Returns:
The shallow copy.

newStructure

protected static IeAtt newStructure(String key,
                                    int type,
                                    String val)
Builds a new webject parameter for the given key and value.

Parameters:
key - The name of the new parameter.
val - The value of the new parameter.
type - The type of the new parameter.
Returns:
The new parameter.

getAtt

protected IeAtt getAtt()
Returns the parameter's internal attribute structure.

Returns:
This parameter's set of meta data.

setAtt

protected void setAtt(IeAtt att)
Sets the parameter's internal attribute structure.

Parameters:
att - The set of meta that defines this parameter.

printTree

public void printTree()
Prints the structure of the parameter to System.out.