com.netscape.pm.model
Interface IWorkItemPK


public interface IWorkItemPK

Defines the interface for a work item's primary key. The key is responsible for performing two functions:

  1. the key contains the work item's instance id, fork id and node name; this 3-tuple is sufficient for uniquely identifying any work item created within the current cluster,
  2. the key specifies whether the work item is to be loaded for update, or whether it should be loaded for read only access.

The key class cannot be instantiated directly, rather it must be created from the factory class WorkItemPKFactory.

See Also:
IWorkItem, IPMApplication, WorkItemPKFactory

Method Summary
 java.util.Hashtable dumpState()
          Returns the properties of the work item key in a hashtable.
 java.lang.String getApplicationName()
          Returns the common name of the application this work item belongs to.
 java.lang.String getClusterName()
          Returns the name of the cluster this work item's belongs to.
 java.lang.String getForkId()
          Returns the work item's fork id.
 long getInstanceId()
          Returns the work item's instance id number.
 java.lang.String getNodeName()
          Returns the work item's node name.
 boolean isEditable()
          Returns true if this key has been set to load the work item for update.
 void setEditable(boolean mode)
          Sets the mode in which the work item should be loaded.
 java.lang.String toString()
          Returns the value of the work item's 3-tuple key (instance id, fork id and node name) as a string.
 java.lang.String toSwapURL()
          Returns the value of the work item key in an internal format.
 

Method Detail

setEditable

public void setEditable(boolean mode)
Sets the mode in which the work item should be loaded.
true
load work item for update
false
load work item for read only
The key is set to not editable (that is, false) by default.
Parameters:
mode - true if loading work item for update; otherwise false if loading work item for read only
Since:
PAE 4.0
See Also:
IWorkItem.release(boolean)

isEditable

public boolean isEditable()
Returns true if this key has been set to load the work item for update.
Returns:
true if the key has been set to load the work item for update; false otherwise.
Since:
PAE 4.0
See Also:
setEditable(boolean)

getInstanceId

public long getInstanceId()
Returns the work item's instance id number.
Returns:
the work item's instance id number.
Since:
PAE 4.0

getClusterName

public java.lang.String getClusterName()
Returns the name of the cluster this work item's belongs to.
Returns:
name of the cluster.
Since:
iPM 6.5

getForkId

public java.lang.String getForkId()
Returns the work item's fork id.
Returns:
the work item's fork id.
Since:
PAE 4.0

getNodeName

public java.lang.String getNodeName()
Returns the work item's node name.
Returns:
the work item's node name.
Since:
PAE 4.0

getApplicationName

public java.lang.String getApplicationName()
Returns the common name of the application this work item belongs to. Note: this method may return null as the application name if the work item key does not represent a parent work item (the work item that is positioned at the subprocess node that is responsible for spawning the subprocess instance is referred to as the parent work item). Users should not rely upon this method to fetch the application name, please use the getApplicationName method off the IWorkItem interface instead.
Returns:
the name of the application this work item belongs to.
Since:
PAE 4.0
See Also:
IPMApplication

toString

public java.lang.String toString()
Returns the value of the work item's 3-tuple key (instance id, fork id and node name) as a string.
Overrides:
toString in class java.lang.Object
Returns:
the value of the work item's key as a string.
Since:
PAE 4.0
See Also:
getInstanceId(), getForkId(), getNodeName()

toSwapURL

public java.lang.String toSwapURL()
Returns the value of the work item key in an internal format. This method is used internally by the engine to serialize the contents of a work item key so it can be used as a means of identifying a parent work item (the work item that is positioned at the subprocess node that is responsible for spawning the subprocess instance is referred to as the parent work item).

Users should not rely upon the format of the string returned by this method in future releases of this class.

Returns:
the value of the work item key in an internal format.
Since:
PM 6.0

dumpState

public java.util.Hashtable dumpState()
Returns the properties of the work item key in a hashtable. This method was designed to be used as a debugging tool; it presents users with a simple means of checking the current state of a work item key object.
Returns:
the properties of the work item key
Since:
PM 6.0