|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.netscape.pm.model.ProcessInstancePKFactory
Creates a process instance key object, used for obtaining a handle to an
IProcessInstance
object. The method
findProcessInstance
off the IPMApplication
interface is the only means of obtaining an IProcessInstance
object using an IProcessInstancePK
object.
public void doGet( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { res.setContentType( "text/html; charset=ISO-8859-4" ); javax.naming.Context cxt = new javax.naming.InitialContext(); String jndiName = "java:comp/env/" + IPMApplication.DEFAULT_JNDI_ROOT + "/" + localName; IPMApplicationHome home = (IPMApplicationHome) cxt.lookup( jndiName ); IPMApplication app = home.create(); long instanceId = Long.parseLong( req.getParameter( IUIParameters.INSTANCE_ID ) ); IProcessInstancePK pk = ProcessInstancePKFactory.create( instanceId ); pk.setEditable( true ); IProcessInstance pi = app.findProcessInstance( pk ); pi.setData( "name", req.getParameter( "name" ) ); pi.save(); pi.release( true ); res.getWriter().flush(); res.getWriter().close(); }
IProcessInstancePK
,
IPMApplication
Constructor Summary | |
ProcessInstancePKFactory()
|
Method Summary | |
static IProcessInstancePK |
create(long instanceId)
Creates an instance of a process instance key from an instance id. |
static IProcessInstancePK |
create(long instanceId,
java.lang.String appName)
Creates an instance of a process instance key from an instance id and an application name. |
static IProcessInstancePK |
create(long instanceId,
java.lang.String clusterName,
java.lang.String appName)
Creates an instance of a process instance key from an instance id, cluster name and an application name. |
protected static IProcessInstancePK |
create(java.lang.String swapURL)
Creates an instance of a process instance key from a swap URL string. |
protected static IProcessInstancePK |
create(java.lang.String swapURL,
java.lang.String clusterName)
Creates an instance of a process instance key from a swap URL string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProcessInstancePKFactory()
Method Detail |
public static IProcessInstancePK create(long instanceId)
Keys created via this method only differ from those created via the
create( long, String )
method by the value of the
application name member (this method will not set the application
name). When accessing subprocess instances, the engine requires
the name of the child application. Users will not require the use
of the create( long, String )
factory method and should
concentrate on this method instead.
instanceId
- the instance id of the process instancecreate( long, String )
,
IProcessInstancePK
public static IProcessInstancePK create(long instanceId, java.lang.String appName)
Keys created via this method only differ from those created via the
create( long )
method by the value of the application
name member. When accessing subprocess instances, the engine requires
the name of the child application. Users will not require the use
of this factory method and should use the create( long )
version of this method instead.
instanceId
- the instance id of the process instance to create
a key forappName
- the name of the application the instance belongs tocreate( long )
,
IProcessInstancePK
public static IProcessInstancePK create(long instanceId, java.lang.String clusterName, java.lang.String appName)
Keys created via this method only differ from those created via the
create( long )
method by the value of the application
name member. When accessing subprocess instances, the engine requires
the name of the child application. Users will not require the use
of this factory method and should use the create( long )
version of this method instead.
instanceId
- the instance id of the process instance to create
a key forclusterName
- Name of the cluster to which this application belongs toappName
- the name of the application the instance belongs tocreate( long )
,
IProcessInstancePK
protected static IProcessInstancePK create(java.lang.String swapURL) throws PMException
create( long )
version of this method instead.swapURL
- the value of the process instance key in an
internal formatPMException
- if the value of swapURL does not match the
expected format.IProcessInstancePK
protected static IProcessInstancePK create(java.lang.String swapURL, java.lang.String clusterName) throws PMException
create( long )
version of this method instead.swapURL
- the value of the process instance key in an
internal formatclusterName
- name of the clusterPMException
- if the value of swapURL does not match the
expected format.IProcessInstancePK
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |