com.informatica.powercenter.sdk.mapfwk.core
Class Task

java.lang.Object
  extended by com.informatica.powercenter.sdk.mapfwk.core.Task
Direct Known Subclasses:
Assignment, Command, Control, Decision, EMail, Session, Timer

public abstract class Task
extends java.lang.Object

Class to represent a Task.


Field Summary
static java.lang.String FAIL_PARENT_IF_INSTANCE_DIDNOT_RUN
           
static java.lang.String FAIL_PARENT_IF_INSTANCE_FAILS
           
static java.lang.String NO_OPTION
           
static java.lang.String REUSABLE
           
static java.lang.String TREAT_INPUT_LINK_AS_AND
           
static java.lang.String YES_OPTION
           
 
Constructor Summary
Task()
          Default constructor
Task(int type, java.lang.String name, java.lang.String busName, java.lang.String desc)
          Initialize the object with type, name, business name and description
 
Method Summary
 void connectToTask(Task task)
          Connect to the task that is passed to it as argument.
 void connectToTask(Task task, java.lang.String expression)
          Connect to the task that is passed to it as argument.
 void deleteNameValuePair(java.lang.String propertyName)
          Delete a name value pair
 java.util.Vector getAllConnectedTasks()
          Returns all the tasks that this task has outgoing link to.
 java.util.HashMap getAllConnectedTasksAndExpressions()
          Returns all the tasks along with the expression that this task has outgoing link to.
 java.util.Vector getAttributes()
          Get the collection of attributes
 java.lang.String getBusinessName()
          Get the business name
 java.lang.String getConflictResolution()
           
 java.lang.String getDescription()
          Get the description
 java.util.Vector getMetaExtensions()
          Get the collection of meta extensions
 java.lang.String getName()
          Get the name
 java.lang.String[] getNamesOfValuePairs()
          Get the names of the name-value pairs
 java.util.Properties getNameValuePairs()
          Get the name-values pairs of the task
 TaskProperties getProperties()
          Get the collection of properties
 java.lang.String getTaskInstanceProperty(java.lang.String propertyName)
          Get the Task instance property.Use Task.FAIL_PARENT_IF_INSTANCE_FAILS,Task.REUSABLE, Task.TREAT_INPUT_LINK_AS_AND, Task.FAIL_PARENT_IF_INSTANCE_DIDNOT_RUN as property names
 int getType()
          Get the type of task
 java.lang.String getValueOfNameValuePair(java.lang.String propertyName)
          Get value of a name value pair
 boolean isModified()
          Test if the task has been set as modified
 void setAttributes(java.util.Vector attributes)
          Set the collection of attributes
 void setBusinessName(java.lang.String businessName)
          Set the business name
 void setConflictResolution(java.lang.String conflictResolution)
           
 void setDescription(java.lang.String description)
          Set the description
 void setMetaExtensions(java.util.Vector metaExtensions)
          Set the collection of meta extensions
 void setModified(boolean isModified)
          Set the task as modified
 void setName(java.lang.String name)
          Set the name
 void setNameValuePair(java.lang.String propertyName, java.lang.String value)
          Set nam-value pair.
 void setTaskInstanceProperty(java.lang.String propertyName, java.lang.String propertyValue)
          Set Task instance property.
 void setType(int type)
          Set the task type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAIL_PARENT_IF_INSTANCE_FAILS

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

REUSABLE

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

TREAT_INPUT_LINK_AS_AND

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

FAIL_PARENT_IF_INSTANCE_DIDNOT_RUN

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

YES_OPTION

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

NO_OPTION

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

Task

public Task()
Default constructor


Task

public Task(int type,
            java.lang.String name,
            java.lang.String busName,
            java.lang.String desc)
Initialize the object with type, name, business name and description

Parameters:
type - task type
name - name
busName - business name
desc - description
Method Detail

connectToTask

public void connectToTask(Task task)
Connect to the task that is passed to it as argument. If the current task is t1 and the task passed as arg is t2, it will create a link of the form t1 -> t2.

Parameters:
task - Task to connect to.

connectToTask

public void connectToTask(Task task,
                          java.lang.String expression)
Connect to the task that is passed to it as argument. If the current task is t1 and the task passed as arg is t2, it will create a link of the form t1 -> t2. The expression will be assigned to the link and t2 would be executed only if the expression evaluates to true. The expression is not validated and it is left to the user to ensure its validity.

Parameters:
task - Task to connect to.
expression - The expression to be assigned to the link

getAllConnectedTasks

public java.util.Vector getAllConnectedTasks()
Returns all the tasks that this task has outgoing link to. This doesnot keep track of and return incoming links to this task.

Returns:
Vector

getAllConnectedTasksAndExpressions

public java.util.HashMap getAllConnectedTasksAndExpressions()
Returns all the tasks along with the expression that this task has outgoing link to. This doesnot keep track of and return incoming links to this task.

Returns:
HashMap

setTaskInstanceProperty

public void setTaskInstanceProperty(java.lang.String propertyName,
                                    java.lang.String propertyValue)
Set Task instance property. Use Task.FAIL_PARENT_IF_INSTANCE_FAILS,Task.REUSABLE, Task.TREAT_INPUT_LINK_AS_AND, Task.FAIL_PARENT_IF_INSTANCE_DIDNOT_RUN as property names and Task.YES_OPTION or Task.NO_OPTION as property value.

Parameters:
propertyName - name of the property
propertyValue - value of the property

getTaskInstanceProperty

public java.lang.String getTaskInstanceProperty(java.lang.String propertyName)
Get the Task instance property.Use Task.FAIL_PARENT_IF_INSTANCE_FAILS,Task.REUSABLE, Task.TREAT_INPUT_LINK_AS_AND, Task.FAIL_PARENT_IF_INSTANCE_DIDNOT_RUN as property names

Parameters:
propertyName - name of the property
Returns:
String

getNameValuePairs

public java.util.Properties getNameValuePairs()
Get the name-values pairs of the task

Returns:
Properties

getNamesOfValuePairs

public java.lang.String[] getNamesOfValuePairs()
Get the names of the name-value pairs

Returns:
String[]

getValueOfNameValuePair

public java.lang.String getValueOfNameValuePair(java.lang.String propertyName)
Get value of a name value pair

Parameters:
propertyName - propertyName
Returns:
String

deleteNameValuePair

public void deleteNameValuePair(java.lang.String propertyName)
Delete a name value pair

Parameters:
propertyName - propertyName to be deleted

setNameValuePair

public void setNameValuePair(java.lang.String propertyName,
                             java.lang.String value)
Set nam-value pair.

Parameters:
propertyName - name to be set
value - Value to be given to the property

getType

public int getType()
Get the type of task

Returns:
Returns the m_iType.

setType

public void setType(int type)
Set the task type

Parameters:
type - The type to set.

getBusinessName

public java.lang.String getBusinessName()
Get the business name

Returns:
Returns the m_strBusinessName.

setBusinessName

public void setBusinessName(java.lang.String businessName)
Set the business name

Parameters:
businessName - The business Name to set.

getDescription

public java.lang.String getDescription()
Get the description

Returns:
Returns the description.

setDescription

public void setDescription(java.lang.String description)
Set the description

Parameters:
description - The description to set.

getName

public java.lang.String getName()
Get the name

Returns:
Returns the name.

setName

public void setName(java.lang.String name)
Set the name

Parameters:
name - The name to set.

getAttributes

public java.util.Vector getAttributes()
Get the collection of attributes

Returns:
Returns the attributes collection.

setAttributes

public void setAttributes(java.util.Vector attributes)
Set the collection of attributes

Parameters:
attributes - The attributes to set.

getMetaExtensions

public java.util.Vector getMetaExtensions()
Get the collection of meta extensions

Returns:
Returns the MetaExtensions.

setMetaExtensions

public void setMetaExtensions(java.util.Vector metaExtensions)
Set the collection of meta extensions

Parameters:
metaExtensions - The m_objMetaExtensions to set.

getProperties

public TaskProperties getProperties()
Get the collection of properties

Returns:
Returns the m_objProperties.

getConflictResolution

public java.lang.String getConflictResolution()
Returns:
Returns the conflictResolution.

setConflictResolution

public void setConflictResolution(java.lang.String conflictResolution)
Parameters:
conflictResolution - The conflictResolution to set.

isModified

public boolean isModified()
Test if the task has been set as modified

Returns:
boolean

setModified

public void setModified(boolean isModified)
Set the task as modified

Parameters:
isModified - isModified