|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.wfxml.WfXMLMessage
com.groiss.wfxml.GetPIDataMessage
public class GetPIDataMessage
With this message you can request data of a process instance on a partner
server. You can specify which items the answer should contain (as defined in
the WfXML specification).
See the documentation of the methods for details on what you can do with this
message.
| Field Summary | |
|---|---|
static java.lang.String |
DESC
|
static java.lang.String |
LASTMODIFIED
|
protected static java.lang.String |
MSG_BODY_REQ
|
protected static java.lang.String |
MSG_BODY_RESP
|
static java.lang.String |
NAME
|
static java.lang.String |
OBSERVERKEY
|
static java.lang.String |
PRIORITY
|
static java.lang.String |
PROCDEFKEY
|
static java.lang.String |
STATE
|
static java.lang.String |
SUBJECT
|
static java.lang.String |
VALIDSTATES
|
| Constructor Summary | |
|---|---|
protected |
GetPIDataMessage(org.jdom.Document doc)
This method is used internally for creating a GetPIDataMessage out of a xml document. |
|
GetPIDataMessage(short messageType)
Creates a new empty message and sets a type for that message (request or response). |
| Method Summary | |
|---|---|
void |
addNote(DMSNote note)
Use this method to add a note to a response message. |
void |
addNote(java.lang.String subject,
java.lang.String content,
java.lang.String userId,
boolean isPrivate)
Use this method to quickly add notes without creating WfXMLNote
or DMSNote objects. |
void |
addNote(WfXMLNote note)
This method adds a WfXMLNote to a response message (that's a note
attached to the process instance). |
void |
addProcessForm(java.lang.String formName,
DMSForm form)
Use this method to add a process form to a response message. |
void |
addProcessForm(java.lang.String formName,
WfXMLForm form)
Add a process form to a response message. |
void |
addToDMSFolder(DMSObject obj)
This method adds a DMSObject to a
response message. |
void |
addToDMSFolder(WfXMLObject obj)
Use this method to add a WfXMLObject to the DMSFolder in a response
message. |
boolean |
areNotesRequested()
Use this method to find out if notes are requested in a request message. |
java.lang.String |
getDescription()
Use this method to get the Description attribute. |
java.lang.String |
getKey()
Use this method to get the oid of the target process instance. |
java.util.Date |
getLastModified()
Use this method to get the value of the LastModified attribute. |
java.lang.String |
getName()
This method gets the Name attribute. |
java.lang.String |
getObserverKey()
Use this method to get the ObserverKey attribute. |
int |
getPriority()
Use this method to get the Priority attribute. |
java.lang.String |
getProcessDefinitionKey()
Use this method to get the ProcessDefinitionKey attribute. |
WfXMLForm |
getProcessForm(java.lang.String formName)
Use this method to get a specific process form out of a response message. |
short |
getState()
This method returns the value set in the State attribute. |
java.lang.String |
getSubject()
Use this method to get the Subject attribute. |
short[] |
getValidStates()
Use this method to get all states set in the ValidStates attribute. |
boolean |
isDMSFolderRequested()
Use this method to find out if the content of the process instance's DMSFolder is requested in a request message. |
WfXMLObject[] |
listDMSFolderContent()
Use this method to get the content of a response message's DMSFolder. |
WfXMLNote[] |
listNotes()
Use this method to get all notes as WfXMLNote objects out of a
response message. |
java.lang.String[] |
listProcessFormNames()
Use this method to get all form names of the process forms that are included in this message. |
WfXMLForm[] |
listProcessForms()
Use this method to get an array of process forms included in a response message. |
java.lang.String[] |
listRequestedAttributeNames()
Use this method to get a list containing the names of all requested attributes. |
void |
prepare(Partner partner)
This method prepares the message to be sent to a specific partner. |
protected void |
prepare(java.lang.String targetURL)
This method is used by the WfXML test client only! |
void |
requestDMSFolder()
Adds a request for the content of the process instance's DMSFolder to a request message. |
void |
requestNotes()
Adds a request for all notes to a request message. |
void |
requestProcessForm(java.lang.String formName)
Adds a request for a specific process form to a request message. |
void |
requestProcessForms()
Call this method on request messages in order to add a request for process forms. |
void |
setDescription(java.lang.String description)
This method sets the Description attribute. |
void |
setKey(java.lang.String procInstID)
Sets the key for the GetProcessInstanceData message. |
void |
setLastModified(java.util.Date date)
This method sets the LastModified attribute. |
void |
setMessageType(short type)
Set the message type of this WfXML message (in the message header). |
void |
setName(java.lang.String name)
This method sets the Name attribute. |
void |
setObserverKey(java.lang.String observerKey)
This method sets the ObserverKey attribute. |
void |
setPriority(int value)
Use this method to set the Priority attribute. |
void |
setProcessDefinitionKey(java.lang.String procDefKey)
This method sets the ProcessDefinitionKey attribute. |
void |
setState(short state)
Use this method to set the State attribute. |
void |
setSubject(java.lang.String subject)
This method sets the Subject attribute. |
void |
setValidStates(short[] states)
Use this method to set the ValidStates attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String MSG_BODY_REQ
protected static final java.lang.String MSG_BODY_RESP
public static final java.lang.String NAME
public static final java.lang.String SUBJECT
public static final java.lang.String DESC
public static final java.lang.String STATE
public static final java.lang.String VALIDSTATES
public static final java.lang.String OBSERVERKEY
public static final java.lang.String PROCDEFKEY
public static final java.lang.String PRIORITY
public static final java.lang.String LASTMODIFIED
| Constructor Detail |
|---|
public GetPIDataMessage(short messageType)
messageType - The type of the new message. Use WfXMLMessage.REQUEST
or WfXMLMessage.RESPONSE as type.protected GetPIDataMessage(org.jdom.Document doc)
doc - JDOM Document containing the content for the message.| Method Detail |
|---|
public void setKey(java.lang.String procInstID)
throws java.lang.IllegalArgumentException
WfXMLMessage.setPlainKey(java.lang.String) method instead. With that method you can
set a complete key, like you receive it after you created a new process
instance with a CreatePIMessage.
procInstID - The unique process instance OID of the process instance
on the remote partner server. This parameter must be provided.
java.lang.IllegalArgumentException - if procInstID == null.
public java.lang.String getKey()
throws WfXMLMessageException
WfXMLMessage.getPlainKey()
method.
WfXMLMessageException - if the key doesn't exist or if it is not
compatible to @enterprise requirements.public void prepare(Partner partner)
Sender before the message is sent, so it should be
never necessary to call this method yourself.
prepare in class WfXMLMessagepartner - The partner to which the message will be sent.protected void prepare(java.lang.String targetURL)
targetURL - target URL to which the message will be sent.
public void setMessageType(short type)
throws java.lang.IllegalArgumentException
WfXMLMessage
setMessageType in class WfXMLMessagetype - Use the constants WfXMLMessage.REQUEST or WfXMLMessage.RESPONSE
as value for this parameter, depending on if you want to create
a request or a response message.
java.lang.IllegalArgumentException - If type is illegal.public void setName(java.lang.String name)
name parameter to null). In @enterprise the name
is a process instance's id.
name - The name - according to the WfXML specification this is a
human readable identifier of the resource. In case this is a request
message, you can pass null as parameter.public java.lang.String getName()
null, if the message doesn't contain a name.
null.
See the text above for further details.public void setSubject(java.lang.String subject)
setName(java.lang.String) method, with the only difference that it sets the subject
attribute instead of the name attribute.
subject - The value of the subject attribute. According to the WfXML
specification this is a short description of the process instance.
If this is a request message, you can set the parameter to null.public java.lang.String getSubject()
getName() method for more details (this method works identically).
null.
See the similar getName() method for more details.public void setDescription(java.lang.String description)
setName(java.lang.String) method, with the only difference that it sets the description
attribute instead of the name attribute. @enterprise doesn't return descriptions,
because descriptions with this semantics don't exist.
description - The value of the description attribute. According to the
WfXML specification this is a longer description of this process instance resource.
If this is a request message, you can set the parameter to null.public java.lang.String getDescription()
getName() method for more details (this method works identically).
null.
See the similar getName() method for more details.public void setObserverKey(java.lang.String observerKey)
setName(java.lang.String) method, with the only difference that it sets the observerkey
attribute instead of the name attribute.
observerKey - The value of the observerkey attribute. This is the id of
the observer which is registered for the process instance that you are
requesting data from. If this is a request message, you can set the parameter
to null.public java.lang.String getObserverKey()
getName() method for more details (this method works identically).
null.
See the similar getName() method for more details.public void setProcessDefinitionKey(java.lang.String procDefKey)
setName(java.lang.String) method.
procDefKey - The value of the process definition key. This is
the URI of the process definition resource from which this instance
was created.public java.lang.String getProcessDefinitionKey()
getName() method for more details (this method works identically).
null. See the similar getName() method for
more details.public void setPriority(int value)
setName(java.lang.String) method. If you want to set "no value" for the priority
(e.g., in request messages), use 0 as parameter.MessageListener that sets the right value.
value - The priority that you want to set. The priority indicates the
relative importance of this process instance. Regular values are
integers from 1 (highest priority) to 5 (lowest
priority). Use 0 if you don't want to set a value (e.g., in a
request message). If you attempt to set an invalid value, no value will be
set.public int getPriority()
1-5). If no value has been set, or
the attribute does not exist at all, 0 will be returned.
0 if no value
is defined or the attribute does not exist.public void setLastModified(java.util.Date date)
setName(java.lang.String) method.
date - The date that you want to set for this attribute. This is
the date of the last modification of the process instance.public java.util.Date getLastModified()
Date object containing the date when the
last change occured, or null if the attribute doesn't contain
a value, the value is not readable (according to the format defined by the
WfXML specification), or the attribute does not exist in the message.
Date object or null. See the text
above for more details.public void setState(short state)
WfXMLMessage.PI_STATE_NONE or 0
(both indicating that there is no state defined). In the response you will find
one of the states defined as constants in WfXMLMessage.
state - WfXMLMessage.PI_STATE_NONE or 0 for indicating
that no state is set, or one of the valid states WfXMLMessage.PI_STATE_OPEN_RUNNING,
WfXMLMessage.PI_STATE_OPEN_NOTRUNNING, WfXMLMessage.PI_STATE_CLOSED_COMPLETED,
or WfXMLMessage.PI_STATE_CLOSED_ABNORMAL_COMPLETED.public short getState()
WfXMLMessage. If there is no
value defined for that attribute, or if the attribute is not part of the
message at all, WfXMLMessage.PI_STATE_NONE (0) will be
returned. State is the current state of the process instance.
public void setValidStates(short[] states)
null as parameter. If you want to set states in
a response message, create an array containg state constants defined in
WfXMLMessage (short values).
states - An array containing the states that you want to set for this
parameter, or null if you don't want to set any states at all.public short[] getValidStates()
null will be returned. If
the attribute exists but doesn't have values set, the array will be empty.
Otherwise you retrieve an array filled with all states that have been set
for this attribute (states are constants defined in WfXMLMessage).
null if the attribute does not exist.public java.lang.String[] listRequestedAttributeNames()
NAME, SUBJECT, ...).
public void requestProcessForms()
public void requestProcessForm(java.lang.String formName)
formName should be the name of the
process form as it is defined in the remote process instance's process
definition. The response message will contain only the requested process
forms.
formName - The name of the process form as it is defined in the
process definition.public java.lang.String[] listProcessFormNames()
null (because no specific forms are requested).public void requestNotes()
public boolean areNotesRequested()
true if notes are requested, or false if
notes are not requested.public void requestDMSFolder()
public boolean isDMSFolderRequested()
true if the content of the DMSFolder is requested, or
false if it is not requested.
public void addProcessForm(java.lang.String formName,
DMSForm form)
throws java.lang.Exception
DMSForm available, use a WfXMLForm
instead (method addProcessForm(String,WfXMLForm)).
formName - The form name of that process form as defined in the
process definition.form - The DMSForm that you want to add.
java.lang.Exception - if any other error occurs while the process form is
added (database problems, etc.).
public void addProcessForm(java.lang.String formName,
WfXMLForm form)
formName - The form name of the process form as defined in the
process definition.form - The WfXMLForm that you want to add.public WfXMLForm[] listProcessForms()
public WfXMLForm getProcessForm(java.lang.String formName)
WfXMLForm, so you can access all of its
content easily.
formName - The form name of the process form that you want to get out
of the response message.
WfXMLForm with the content of the requested form, or
null if no process form with the given name exists.
public void addNote(DMSNote note)
throws java.lang.Exception
note - The DMSNote object you want to
add.
java.lang.Exception - if any error occurs while the note is added.
public void addNote(java.lang.String subject,
java.lang.String content,
java.lang.String userId,
boolean isPrivate)
WfXMLNote
or DMSNote objects.subject, a
content, and the ID of a user who is the creator of the
note. The boolean value indicates whether the note is private or public.
subject - A Subject for the note.content - The content of the note.userId - ID String of the user. You can set this to null
if you don't want to specify a particular user for this note.isPrivate - set this parameter to true if this note is
private, or to false if it is public.public void addNote(WfXMLNote note)
WfXMLNote to a response message (that's a note
attached to the process instance).
note - The WfXMLNote object that you want to add.public WfXMLNote[] listNotes()
WfXMLNote objects out of a
response message. This method does not create any
DMSObject objects.
WfXMLNote objects, or an empty array if there
are no notes in the message.
public void addToDMSFolder(DMSObject obj)
throws java.lang.Exception
DMSObject to a
response message.addProcessForm
methods instead.obj may be one of the following:
DMSNote - the DMSNote is added (this is
a note in the document folder and not a note which is attached to
the process instance).DMSWebLink - the content of the
DMSWebLink will be added.DMSDocForm - the document (base64 encoded)
and any notes that may be attached to the document are added.DMSFolder - a whole DMSFolder including all
content (also subfolders!) is added.DMSForm - the form plus any referenced forms
and subforms and attached notes are added.DMSLink - the linked object (=> one of the
4 types mentioned before) is added.
obj - The DMSObject that you want to
add to the message.
java.lang.Exception - if any error occurs while the object is added.public void addToDMSFolder(WfXMLObject obj)
WfXMLObject to the DMSFolder in a response
message.
obj - The WfXMLObject you want to add.public WfXMLObject[] listDMSFolderContent()
WfXMLObject objects. If you need
DMSObject objects, you can create
DMSObjects easily by calling the
WfXMLObjects' WfXMLObject.createDMSObject(com.groiss.org.User) method.
WfXMLObject objects. If the
folder is empty, the returned array will be empty, too.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||