com.infoengine.object.factory
Class Task

java.lang.Object
  extended by com.infoengine.object.factory.Task
All Implemented Interfaces:
java.io.Serializable

public class Task
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.lang.String AUTH_MAP
           
static java.lang.String CONTEXT
           
static java.lang.String SOURCE
           
static java.lang.String STATUS
           
static java.lang.String TASKS
           
static java.lang.String VDB
           
static java.lang.String WEBJECTS
           
 
Constructor Summary
Task()
          Constructs an unnamed task.
Task(IeRequest req)
          Construcst a task wrapper around an incoming request.
Task(java.lang.String name)
          Constructs a named task.
Task(Webject webject)
          Constructs a task wrapper around an existing webject.
 
Method Summary
 void addContext(Group grp)
          Adds a context group to this task.
 void addError(java.lang.String message, int status)
          Adds an error message and status to this task.
 void addInput(Group grp)
          Deprecated.  
 void addOutput(Group grp)
          Deprecated.  
 void addOutput(java.lang.String data)
          Deprecated.  
 void addVdb(Group grp)
          Adds a VDB group to this task.
 void addVdb(java.lang.String data)
          Adds an output string to this task.
 Webject bindParams()
          Binds parameters to the webject wrapped in this task.
 Webject bindParams(Webject webject)
          Binds parameters to a specific webject.
 void clearInput()
          Deprecated.  
 Task deepClone()
          Creates a deep copy of this task.
 Element getAuthElement(java.lang.String key)
          Returns the authentication map element associated with a specified instance key.
 IeCollection getContext()
          Returns a collection containing the context groups of this task.
 IeGroup getContext(java.lang.String name)
          Returns a named context group contained within this task.
 Group getContextGroup(java.lang.String name)
          Returns a named context group contained within this task.
 java.lang.String getDesc()
          Returns the description currently assigned to this task.
 Group getGroupIn()
          Returns the default input group for this task.
 Group getGroupIn(java.lang.String name)
          Returns a named input group for this task.
 Group getGroupOut()
          Returns the default output group from this task.
 Group getGroupOut(java.lang.String name)
          Returns a named output group contained within this task.
 IeCollection getInput()
          Deprecated.  
 Group getInput(java.lang.String name)
          Deprecated.  
 java.util.Enumeration getInputGroups()
          Returns all input groups contained within this task.
 java.util.Enumeration getInputs()
          Deprecated.  
 IeMultipartInputStream getInputStream()
          Returns the input stream currently assigned to this task.
 java.lang.String getMessage()
          Returns the concatenation of the error messages attached to this task.
 java.util.Enumeration getMessages()
          Returns the error messages attached to this task.
 IeMultipartInputStream getMimeInputStream()
          Deprecated. use getInputStream instead
 java.lang.String getName()
          Returns the name of this task.
 IeCollection getOutput()
          Deprecated.  
 Group getOutput(java.lang.String name)
          Deprecated.  
 java.util.Enumeration getOutputGroups()
          Returns all output groups contained within this task.
 IeMultipartOutputStream getOutputStream()
          Returns the output stream currently assigned to this task.
 java.lang.String getPassword()
          Returns the password currently assigned to this task.
 IeRequest getRequest()
          Returns the standard request used to pass this task to a service.
 java.lang.String getSource()
          Returns the source currently assigned to this task.
 int getStatus()
          Returns the status of this task
 java.lang.String getType()
          Returns the type of this task.
 java.lang.String getUserName()
          Returns the user name currently assigned to this task.
 java.util.Enumeration getVariables(java.lang.String lex, Param param)
           
 IeCollection getVdb()
          Returns the collection containing VDB groups for the task.
 Group getVdb(java.lang.String name)
          Returns a named group from the collection containing VDB groups for the task.
 Group getVdbIn()
          Returns the default VDB group for this task.
 Group getVdbIn(java.lang.String name)
          Returns a named VDB group contained within this task.
 Webject getWebject()
          Returns the webject that this task wraps.
 void printTree()
          Prints the structure of the task to System.out.
 void removeInput(Group grp)
          Deprecated.  
 void removeVdb(Group grp)
          Removes a VDB group from this task.
 void setContext(IeCollection collection)
          Sets the collection containing the context groups for this task.
 void setDesc(java.lang.String desc)
          Sets the description of this task.
 void setInput(IeCollection collection)
          Deprecated.  
 void setInputStream(IeMultipartInputStream in)
          Sets the input stream to be used by this task.
 void setName(java.lang.String name)
          Sets the name of this task.
 void setOutputStream(IeMultipartOutputStream out)
          Sets the output stream to be used by this task.
 void setPassword(java.lang.String pwd)
          Sets the password of this task.
 void setSource(java.lang.String source)
          Sets the source for this task.
 void setType(java.lang.String type)
          Sets the type of this task.
 void setUserName(java.lang.String name)
          Sets the user name of this task.
 void setVdb(IeCollection collection)
          Sets the collection containing the VDB groups for this task.
 void setWebject(Webject webject)
          Sets the webject that this task wraps.
 java.util.Enumeration subVariables(java.lang.String in)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTH_MAP

public static final java.lang.String AUTH_MAP
See Also:
Constant Field Values

CONTEXT

public static final java.lang.String CONTEXT
See Also:
Constant Field Values

SOURCE

public static final java.lang.String SOURCE
See Also:
Constant Field Values

TASKS

public static final java.lang.String TASKS
See Also:
Constant Field Values

WEBJECTS

public static final java.lang.String WEBJECTS
See Also:
Constant Field Values

VDB

public static final java.lang.String VDB
See Also:
Constant Field Values

STATUS

public static final java.lang.String STATUS
See Also:
Constant Field Values
Constructor Detail

Task

public Task()
Constructs an unnamed task.


Task

public Task(java.lang.String name)
Constructs a named task.

Parameters:
name - the name to be assigned to the task

Task

public Task(Webject webject)
Constructs a task wrapper around an existing webject.

Parameters:
webject - the webject to be wrapped in a task

Task

public Task(IeRequest req)
Construcst a task wrapper around an incoming request.

Parameters:
req - the request to be wrapped in a task
Method Detail

getRequest

public IeRequest getRequest()
Returns the standard request used to pass this task to a service.

Returns:
This task's service request.

addError

public void addError(java.lang.String message,
                     int status)
Adds an error message and status to this task.

Parameters:
message - The error message.
status - The status code.

getStatus

public int getStatus()
Returns the status of this task

Returns:
The integer value representing the status of the task.

getMessages

public java.util.Enumeration getMessages()
Returns the error messages attached to this task.

Returns:
All of the error/warning messages.

getMessage

public java.lang.String getMessage()
Returns the concatenation of the error messages attached to this task.

Returns:
All of the error/warning messages concatenated together

getAuthElement

public Element getAuthElement(java.lang.String key)
Returns the authentication map element associated with a specified instance key. The instance key usually comes from an INSTANCE parameter on an ACT or OBJ webject.

Parameters:
key - the instance key of the element to find
Returns:
Element authentication map element, or null if instance not found in the authentication map

getWebject

public Webject getWebject()
Returns the webject that this task wraps.

Returns:
This task's webject.

setInputStream

public void setInputStream(IeMultipartInputStream in)
Sets the input stream to be used by this task.

Parameters:
in - the input stream

getInputStream

public IeMultipartInputStream getInputStream()
Returns the input stream currently assigned to this task.

Returns:
The input stream assigned to this task, or null if no such input stream is currently assigned.

getMimeInputStream

public IeMultipartInputStream getMimeInputStream()
Deprecated. use getInputStream instead

Returns the MIME input stream currently assigned to this task.

Returns:
The MIME input stream assigned to this task, or null if no such input stream is currently assigned.

setOutputStream

public void setOutputStream(IeMultipartOutputStream out)
Sets the output stream to be used by this task.

Parameters:
out - the output stream

getOutputStream

public IeMultipartOutputStream getOutputStream()
Returns the output stream currently assigned to this task.

Returns:
The output stream assigned to this task

setWebject

public void setWebject(Webject webject)
Sets the webject that this task wraps. Normally, this is the webject that this task will execute.

Parameters:
webject - The webject to be wrapped in this task.

getName

public java.lang.String getName()
Returns the name of this task.

Returns:
The task's current name.

setName

public void setName(java.lang.String name)
Sets the name of this task.

Parameters:
name - The task's new name.

setPassword

public void setPassword(java.lang.String pwd)
Sets the password of this task.

Parameters:
pwd - The task's new password.

getPassword

public java.lang.String getPassword()
Returns the password currently assigned to this task.

Returns:
The task's current password.

setUserName

public void setUserName(java.lang.String name)
Sets the user name of this task.

Parameters:
name - The task's new user name.

getUserName

public java.lang.String getUserName()
Returns the user name currently assigned to this task.

Returns:
The task's current user name.

setDesc

public void setDesc(java.lang.String desc)
Sets the description of this task.

Parameters:
desc - The task's new description.

getDesc

public java.lang.String getDesc()
Returns the description currently assigned to this task.

Returns:
The task's current description.

getType

public java.lang.String getType()
Returns the type of this task.

Returns:
The task's current type.

setType

public void setType(java.lang.String type)
Sets the type of this task.

Parameters:
type - The task's new type.

getSource

public java.lang.String getSource()
Returns the source currently assigned to this task.

Returns:
The task's current source string.

setSource

public void setSource(java.lang.String source)
Sets the source for this task.

Parameters:
source - The task's new source string.

getContextGroup

public Group getContextGroup(java.lang.String name)
Returns a named context group contained within this task.

Parameters:
name - The name of the desired context group.
Returns:
The named context group, or null if the group is not found in the task.

clearInput

public void clearInput()
Deprecated. 

Removes all input groups from this task.


removeInput

public void removeInput(Group grp)
Deprecated. 

Removes an input group from this task.

Parameters:
grp - The group of objects to be removed.

removeVdb

public void removeVdb(Group grp)
Removes a VDB group from this task.

Parameters:
grp - The group of objects to be removed.

addInput

public void addInput(Group grp)
Deprecated. 

Adds an input group to this task.

Parameters:
grp - A group of objects for input to this task.

addVdb

public void addVdb(Group grp)
Adds a VDB group to this task. If the group already exists, it is replaced.

Parameters:
grp - The group to add.

getGroupIn

public Group getGroupIn()
Returns the default input group for this task.

Returns:
The default input group.

getGroupIn

public Group getGroupIn(java.lang.String name)
Returns a named input group for this task.

Parameters:
name - The name of the desired input group.
Returns:
The named input group, or null if the group is not found in the task.

getVdbIn

public Group getVdbIn()
Returns the default VDB group for this task.

Returns:
The default VDB group.

getVdbIn

public Group getVdbIn(java.lang.String name)
Returns a named VDB group contained within this task.

Parameters:
name - The name of the desired VDB group.
Returns:
The named VDB group, or null if the group is not found in this task.

getInputGroups

public java.util.Enumeration getInputGroups()
Returns all input groups contained within this task.

Returns:
The input groups.

addOutput

public void addOutput(java.lang.String data)
Deprecated. 

Adds an output string to this task.

Parameters:
data - The string to add to the output of this task.

addVdb

public void addVdb(java.lang.String data)
Adds an output string to this task.

Parameters:
data - The string to add to the output of this task.

addOutput

public void addOutput(Group grp)
Deprecated. 

Adds an output group to this task.

Parameters:
grp - A group of objects to be added to the output of this task.

getGroupOut

public Group getGroupOut()
Returns the default output group from this task.

Returns:
The default output group.

getGroupOut

public Group getGroupOut(java.lang.String name)
Returns a named output group contained within this task.

Parameters:
name - The name of the desired output group.
Returns:
The named output group, or null if the group is not found within this task.

getOutputGroups

public java.util.Enumeration getOutputGroups()
Returns all output groups contained within this task.

Returns:
The output groups.

bindParams

public Webject bindParams()
Binds parameters to the webject wrapped in this task. During the binding process, parameter values are evaluated and substitution is performed.

Returns:
A new webject derived from the wrapped one, but with evaluated parameters bound to it. This new webject replaces the original unbound one as the webject wrapped in this task.

bindParams

public Webject bindParams(Webject webject)
Binds parameters to a specific webject. During the binding process, parameter values are evaluated and substitution is performed.

Parameters:
webject - The webject to which parameters will be bound.
Returns:
A new webject derived from the specified one, but with evaluated parameters bound to it.

subVariables

public java.util.Enumeration subVariables(java.lang.String in)

getVariables

public java.util.Enumeration getVariables(java.lang.String lex,
                                          Param param)

getContext

public IeCollection getContext()
Returns a collection containing the context groups of this task.

Returns:
The collection containing the context groups.

getContext

public IeGroup getContext(java.lang.String name)
Returns a named context group contained within this task.

Returns:
The named context group, or null if the group is not found within this task.

setContext

public void setContext(IeCollection collection)
Sets the collection containing the context groups for this task. This replaces any previous collection that might have been established as the context collection.

Parameters:
collection - the new collection to be established as the one containing context groups for this task.

setInput

public void setInput(IeCollection collection)
Deprecated. 

Sets the collection containing the input groups for this task. This replaces any previous collection that might have been established as the input collection.

Parameters:
collection - the new collection to be established as the one containing input groups for this task.

setVdb

public void setVdb(IeCollection collection)
Sets the collection containing the VDB groups for this task. This replaces any previous collection that might have been established as the VDB collection.

Parameters:
collection - the new collection to be established as the one containing VDB groups for this task.

addContext

public void addContext(Group grp)
Adds a context group to this task.

Parameters:
grp - The context group (FORM, SERVER, etc.)

getInputs

public java.util.Enumeration getInputs()
Deprecated. 

Returns the names of all input groups contained within this task.

Returns:
The names of all input groups in the task.

getInput

public IeCollection getInput()
Deprecated. 

Returns the collection containing input groups for the task.

Returns:
The collection containing the task's current input groups.

getInput

public Group getInput(java.lang.String name)
Deprecated. 

Returns a named group from the collection containing input groups for the task.

Parameters:
name - The name of the input group desired.
Returns:
The named input group, or null if the group is not found in the task.

getOutput

public IeCollection getOutput()
Deprecated. 

Returns the collection containing output groups for the task.

Returns:
The collection containing the task's current output groups.

getOutput

public Group getOutput(java.lang.String name)
Deprecated. 

Returns a named group from the collection containing output groups for the task.

Parameters:
name - The name of the output group desired.
Returns:
The named output group, or null if the group is not found in the task.

getVdb

public IeCollection getVdb()
Returns the collection containing VDB groups for the task.

Returns:
The collection containing the task's current VDB groups.

getVdb

public Group getVdb(java.lang.String name)
Returns a named group from the collection containing VDB groups for the task.

Parameters:
name - The name of the VDB group desired.
Returns:
The named VDB group, or null if the group is not found in the task.

deepClone

public Task deepClone()
Creates a deep copy of this task.

Returns:
The cloned task.

printTree

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