com.ibm.task.clientmodel.bean

Class WorkItemBean

  1. java.lang.Object
  2. extended bycom.ibm.task.clientmodel.bean.WorkItemBean

  1. public class WorkItemBean
  2. extends java.lang.Object

Stores the properties of a work item retrieved from a QueryResultSet and adds metadata for national language support and converters.

A work item represents a relationship between a person or group of persons and an object, typically an activity or task instance. The relationship is described by attributes such as the type of the associated object and the reason why the object is assigned.

A WorkItemBean object can be instantiated from a QueryResultSet object.
Only the following properties are loaded from the query result set:

If the property is not found in the query result set, the property remains empty. Accessing an empty property requires the bean to load the missing information from the server.

Use the static method getLabel(String, Locale) to retrieve the localized label for a property. Use the static method getConverter(String) to retrieve a converter for a property. The return value may be null because converters are optional.

See Also:
WorkItem, QueryResultSet

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
ASSIGNEDTOEVERYBODY_PROPERTY
Use the property name to determine labels and converters for the assignedToEverybody property.
  1. static
  2. java.lang.String
COPYRIGHT
(C) Copyright IBM Corporation 2005, 2007.
  1. static
  2. java.lang.String
CREATIONIME_PROPERTY
Deprecated. use CREATIONTIME_PROPERTY
  1. static
  2. java.lang.String
CREATIONTIME_PROPERTY
Use the property name to determine labels and converters for the creationTime property.
  1. static
  2. java.lang.String
GROUPNAME_PROPERTY
Use the property name to determine labels and converters for the groupName property.
  1. static
  2. java.lang.String
ID_PROPERTY
Use the property name to determine labels and converters for the ID property.
  1. static
  2. java.lang.String
OBJECTID_PROPERTY
Use the property name to determine labels and converters for the objectID property.
  1. static
  2. java.lang.String
OBJECTTYPE_PROPERTY
Use the property name to determine labels and converters for the objectType property.
  1. static
  2. java.lang.String
OWNER_PROPERTY
Use the property name to determine labels and converters for the owner property.
  1. static
  2. java.lang.String
REASON_PROPERTY
Use the property name to determine labels and converters for the reason property.
  1. static
  2. java.lang.String
TASKDISPLAYNAME_PROPERTY
Use the property name to determine labels and converters for the taskDisplayName property.
  1. static
  2. java.lang.String
TASKNAME_PROPERTY
Use the property name to determine labels and converters for the taskName property.

Constructor Summary

Constructor and Description
WorkItemBean(QueryResultSet resultSet,HTMConnection htmConnection)
Constructs a new WorkItemBean from a QueryResultSet.
WorkItemBean(QueryResultSet resultSet,HTMConnection htmConnection,java.util.Locale locale)
Constructs a new WorkItemBean from a QueryResultSet.

Method Summary

Modifier and Type Method and Description
  1. static
  2. SimpleConverter
getConverter(java.lang.String propertyName)
Returns the default converter for a given property.
  1. java.util.Calendar
getCreationTime()
Returns the creationTime property.
  1. java.lang.String
getGroupName()
Returns the groupName property.
  1. com.ibm.bpe.api.WIID
getID()
Returns the ID property.
  1. static
  2. java.lang.String
getLabel(java.lang.String propertyName)
Returns the resource bundle key for a property
  1. static
  2. java.lang.String
getLabel(java.lang.String propertyName,java.util.Locale locale)
Returns the label for a property from the resource bundle.
  1. OID
getObjectID()
Returns the objectID property.
  1. int
getObjectType()
Returns the objectType property.
  1. java.lang.String
getOwner()
Returns the owner property.
  1. int
getReason()
Returns the reason property.
  1. com.ibm.bpc.clientcore.util.LocalisedString
getTaskDisplayName()
Returns the taskDisplayName property.
  1. java.lang.String
getTaskDisplayName(java.util.Locale locale)
Returns the taskDisplayName property.
  1. java.lang.String
getTaskName()
Returns the taskName property.
  1. TKTID
getTaskTemplateID()
Returns the property tktid.
  1. boolean
isAssignedToEverybody()
Returns the assignedToEverybody property.
  1. static
  2. boolean
isValid(java.lang.String propertyName)
Checks wehther the property is valid.
  1. void
setAssignedToEverybody(boolean newAssignedToEverybody)
Sets the assignedToEverybody property.
  1. void
setCreationTime(java.util.Calendar newCreationTime)
Sets the creationTime property.
  1. void
setGroupName(java.lang.String newGroupName)
Sets the groupName property.
  1. void
setID(com.ibm.bpe.api.WIID newWorkitemID)
Sets the ID property.
  1. void
setLocalisedDisplayName(java.lang.String displayName,java.util.Locale locale)
Sets the taskDisplayName property.
  1. void
setObjectID(OID newObjectID)
Sets the objectID property.
  1. void
setObjectType(int newObjectType)
Sets the objectType property.
  1. void
setOwner(java.lang.String newOwner)
Sets the owner property.
  1. void
setReason(int newReason)
Sets the reason property.
  1. java.lang.String
toString()
Returns all properties in a printable format
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

  1. public static final java.lang.String COPYRIGHT
(C) Copyright IBM Corporation 2005, 2007.
See Also:

CREATIONTIME_PROPERTY

  1. public static final java.lang.String CREATIONTIME_PROPERTY
Use the property name to determine labels and converters for the creationTime property.
See Also:

CREATIONIME_PROPERTY

  1. public static final java.lang.String CREATIONIME_PROPERTY
Deprecated. use CREATIONTIME_PROPERTY
Use the property name to determine labels and converters for the creationTime property.
See Also:

ID_PROPERTY

  1. public static final java.lang.String ID_PROPERTY
Use the property name to determine labels and converters for the ID property.
See Also:

OBJECTID_PROPERTY

  1. public static final java.lang.String OBJECTID_PROPERTY
Use the property name to determine labels and converters for the objectID property.
See Also:

OBJECTTYPE_PROPERTY

  1. public static final java.lang.String OBJECTTYPE_PROPERTY
Use the property name to determine labels and converters for the objectType property.
See Also:

OWNER_PROPERTY

  1. public static final java.lang.String OWNER_PROPERTY
Use the property name to determine labels and converters for the owner property.
See Also:

REASON_PROPERTY

  1. public static final java.lang.String REASON_PROPERTY
Use the property name to determine labels and converters for the reason property.
See Also:

ASSIGNEDTOEVERYBODY_PROPERTY

  1. public static final java.lang.String ASSIGNEDTOEVERYBODY_PROPERTY
Use the property name to determine labels and converters for the assignedToEverybody property.
See Also:

TASKNAME_PROPERTY

  1. public static final java.lang.String TASKNAME_PROPERTY
Use the property name to determine labels and converters for the taskName property.
See Also:

TASKDISPLAYNAME_PROPERTY

  1. public static final java.lang.String TASKDISPLAYNAME_PROPERTY
Use the property name to determine labels and converters for the taskDisplayName property.
See Also:

GROUPNAME_PROPERTY

  1. public static final java.lang.String GROUPNAME_PROPERTY
Use the property name to determine labels and converters for the groupName property.
See Also:

Constructor Detail

WorkItemBean

  1. public WorkItemBean(QueryResultSet resultSet,
  2. HTMConnection htmConnection)
Constructs a new WorkItemBean from a QueryResultSet.
Parameters:
resultSet - The result object of a query.
htmConnection - The connection to the HumanTaskManagerService API.

WorkItemBean

  1. public WorkItemBean(QueryResultSet resultSet,
  2. HTMConnection htmConnection,
  3. java.util.Locale locale)
Constructs a new WorkItemBean from a QueryResultSet.
Parameters:
resultSet - The result object of a query.
htmConnection - The connection to the HumanTaskManagerService API.
locale - The locale of the locale dependant properties.

Method Detail

getConverter

  1. public static SimpleConverter getConverter( java.lang.String propertyName)
Returns the default converter for a given property.
Parameters:
propertyName - The name of the property.
Returns:
The converter instance if one has been registered with propertyName, null otherwise.

getLabel

  1. public static java.lang.String getLabel( java.lang.String propertyName)
Returns the resource bundle key for a property
Parameters:
propertyName - The name of the property.
Returns:
The resource bundle key of the property.

getLabel

  1. public static java.lang.String getLabel( java.lang.String propertyName,
  2. java.util.Locale locale)
Returns the label for a property from the resource bundle. If no label is found in the resource bundle the resource bundle key for the property is returned.
Parameters:
propertyName - The name of the property.
locale - The locale.
Returns:
The label or the resource bundle key of the property.

isValid

  1. public static boolean isValid(java.lang.String propertyName)
Checks wehther the property is valid.
Parameters:
propertyName - The name of the property to be checked.
Returns:
True if the property name is a known property for an object of this class.

getTaskTemplateID

  1. public TKTID getTaskTemplateID( )
Returns the property tktid.
See Also:

getCreationTime

  1. public java.util.Calendar getCreationTime( )
Returns the creationTime property.
Returns:
the time of the creation

getID

  1. public com.ibm.bpe.api.WIID getID( )
Returns the ID property.
Returns:
the id of the work item

getObjectID

  1. public OID getObjectID()
Returns the objectID property.
Returns:
the id of the object

getObjectType

  1. public int getObjectType()
Returns the objectType property.
Returns:
the type of the object

setLocalisedDisplayName

  1. public void setLocalisedDisplayName( java.lang.String displayName,
  2. java.util.Locale locale)
Sets the taskDisplayName property.
See Also:

getTaskDisplayName

  1. public com.ibm.bpc.clientcore.util.LocalisedString getTaskDisplayName( )
Returns the taskDisplayName property.
Returns:
the display name of the task

getTaskDisplayName

  1. public java.lang.String getTaskDisplayName( java.util.Locale locale)
Returns the taskDisplayName property.
Parameters:
locale -
Returns:
the display name of the task

getTaskName

  1. public java.lang.String getTaskName( )
Returns the taskName property.
Returns:
the name of the task

getOwner

  1. public java.lang.String getOwner( )
Returns the owner property.
Returns:
the owener of the work item

getReason

  1. public int getReason()
Returns the reason property.
Returns:
the reason of this work item

isAssignedToEverybody

  1. public boolean isAssignedToEverybody( )
Returns the assignedToEverybody property.
Returns:
true if this work item is assigend to everybody; false otherwise

getGroupName

  1. public java.lang.String getGroupName( )
Returns the groupName property.
Returns:
the ID of the object

setGroupName

  1. public void setGroupName(java.lang.String newGroupName)
Sets the groupName property.
Parameters:
newGroupName - the name of the group of the work item

setAssignedToEverybody

  1. public void setAssignedToEverybody( boolean newAssignedToEverybody)
Sets the assignedToEverybody property.
Parameters:
newAssignedToEverybody - true if the work item is to be assigned to everybody

setCreationTime

  1. public void setCreationTime(java.util.Calendar newCreationTime)
Sets the creationTime property.
Parameters:
newCreationTime - the time of the object's creation

setID

  1. public void setID(com.ibm.bpe.api.WIID newWorkitemID)
Sets the ID property.
Parameters:
newWorkitemID - the ID of the work item

setObjectID

  1. public void setObjectID(OID newObjectID)
Sets the objectID property.
Parameters:
newObjectID - the object ID

setObjectType

  1. public void setObjectType(int newObjectType)
Sets the objectType property.
Parameters:
newObjectType - the type of the work item

setOwner

  1. public void setOwner(java.lang.String newOwner)
Sets the owner property.
Parameters:
newOwner - the owner of the work item

setReason

  1. public void setReason(int newReason)
Sets the reason property.
Parameters:
newReason - the reason of this work item

toString

  1. public java.lang.String toString( )
Returns all properties in a printable format
Overrides:
toString in class java.lang.Object
Returns:
the attributes in a printable format