|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WorkflowedDocument
WorkflowedDocument Interface
Represents a WCM API object that supports workflow
methods
WorkflowedDocument description
| Method Summary | |
|---|---|
void |
addAdditionalViewers(java.lang.String... additionalViewers)
Adds names to the list of additional live viewers for this Document document. |
void |
addApprovers(java.lang.String... approvers)
Deprecated. use Editable.addMembersForAccess(com.ibm.workplace.wcm.api.security.Access, String[]) |
void |
approve(boolean runExitActions,
boolean runEntryAction,
java.lang.String comment)
Approves the document. |
Document |
cancelDraftDocument()
Cancels a draft document, if it exists. |
void |
clearApprovers()
Deprecated. |
Document |
createDraftDocument()
Create draft copy of this WorkflowedDocument object. |
void |
decline()
Declines this document. |
void |
decline(java.lang.String comment)
Declines this document. |
java.lang.String[] |
getAdditionalViewers()
Returns an array of names of additional live viewers for this Document document. |
java.lang.String[] |
getCurrentApprovers()
Deprecated. use Document.getMembersForAccess(com.ibm.workplace.wcm.api.security.Access) |
java.util.Date |
getDateEnteredStage()
Return the date which the current Document entered the
current workflow stage |
java.util.Date |
getEffectiveDate()
Returns the effective date of this Document.That is, the date this Document is scheduled to become published, or the date it already went published.In the Web Content Manager Authoring UI, this is called the "Publish Date". |
java.util.Date |
getExpiryDate()
Returns the expiry date for this Document document. |
java.util.Date |
getGeneralDateOne()
Return general date one for this Document document. |
java.util.Date |
getGeneralDateTwo()
Return general date two for this Document document. |
int |
getPendingWorkflowStatus()
Returns the pending workflow status of this WorkflowedDocument. |
java.util.Date |
getPublishedDate()
Get the date the item was last in the published state. This is an 'internal' property that is no longer exposed in the Web Content Manager Authoring UI. |
DocumentId |
getPublishedId()
If this is a draft of published Document then it retrieves the DocumentId of the Published Item.
The item is a draft of published item if isDraftOfPublishedDocument() returns true. |
DocumentId |
getWorkflowId()
Return ID of the workflow associated with this document. |
DocumentId |
getWorkflowStageId()
Returns the ID of the current WorkflowStage that this
Document document is in. |
int |
getWorkflowStatus()
Returns the current workflow status of this WorkflowedDocument. |
boolean |
hasApproverAccess()
Deprecated. since 8.5 Use Workspace.hasAccess(DocumentId, com.ibm.workplace.wcm.api.security.Access)
instead. Using Access.APPROVER as the access role. |
boolean |
hasApproverAccess(UserProfile user)
Deprecated. since 8.5. Use Workspace.hasAccess(DocumentId, UserProfile, com.ibm.workplace.wcm.api.security.Access)
instead. Using Access.APPROVER as the access role. |
boolean |
hasDraft()
Returns true if this Document has a
draft document. |
boolean |
isDraft()
Return true if this Document object is a draft. |
boolean |
isDraftOfPublishedDocument()
Is this a draft of a Published Document |
boolean |
isExpired()
Return true if this Document has expired. |
boolean |
isPublished()
Return true if this Document document is live
published document. |
boolean |
isWorkflowMovingBackward()
Indicates if the workflow is moving backward (ie. |
void |
nextWorkflowStage()
Deprecated. use nextWorkflowStage(boolean, boolean, String)
For the same behavior call nextWorkflowStage(true, true, null) |
void |
nextWorkflowStage(boolean runExitActions,
boolean runEntryActions)
Deprecated. use nextWorkflowStage(boolean, boolean, String)
For the same behavior call nextWorkflowStage(boolean, boolean, null) |
void |
nextWorkflowStage(boolean runExitActions,
boolean runEntryActions,
java.lang.String comment)
Move this Document onject into the next stage in its workflow. |
void |
previousWorkflowStage(boolean executeEntryActions)
Deprecated. use previousWorkflowStage(boolean, String)
For the same behavior call previousWorkflowStage(boolean, null) |
void |
previousWorkflowStage(boolean executeEntryActions,
java.lang.String comment)
Move this document to its previous stage in the workflow. |
void |
removeAdditionalViewers(java.lang.String... additionalViewers)
Removes names from the list of additional live viewers for this Document. |
void |
removeApprovers(java.lang.String... approvers)
Deprecated. use Editable.removeMembersForAccess(com.ibm.workplace.wcm.api.security.Access, String[]) |
void |
restartWorkflow()
Restart the workflow on this Document object. |
void |
setEffectiveDate(java.util.Date effectiveDate)
Sets the effective date of this Document. |
void |
setExpiryDate(java.util.Date expiryDate)
Sets the expiry date for this Document document. |
void |
setGeneralDateOne(java.util.Date generalDateOne)
Set general date one for this Document document. |
void |
setGeneralDateTwo(java.util.Date generalDateTwo)
Set general date two for this Document document. |
void |
setWorkflowId(DocumentId workflowId)
Sets the Workflow on this Document
given the ID of the Workflow. |
void |
setWorkflowId(DocumentId workflowId,
boolean maintainCurrentStage)
Sets the Workflow on this Document
given the ID of the Workflow. |
| Method Detail |
|---|
DocumentId getWorkflowId()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Workflow, an
AuthorizationException will be thrown. null
will never be returned from this method.
Workflow for this Document
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate
access to the workflow
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable or the
workflow id cannot be retrieved
void setWorkflowId(DocumentId workflowId)
throws WorkflowException
Workflow on this Document
given the ID of the Workflow. This method will also restart
the workflow of the current document
workflowId - the ID for the required Workflow
WorkflowException - if this document is not workflowable or
the workflow ID could not be set
void setWorkflowId(DocumentId workflowId,
boolean maintainCurrentStage)
throws WorkflowException
Workflow on this Document
given the ID of the Workflow. If maintainCurrentStage is
false OR the current stage doesn't exist in the new workflow, then this method will
also restart the workflow of the current document
workflowId - the ID for the required WorkflowmaintainCurrentStage - specifies whether to stay in the current stage
(and not run any workflow actions OR re-apply security) if it exists
in the new Workflow
WorkflowException - if this document is not workflowable or
the workflow id could not be set
DocumentId getWorkflowStageId()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
WorkflowStage that this
Document document is in. If the user does not have access
to this stage, then an AuthorizationException is thrown.
null is never returned.
WorkflowStage of this document
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate
access to the current workflow stage
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable or
the workflow stage id could not be retrieved
java.util.Date getEffectiveDate()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document.Document is scheduled to become published, or the date it already went published.Note that user intervention may cause the item to be published at a different time than the time it is scheduled to be published.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable
void setEffectiveDate(java.util.Date effectiveDate)
throws WorkflowNotFoundException
Document. Document will become live, or the date this Document already went live.
effectiveDate - the effective publish date
WorkflowNotFoundException - if this document is not workflowable
java.util.Date getExpiryDate()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document document. That is,
the date it will expire from site.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable
void setExpiryDate(java.util.Date expiryDate)
throws WorkflowNotFoundException
Document document. That is,
the date the Document will expire from site.
expiryDate - the expiry date
WorkflowNotFoundException - if this document is not workflowable
java.util.Date getPublishedDate()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
This value may differ from the effective publish date. See also getEffectiveDate()
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable
java.util.Date getGeneralDateOne()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document document. That is,
the date that the user has specified.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable
void setGeneralDateOne(java.util.Date generalDateOne)
throws WorkflowNotFoundException
Document document. That is,
the date that the user has specified.
generalDateOne - the general date one
WorkflowNotFoundException - if this document is not workflowable
java.util.Date getGeneralDateTwo()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document document. That is,
the date that the user has specified.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable
void setGeneralDateTwo(java.util.Date generalDateTwo)
throws WorkflowNotFoundException
Document document. That is,
the date that the user has specified.
generalDateTwo - the general date two
WorkflowNotFoundException - if this document is not workflowable
java.lang.String[] getAdditionalViewers()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document document.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable
void addAdditionalViewers(java.lang.String... additionalViewers)
throws WorkflowNotFoundException
Document document. Duplicate names are removed.
additionalViewers - the array of additional viewer names to add
WorkflowNotFoundException - if this document is not workflowable
void removeAdditionalViewers(java.lang.String... additionalViewers)
throws WorkflowNotFoundException
Document. All names in the specified array will be removed.
additionalViewers - the array of additional viewer names to remove
WorkflowNotFoundException - if this document is not workflowable
java.lang.String[] getCurrentApprovers()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document.getMembersForAccess(com.ibm.workplace.wcm.api.security.Access)
Document object. The strings are either the
users' common name or distinguished name, depending on the setting
on the Workspace. See Workspace.isDistinguishedNamesUsed().
The resultant array may contain the names of users and groups.
Returns an empty array if this Document object does
not have Approver access specified.
Document object.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable,
or the current stage is not accessible by this user
boolean hasApproverAccess(UserProfile user)
throws WorkflowException
Workspace.hasAccess(DocumentId, UserProfile, com.ibm.workplace.wcm.api.security.Access)
instead. Using Access.APPROVER as the access role.
UserProfile has Approver access to this Document.
user - the UserProfile to perform the access check for
WorkflowException - if error occured when accessing repository
boolean hasApproverAccess()
throws WorkflowException
Workspace.hasAccess(DocumentId, com.ibm.workplace.wcm.api.security.Access)
instead. Using Access.APPROVER as the access role.
Workspace associated with the current document has
Approver access to this Document.
WorkflowException - if error occured when accessing repositoryvoid addApprovers(java.lang.String... approvers)
Editable.addMembersForAccess(com.ibm.workplace.wcm.api.security.Access, String[])
Document object.
An approver is only added if the element in the string array argument can be converted to a valid member.
Note: Each approver of this Document object
must be unique. I.e. Duplicates are removed.
approvers - the approvers to addvoid removeApprovers(java.lang.String... approvers)
Editable.removeMembersForAccess(com.ibm.workplace.wcm.api.security.Access, String[])
Document object.
An approver is only removed if the element in the string array
argument can be converted to a valid member and already an
approver on this Document object.
approvers - the approvers names to remove
void clearApprovers()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException
WorkflowDocument#removeApprovers(String[])
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the current user does not have minimum Editor access to the project.
java.util.Date getDateEnteredStage()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document entered the
current workflow stage
Document entered the
current workflow stage
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this content is not workflowable
boolean hasDraft()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document has a
draft document.
Document has a
draft document, false otherwise.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is
not workflowable
void restartWorkflow()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
WorkflowException
Document object. This
returns the document to the first stage in its workflow.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the
appropriate access permission
WorkflowException - if this document is not workflowable
or an error while restarting the workflow
void nextWorkflowStage()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
com.ibm.workplace.wcm.api.exceptions.OperationFailedException,
com.ibm.workplace.wcm.api.exceptions.NoMoreWorkflowStagesException
nextWorkflowStage(boolean, boolean, String)
For the same behavior call nextWorkflowStage(true, true, null)
Document object into the next stage in its
workflow. When an approver calls this method, the document will immediately
progress to the next workflow stage regardless of whether joint approval
has been configured.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate
access permission to the workflow
com.ibm.workplace.wcm.api.exceptions.OperationFailedException - if this document is not workflowable or
the document could not be moved to the next workflow stage
com.ibm.workplace.wcm.api.exceptions.NoMoreWorkflowStagesException - if the document is already in the
last workflow stage
void nextWorkflowStage(boolean runExitActions,
boolean runEntryActions)
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
com.ibm.workplace.wcm.api.exceptions.OperationFailedException,
com.ibm.workplace.wcm.api.exceptions.NoMoreWorkflowStagesException
nextWorkflowStage(boolean, boolean, String)
For the same behavior call nextWorkflowStage(boolean, boolean, null)
Document object into the next stage in its
workflow. When an approver calls this method, the document will immediately
progress to the next workflow stage regardless of whether joint approval
has been configured.
runExitActions - specifies whether to run the exit actions on the current
stage before proceeding to the next stagerunEntryActions - specifies whether to run the entry actions on the next stage
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate
access permission to the workflow
com.ibm.workplace.wcm.api.exceptions.OperationFailedException - if this document is not workflowable or
the Document could not be moved to the next workflow stage
com.ibm.workplace.wcm.api.exceptions.NoMoreWorkflowStagesException - if the document is already in the
last workflow stage
void nextWorkflowStage(boolean runExitActions,
boolean runEntryActions,
java.lang.String comment)
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
WorkflowException
Document onject into the next stage in its workflow.
When an approver calls this method, the document will immediately progress
to the next workflow stage, regardless of whether joint approval is configured.
runExitActions - option to run the exit actions on the current stage
before proceeding to the next stage.runEntryActions - option to run the entry actions on the next stage after moving into it.comment - optional comment to add for the operation. Can be null or empty.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate access permission to the workflow.
NoNextStageException - if the document is currently in the last stage of the workflow.
WorkflowException - if the document can not be moved to the next stage.
void approve(boolean runExitActions,
boolean runEntryAction,
java.lang.String comment)
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
WorkflowException
runExitActions - option to run the exit actions on the current stage
before proceeding to the next stage.runEntryAction - option to run the entry actions on the next stage after moving into it.comment - optional comment to add for the operation. Can be null or empty.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate access permission to the workflow.
WorkflowException - if the document can not be moved to the next stage.
void previousWorkflowStage(boolean executeEntryActions)
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
com.ibm.workplace.wcm.api.exceptions.OperationFailedException,
com.ibm.workplace.wcm.api.exceptions.NoMoreWorkflowStagesException,
PreviousStageNotEnabledException
previousWorkflowStage(boolean, String)
For the same behavior call previousWorkflowStage(boolean, null)
executeEntryActions - specifies whether the entry actions for the previous stage should be executed
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate access permission to the workflow
com.ibm.workplace.wcm.api.exceptions.OperationFailedException - if this document is not workflowable or it could not be moved to the previous workflow stage
com.ibm.workplace.wcm.api.exceptions.NoMoreWorkflowStagesException - if the document is already in the previous workflow stage
PreviousStageNotEnabledException - if the current user is not a manager and moving to the previous stage has not been enabled for approvers
void previousWorkflowStage(boolean executeEntryActions,
java.lang.String comment)
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
WorkflowException
executeEntryActions - option to run the entry actions on the previous stage had the move succeeded.comment - optional comment to be added. Can be null.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate access permission to the workflow.
com.ibm.workplace.wcm.api.exceptions.NoPreviousStageException - if this document is currently in the first stage of the workflow.
ActionNotAvailableException - if this action is not available to the current user.
The workflow action to move a Document to its previous workflow stage is not available in two cases:
1. It is not enabled on the current stage.
2. The user does not have minimum Manager access to the current stage of the Document.
WorkflowException - if this document is not workflowable or it could not be moved to the previous workflow stage
boolean isDraft()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document object is a draft.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable
boolean isPublished()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document document is live
published document.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not workflowable
boolean isExpired()
throws com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Document has expired.
That is, if the expiry date has been reached.
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException - if this document is not
workflowable
void decline()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
WorkflowException
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate
access permission to the workflow
WorkflowException - if this document is not workflowable or
the Document could not be moved to the initial workflow stage
void decline(java.lang.String comment)
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
WorkflowException
comment - optional comment to add for the operation. Can be null or empty.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate
access permission to the workflow
WorkflowException - if this document is not workflowable or
the Document could not be moved to the initial workflow stage
Document createDraftDocument()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
WorkflowException
NOTE: Creating a draft saves the original, so any changes already made to the original before a draft is created will be seen in both WorkflowedDocuments.
NOTE: You do not need to save the new draft after it is created, unless you have made changes to the draft WorkflowedDocument after creating the draft.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate
access permission
WorkflowException - if this WorkflowedDocument is not workflowable or
an error occurred while creating the draft
Document cancelDraftDocument()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
WorkflowException
NOTE: This method may be performed on either the draft or the published document. If there are multiple drafts, and the published content is supplied, then only the first draft found will be cancelled. To cancel a specific draft, this method should be called from that draft.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user does not have the appropriate
access permission
WorkflowException - if this document is not workflowable or
an error occurred while cancelling the draftint getWorkflowStatus()
WorkflowedDocument.
Workspace.WORKFLOWSTATUS_DRAFT if this
WorkflowedDocument is a draft document,
Workspace.WORKFLOWSTATUS_PUBLISHED if it is a published document,
or Workspace.WORKFLOWSTATUS_EXPIRED if it is an expired document.int getPendingWorkflowStatus()
WorkflowedDocument.
The pending status is the status that the document will move into in the future, for instance
when a scheduled date is reached, or when a project is published.
Workspace.PENDING_WORKFLOWSTATUS_NONE if this
WorkflowedDocument is not pending a change in status,
Workspace.PENDING_WORKFLOWSTATUS_PUBLISHED if it is pending to be published, or
Workspace.PENDING_WORKFLOWSTATUS_EXPIRED if it is pending to expire, or
Workspace.PENDING_WORKFLOWSTATUS_DELETED if it is pending to be deleted.boolean isWorkflowMovingBackward()
boolean isDraftOfPublishedDocument()
true if this document is a draft of a published documentDocumentId getPublishedId()
DocumentId of the Published Item.
The item is a draft of published item if isDraftOfPublishedDocument() returns true.
DocumentId of the Published Document if the document is a draft of a published , null otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||