|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.netscape.pm.model.WorkItemPKFactory
Creates a work item key object, used for obtaining a handle to an
IWorkItem
object. The method findWorkItem
off the IPMApplication
interface is the only means
of obtaining an IWorkItem
object using an
IWorkItemPK
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 ) ); String forkId = req.getParameter( IUIParameters.FORK_ID ); String nodeName = req.getParameter( IUIParameters.NODE_NAME ); IWorkItemPK pk = WorkItemPKFactory.create( instanceId, forkId, nodeName ); pk.setEditable( true ); IWorkItem wi = app.findWorkItem( pk ); IProcessInstance pi = wi.getProcessInstance(); pi.setData( "name", req.getParameter( "name" ) ); wi.save(); wi.release( true ); res.getWriter().flush(); res.getWriter().close(); }
IWorkItemPK
,
IPMApplication
Constructor Summary | |
WorkItemPKFactory()
|
Method Summary | |
static IWorkItemPK |
create(long instanceId,
java.lang.String forkId,
java.lang.String nodeName)
Creates an instance of a work item key from an instance id, fork id and node name. |
static IWorkItemPK |
create(long instanceId,
java.lang.String forkId,
java.lang.String nodeName,
java.lang.String appName)
Creates an instance of a work item key from an instance id, fork id, node name and an application name. |
static IWorkItemPK |
create(long instanceId,
java.lang.String forkId,
java.lang.String nodeName,
java.lang.String appName,
java.lang.String clusterName)
Creates an instance of a work item key from an instance id, fork id, node name and an application name. |
protected static IWorkItemPK |
create(java.lang.String swapURL)
Creates an instance of a work item key from a swap URL string. |
protected static IWorkItemPK |
create(java.lang.String swapURL,
java.lang.String clusterName)
Creates an instance of a work item 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 WorkItemPKFactory()
Method Detail |
public static IWorkItemPK create(long instanceId, java.lang.String forkId, java.lang.String nodeName)
Keys created via this method only differ from those created via the
create( long, String, String, String )
method by the value
of the application name member (this method will not set the application
name). When accessing parent work items, the engine requires the name
of the parent application. Users will not require the use
of the create( long, String, String, String )
factory
method and should concentrate on this method instead.
instanceId
- the instance id of the work itemforkId
- the fork id of the work itemnodeName
- the node name of the work itemcreate( long, String, String, String )
,
IWorkItemPK
public static IWorkItemPK create(long instanceId, java.lang.String forkId, java.lang.String nodeName, java.lang.String appName)
Keys created via this method only differ from those created via the
create( long, String, String )
method by the value of the
application name member. When accessing parent work items, the engine
requires the name of the parent application. Users will not require
the use of this factory method and should use the
create( long, String, String )
version of this method
instead.
instanceId
- the instance id of the work itemforkId
- the fork id of the work itemnodeName
- the node name of the work itemappName
- the name of the application the work item
belongs tocreate( long, String, String )
,
IWorkItemPK
public static IWorkItemPK create(long instanceId, java.lang.String forkId, java.lang.String nodeName, java.lang.String appName, java.lang.String clusterName)
Keys created via this method only differ from those created via the
create( long, String, String )
method by the value of the
application name member. When accessing parent work items, the engine
requires the name of the parent application. Users will not require
the use of this factory method and should use the
create( long, String, String )
version of this method
instead.
instanceId
- the instance id of the work itemforkId
- the fork id of the work itemnodeName
- the node name of the work itemappName
- the name of the application the work item
belongs toclusterName
- name of the cluster this application belongs tocreate( long, String, String )
,
IWorkItemPK
protected static IWorkItemPK create(java.lang.String swapURL) throws PMException
create( long, String, String )
version of this method
instead.swapURL
- the value of the work item key in an
internal formatPMException
- if the value of swapURL does not match the
expected format.IWorkItemPK
protected static IWorkItemPK create(java.lang.String swapURL, java.lang.String clusterName) throws PMException
create( long, String, String )
version of this method
instead.swapURL
- the value of the work item key in an
internal formatclusterName
- name of the clusterPMException
- if the value of swapURL does not match the
expected format.IWorkItemPK
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |