com.ibm.task.clientmodel.bean

Class WorkItemBean

  • java.lang.Object
    • com.ibm.task.clientmodel.bean.WorkItemBean


  • public class WorkItemBean
    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:

    • owner
    • objectType
    • objectID
    • creationTime
    • ID
    • reason
    • taskName
    • assignedToEverybody
    • groupName
    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

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

      Methods 
      Modifier and Type Method and Description
      static SimpleConverter getConverter(java.lang.String propertyName)
      Returns the default converter for a given property.
      java.util.Calendar getCreationTime()
      Returns the creationTime property.
      java.lang.String getGroupName()
      Returns the groupName property.
      com.ibm.bpe.api.WIID getID()
      Returns the ID property.
      static java.lang.String getLabel(java.lang.String propertyName)
      Returns the resource bundle key for a property
      static java.lang.String getLabel(java.lang.String propertyName, java.util.Locale locale)
      Returns the label for a property from the resource bundle.
      OID getObjectID()
      Returns the objectID property.
      int getObjectType()
      Returns the objectType property.
      java.lang.String getOwner()
      Returns the owner property.
      int getReason()
      Returns the reason property.
      com.ibm.bpc.clientcore.util.LocalisedString getTaskDisplayName()
      Returns the taskDisplayName property.
      java.lang.String getTaskDisplayName(java.util.Locale locale)
      Returns the taskDisplayName property.
      java.lang.String getTaskName()
      Returns the taskName property.
      TKTID getTaskTemplateID()
      Returns the property tktid.
      boolean isAssignedToEverybody()
      Returns the assignedToEverybody property.
      static boolean isValid(java.lang.String propertyName)
      Checks wehther the property is valid.
      void setAssignedToEverybody(boolean newAssignedToEverybody)
      Sets the assignedToEverybody property.
      void setCreationTime(java.util.Calendar newCreationTime)
      Sets the creationTime property.
      void setGroupName(java.lang.String newGroupName)
      Sets the groupName property.
      void setID(com.ibm.bpe.api.WIID newWorkitemID)
      Sets the ID property.
      void setLocalisedDisplayName(java.lang.String displayName, java.util.Locale locale)
      Sets the taskDisplayName property.
      void setObjectID(OID newObjectID)
      Sets the objectID property.
      void setObjectType(int newObjectType)
      Sets the objectType property.
      void setOwner(java.lang.String newOwner)
      Sets the owner property.
      void setReason(int newReason)
      Sets the reason property.
      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

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        (C) Copyright IBM Corporation 2005, 2007.
        See Also:
        Constant Field Values
      • CREATIONTIME_PROPERTY

        public static final java.lang.String CREATIONTIME_PROPERTY
        Use the property name to determine labels and converters for the creationTime property.
        See Also:
        Constant Field Values
      • CREATIONIME_PROPERTY

        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:
        Constant Field Values
      • ID_PROPERTY

        public static final java.lang.String ID_PROPERTY
        Use the property name to determine labels and converters for the ID property.
        See Also:
        Constant Field Values
      • OBJECTID_PROPERTY

        public static final java.lang.String OBJECTID_PROPERTY
        Use the property name to determine labels and converters for the objectID property.
        See Also:
        Constant Field Values
      • OBJECTTYPE_PROPERTY

        public static final java.lang.String OBJECTTYPE_PROPERTY
        Use the property name to determine labels and converters for the objectType property.
        See Also:
        Constant Field Values
      • OWNER_PROPERTY

        public static final java.lang.String OWNER_PROPERTY
        Use the property name to determine labels and converters for the owner property.
        See Also:
        Constant Field Values
      • REASON_PROPERTY

        public static final java.lang.String REASON_PROPERTY
        Use the property name to determine labels and converters for the reason property.
        See Also:
        Constant Field Values
      • ASSIGNEDTOEVERYBODY_PROPERTY

        public static final java.lang.String ASSIGNEDTOEVERYBODY_PROPERTY
        Use the property name to determine labels and converters for the assignedToEverybody property.
        See Also:
        Constant Field Values
      • TASKNAME_PROPERTY

        public static final java.lang.String TASKNAME_PROPERTY
        Use the property name to determine labels and converters for the taskName property.
        See Also:
        Constant Field Values
      • TASKDISPLAYNAME_PROPERTY

        public static final java.lang.String TASKDISPLAYNAME_PROPERTY
        Use the property name to determine labels and converters for the taskDisplayName property.
        See Also:
        Constant Field Values
      • GROUPNAME_PROPERTY

        public static final java.lang.String GROUPNAME_PROPERTY
        Use the property name to determine labels and converters for the groupName property.
        See Also:
        Constant Field Values
    • Constructor Detail

      • WorkItemBean

        public WorkItemBean(QueryResultSet resultSet,
                    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

        public WorkItemBean(QueryResultSet resultSet,
                    HTMConnection htmConnection,
                    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

        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

        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

        public static java.lang.String getLabel(java.lang.String propertyName,
                                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

        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.
      • getCreationTime

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        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
IBM Business Process ManagerTM
Release 8