|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.itim.workflow.model.PackagedApprovalDocument
public class PackagedApprovalDocument
This class is used as a workflow relevant data item for activities that require
an approval decision on multiple items in one atomic step.
It is composed of a List of PackagedApprovalItems,
which represent the individual items in the approval request.
Individual decisions can be recorded in this document and passed back through the workflow assignment APIs to complete the assignment with the correct output parameters.
For example, on certain workflow manual activities, a document instance can be obtained from a pending workflow assignment's input parameters (@see com.ibm.itim.apps.workflow.WorkflowAssignmentMO.getInputParameters()) and then placed into an ActivityResult's detail field with updated decisions, as an output parameters. Then, the workflow assignment can be completed (@see com.ibm.itim.apps.workflow.WorkflowAssignmentMO.complete(ActivityResult)), allowing the workflow to proceed. *
| Constructor Summary | |
|---|---|
PackagedApprovalDocument()
Constructs an empty packaged approval document, including an empty list of approval items. |
|
PackagedApprovalDocument(java.util.List<PackagedApprovalItem> itemList)
Constructs a packaged approval document with the specified list of approval items, which should be non-null. |
|
PackagedApprovalDocument(java.lang.String comments,
java.util.List<PackagedApprovalItem> itemList)
Constructs a packaged approval document with the specified comments and list of approval items, which should be non-null. |
|
| Method Summary | |
|---|---|
boolean |
addItem(PackagedApprovalItem item)
Adds the specified PackagedApprovalItem to the items list. |
boolean |
checkItemsForDecisionCode(java.lang.String decisionCode)
Checks the document for the specified String decision
code. |
int |
countDecisionItemsByType(PackagedApprovalItem.ItemType itemType,
boolean includeChildren)
Examines the document to count the number of items supporting a decision of the specified type. |
int |
countItemsByType(PackagedApprovalItem.ItemType itemType,
boolean includeChildren)
Examines the document to count the number of items of the specified type. |
boolean |
equals(java.lang.Object o)
Compares the values in the document. |
java.lang.String |
getComments()
Retrieves the comments in this document. |
java.util.List<PackagedApprovalItem> |
getDocumentItems()
Retrieves the list of approval items in this document. |
java.util.List<PackagedApprovalItem> |
getItemsByType(PackagedApprovalItem.ItemType itemType)
Searches the document for any top-level items with the specified ItemType. |
java.util.List<PackagedApprovalItem> |
getItemsByTypeAndDecision(PackagedApprovalItem.ItemType itemType,
java.lang.String decisionCode)
Searches the document for any top-level items with both the specified ItemType
and String decision code. |
java.lang.String |
getJustification()
Retrieves the justification in this document. |
int |
hashCode()
Returns the hashCode for the document. |
boolean |
removeItem(java.lang.String itemId)
Removes the specified PackagedApprovalItem from the items list
based on the item's identifying string. |
void |
setComments(java.lang.String comments)
Sets the comments in this document. |
void |
setDecisionForAllItems(java.lang.String decisionCode)
Sets the specified decision code String on all items in this document,
including any children of top-level items. |
void |
setDocumentItems(java.util.List<PackagedApprovalItem> documentItems)
Sets the list of approval items in this document. |
void |
setJustification(java.lang.String justification)
Sets the justification in this document. |
java.lang.String |
toString()
Returns a String containing the values of the object. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PackagedApprovalDocument()
public PackagedApprovalDocument(java.util.List<PackagedApprovalItem> itemList)
itemList - List of PackagedApprovalItem for the document
public PackagedApprovalDocument(java.lang.String comments,
java.util.List<PackagedApprovalItem> itemList)
comments - for the documentitemList - List of PackagedApprovalItem for the document| Method Detail |
|---|
public java.lang.String getComments()
public void setComments(java.lang.String comments)
comments - for this documentpublic java.util.List<PackagedApprovalItem> getDocumentItems()
List of PackagedApprovalItemspublic void setDocumentItems(java.util.List<PackagedApprovalItem> documentItems)
documentItems - a List of PackagedApprovalItemspublic boolean checkItemsForDecisionCode(java.lang.String decisionCode)
String decision
code. This includes recursing the document structure to examine
children of each item. Any items that don't support decisions are skipped,
but their children will be examined.
Decision code may be the value corresponding to
ActivityResult.APPROVED or ActivityResult.REJECTED.
decisionCode - the String decision to search for
boolean, true iff the decision is foundActivityResult
public int countItemsByType(PackagedApprovalItem.ItemType itemType,
boolean includeChildren)
boolean setting includeChildren, this
method may or may not consider children of the top-level items.
itemType - the ItemType to search forincludeChildren - a boolean flag indicating whether to examine
at the children
int number of items
public int countDecisionItemsByType(PackagedApprovalItem.ItemType itemType,
boolean includeChildren)
boolean setting includeChildren,
this method may or may not consider children of the top-level items.
itemType - the ItemType to search forincludeChildren - a boolean flag indicating whether to examine
at the children
int number of itemspublic java.util.List<PackagedApprovalItem> getItemsByType(PackagedApprovalItem.ItemType itemType)
ItemType.
Returns the items located, along with their full attributes and children in a
List.
itemType - the ItemType to search for
List of PackagedApprovalItem objects located
public java.util.List<PackagedApprovalItem> getItemsByTypeAndDecision(PackagedApprovalItem.ItemType itemType,
java.lang.String decisionCode)
ItemType
and String decision code. Returns the items located, along with their full
attributes and children in a List. Any items that don't support decisions
are skipped.
Decision code may be the value corresponding to
ActivityResult.APPROVED or ActivityResult.REJECTED.
itemType - the ItemType to search fordecisionCode - the String decision code to search for
List of PackagedApprovalItem objects locatedActivityResultpublic void setDecisionForAllItems(java.lang.String decisionCode)
String on all items in this document,
including any children of top-level items. Any items that don't support decisions
are skipped.
Decision code may be the value corresponding to
ActivityResult.APPROVED or ActivityResult.REJECTED.
decisionCode - the String decision code to useActivityResultpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the object to compare this document against
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean addItem(PackagedApprovalItem item)
PackagedApprovalItem to the items list.
item - the item to add
item was addedpublic boolean removeItem(java.lang.String itemId)
PackagedApprovalItem from the items list
based on the item's identifying string.
itemId - the String identifier for the item
item was removedpublic java.lang.String getJustification()
public void setJustification(java.lang.String justification)
justification - for this document
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||