public interface StateService
Modifier and Type | Method and Description |
---|---|
Iterator<com.atlassian.confluence.core.ContentEntityObject> |
getAssigned(Set<String> spaceKeys,
String userName,
ReportSort sort)
Deprecated.
This method will be removed in upcoming versions.
We encourage developers to use CQL based searches for retrieving lists of content. Either by using the Confluence CQLSearchService interface or the CQL Search REST API. You can found the list of available CQL mappings for Comala Workflows in our documentation wiki. |
Iterator<com.atlassian.confluence.core.ContentEntityObject> |
getByState(Set<String> states,
Set<String> spaceKeys,
ReportSort sort)
Deprecated.
This method will be removed in upcoming versions.
We encourage developers to use CQL based searches for retrieving lists of content. Either by using the Confluence CQLSearchService interface or the CQL Search REST API. You can found the list of available CQL mappings for Comala Workflows in our documentation wiki. |
Iterator<com.atlassian.confluence.core.ContentEntityObject> |
getByState(Set<String> states,
Set<String> spaceKeys,
String labels,
boolean allLabels,
ReportSort sort)
Deprecated.
This method will be removed in upcoming versions.
We encourage developers to use CQL based searches for retrieving lists of content. Either by using the Confluence CQLSearchService interface or the CQL Search REST API. You can found the list of available CQL mappings for Comala Workflows in our documentation wiki. |
Iterator<com.atlassian.confluence.core.ContentEntityObject> |
getByState(Set<String> states,
String ancestorId,
ReportSort sort)
Deprecated.
This method will be removed in upcoming versions.
We encourage developers to use CQL based searches for retrieving lists of content. Either by using the Confluence CQLSearchService interface or the CQL Search REST API. You can found the list of available CQL mappings for Comala Workflows in our documentation wiki. |
List<StateApproval> |
getCurrentApprovals(com.atlassian.confluence.core.ContentEntityObject content)
Returns the approvals that exist on the current state for the given
content.
|
State |
getCurrentState(com.atlassian.confluence.core.ContentEntityObject content)
Returns the current content's state
Retrieves the
|
State |
getPublishedState(com.atlassian.confluence.core.ContentEntityObject content)
Retrieves the most recent published state of the content.
|
List<? extends State> |
getStates(com.atlassian.confluence.core.ContentEntityObject content)
Retrieves all the states on which the content has been.
|
List<String> |
getWorkflowStateNames(com.atlassian.confluence.core.ContentEntityObject content)
Returns the names of all possible states in the workflow associated with
the given content.
|
State |
setState(com.atlassian.confluence.core.ContentEntityObject content,
String stateName,
String comment)
Changes the state of the content.
|
State |
setState(com.atlassian.confluence.core.ContentEntityObject content,
String stateName,
String comment,
boolean validate)
Changes the state of pages.
|
State |
setState(com.atlassian.confluence.core.ContentEntityObject content,
String userName,
String stateName,
String assignee,
String comment)
Deprecated.
|
com.atlassian.confluence.util.longrunning.LongRunningTaskId |
setState(String stateName,
boolean override,
String spaceKey)
Changes the states of pages in given space.
|
com.atlassian.confluence.util.longrunning.LongRunningTaskId |
setState(String stateName,
String comment,
boolean runInBackground,
boolean validate,
Long... pageIds)
Changes the states of pages.
|
com.atlassian.confluence.util.longrunning.LongRunningTaskId |
setState(String stateName,
String comment,
boolean runInBackground,
Long... pageIds)
Changes the states of pages.
|
com.atlassian.confluence.util.longrunning.LongRunningTaskId |
setState(String workflowName,
String stateName,
boolean override,
String spaceKey)
Changes the states of pages that have a given workflow in a space.
|
State |
updateExpiryDate(com.atlassian.confluence.core.ContentEntityObject content,
Date newExpiryDate)
Change the expiry date for the current state on the page.
|
State |
updateExpiryDate(com.atlassian.confluence.core.ContentEntityObject content,
Date newExpiryDate,
boolean validateChangeDueDate)
Change the expiry date for the current state on the page.
|
State getCurrentState(com.atlassian.confluence.core.ContentEntityObject content)
content
- the content objectList<StateApproval> getCurrentApprovals(com.atlassian.confluence.core.ContentEntityObject content)
content
- the page or blog postState getPublishedState(com.atlassian.confluence.core.ContentEntityObject content)
content
- the content objectList<? extends State> getStates(com.atlassian.confluence.core.ContentEntityObject content)
content
- the content objectList<String> getWorkflowStateNames(com.atlassian.confluence.core.ContentEntityObject content)
content
- the content object
the Id of the content to get the workflow states from@Deprecated State setState(com.atlassian.confluence.core.ContentEntityObject content, String userName, String stateName, String assignee, String comment) throws WorkflowException
setState(ContentEntityObject, String, String)
or setState(String, String, boolean, Long...)
instead.content
- the content object, which must have already a workflow associated to ituserName
- the name of the user who is making the change (deprecated)stateName
- the new state nameassignee
- the user name which assign the content (deprecated)comment
- a comment to be recorded for the changeWorkflowException
- if there is any problem changing the state.State setState(com.atlassian.confluence.core.ContentEntityObject content, String stateName, String comment) throws WorkflowException
setState(ContentEntityObject, String, String, boolean)
with the validate param set to “false” instead.content
- the content object, which must have already a workflow associated to itstateName
- the new state namecomment
- a comment to be recorded for the changeWorkflowException
- if there is any problem changing the state.com.atlassian.confluence.util.longrunning.LongRunningTaskId setState(String stateName, String comment, boolean runInBackground, Long... pageIds) throws WorkflowException
setState(String, String, boolean, boolean, Long...)
with the validate param set to “false” instead.stateName
- the new state namecomment
- a comment to be recorded for the changerunInBackground
- true if want to run in the backgroundpageIds
- list of page ids to change states onWorkflowException
com.atlassian.confluence.util.longrunning.LongRunningTaskId setState(String stateName, String comment, boolean runInBackground, boolean validate, Long... pageIds) throws WorkflowException
stateName
- the new state namecomment
- a comment to be recorded for the changerunInBackground
- true if want to run in the backgroundvalidate
- if the state is valid or not.
If is true, the state transition is validated. The required parameters in the state to be set are validated too.
When validation fails, if user is a workflow admin, the state is changed but with ”admin override” change reason.pageIds
- list of page ids to change states onWorkflowException
com.atlassian.confluence.util.longrunning.LongRunningTaskId setState(String stateName, boolean override, String spaceKey) throws WorkflowException
stateName
- the new state nameoverride
- true if want to override existing page statesspaceKey
- the space to change page states inWorkflowException
- if there is any problem changing the statecom.atlassian.confluence.util.longrunning.LongRunningTaskId setState(String workflowName, String stateName, boolean override, String spaceKey) throws WorkflowException
workflowName
- the name of the workflow which states want to be changedstateName
- the new state nameoverride
- true if want to override existing page statesspaceKey
- the space to change page states inWorkflowException
- if there is any problem changing the stateState setState(com.atlassian.confluence.core.ContentEntityObject content, String stateName, String comment, boolean validate) throws WorkflowException
content
- the content object, which must have already a workflow associated to it.stateName
- the new state name.comment
- a comment to be recorded for the change.validate
- if the state is valid or not.
If true, the state transition is validated if the user is not a workflow admin. The required parameters
in the state to be set are validated too.WorkflowException
- if there is any problem changing the stateState updateExpiryDate(com.atlassian.confluence.core.ContentEntityObject content, Date newExpiryDate)
content
- the content objectnewExpiryDate
- State updateExpiryDate(com.atlassian.confluence.core.ContentEntityObject content, Date newExpiryDate, boolean validateChangeDueDate)
content
- newExpiryDate
- validateChangeDueDate
- if false will not check the changeduedate param on the state
before changing the date.@Deprecated Iterator<com.atlassian.confluence.core.ContentEntityObject> getByState(Set<String> states, Set<String> spaceKeys, ReportSort sort)
states
- a set containing states to search, at least one state must be
supplied.spaceKeys
- a set containing space keys to search.sort
- the sort to be used@Deprecated Iterator<com.atlassian.confluence.core.ContentEntityObject> getByState(Set<String> states, Set<String> spaceKeys, String labels, boolean allLabels, ReportSort sort)
states
- a set containing states to search, at least one state must be
supplied.spaceKeys
- a set containing space keys to search.labels
- a comma separated list of label namesallLabels
- true of the content must contain all the given labelssort
- the sort to be used@Deprecated Iterator<com.atlassian.confluence.core.ContentEntityObject> getByState(Set<String> states, String ancestorId, ReportSort sort)
states
- a set containing states to search, at least one state must be
supplied.ancestorId
- the root of the page tree to search in.sort
- the sort to be usedIterator<com.atlassian.confluence.core.ContentEntityObject> getAssigned(Set<String> spaceKeys, String userName, ReportSort sort)
spaceKeys
- a set containing space keys to search.userName
- the user's namesort
- the sort to be usedCopyright © 2021 Comala Technology Solutions, Inc.. All rights reserved.