com.netscape.pm.model
Interface IProcessInstancePK


public interface IProcessInstancePK

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

  1. the key contains the instance's instance id, which is sufficient for uniquely identifying any instance created within the current cluster,
  2. the key specifies whether the process instance 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 ProcessInstancePKFactory.

See Also:
IProcessInstance, IPMApplication, ProcessInstancePKFactory

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

Method Detail

setEditable

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

isEditable

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

getInstanceId

public long getInstanceId()
Returns the process instance's id number. This value is sufficient for uniquely identifying any instance created within the current cluster.
Returns:
the process instance's id number.
Since:
PAE 4.0

getClusterName

public java.lang.String getClusterName()
Returns the name of the cluster to which this instance belongs to.
Returns:
the name of the cluster this instance belongs to.
Since:
iPM 6.5
See Also:
IPMCluster

getApplicationName

public java.lang.String getApplicationName()
Returns the common name of the application this instance belongs to. Note: this method may return null as the application name if the process instance key does not represent a subprocess instance. Users should not rely upon this method to fetch the application name, please use the getApplicationName method off the IProcessInstance interface instead.
Returns:
the name of the application this instance belongs to.
Since:
PAE 4.0
See Also:
IPMApplication

toString

public java.lang.String toString()
Returns the value of the process instance's id number as a string.
Overrides:
toString in class java.lang.Object
Returns:
the value of the process instance's id number as a string.
Since:
PAE 4.0
See Also:
getInstanceId()

toSwapURL

public java.lang.String toSwapURL()
Returns the value of the process instance key in an internal format. This method is used internally by the engine to serialize the contents of a process instance key so it can be used as a means of identifying a child process instance.

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 process instance key in an internal format.
Since:
PM 6.0

dumpState

public java.util.Hashtable dumpState()
Returns the properties of the process instance 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 process instance key object.
Returns:
the properties of the process instance key
Since:
PM 6.0