public interface WorkflowSchemeManager extends SchemeManager
PROJECT_ASSOCIATION
Modifier and Type | Method and Description |
---|---|
void |
addWorkflowToScheme(org.ofbiz.core.entity.GenericValue scheme,
String workflowName,
String issueTypeId) |
AssignableWorkflowScheme.Builder |
assignableBuilder()
Return a builder that can be used to create a new
AssignableWorkflowScheme . |
AssignableWorkflowScheme |
cleanUpSchemeDraft(Project project,
ApplicationUser user)
If the project's workflow scheme is only used by one project and if this scheme has a draft,
then the draft is copied to a separate scheme and deleted.
|
void |
clearWorkflowCache() |
AssignableWorkflowScheme |
copyDraft(DraftWorkflowScheme draft,
ApplicationUser user,
String newDescription) |
DraftWorkflowScheme |
createDraft(ApplicationUser creator,
DraftWorkflowScheme workflowScheme)
Create the passed draft workflow scheme.
|
DraftWorkflowScheme |
createDraftOf(ApplicationUser creator,
AssignableWorkflowScheme workflowScheme)
Create a draft for the passed workflow scheme.
|
AssignableWorkflowScheme |
createScheme(AssignableWorkflowScheme workflowScheme)
Create a new workflow scheme.
|
boolean |
deleteWorkflowScheme(WorkflowScheme scheme)
Delete the passed workflow scheme.
|
DraftWorkflowScheme.Builder |
draftBuilder(AssignableWorkflowScheme parent)
Return a builder that can be used to create a new
DraftWorkflowScheme for the passed workflow scheme. |
Collection<String> |
getActiveWorkflowNames() |
Iterable<AssignableWorkflowScheme> |
getAssignableSchemes()
Return all the assignable workflow schemes.
|
String |
getAssociationType() |
org.ofbiz.core.entity.GenericValue |
getDefaultEntity(org.ofbiz.core.entity.GenericValue scheme) |
AssignableWorkflowScheme |
getDefaultWorkflowScheme() |
DraftWorkflowScheme |
getDraft(long id)
Return the draft workflow scheme with the given id.
|
DraftWorkflowScheme |
getDraftForParent(AssignableWorkflowScheme workflowScheme)
Return the draft workflow scheme for the passed workflow scheme.
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme)
Get all Scheme entity records for a particular scheme.
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId)
Deprecated.
Workflows have a String ID. Since v6.4.
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId,
String parameter)
Deprecated.
Workflows have a String ID. Since v6.4.
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String entityTypeId)
Inherited from SchemeManager.
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String type,
Long entityTypeId)
Deprecated.
Workflows have a String ID. Since v6.4.
|
String |
getEntityName() |
List<org.ofbiz.core.entity.GenericValue> |
getNonDefaultEntities(org.ofbiz.core.entity.GenericValue scheme) |
AssignableWorkflowScheme |
getParentForDraft(long draftSchemeId)
Return the original workflow scheme for the passed draft workflow scheme.
|
List<Project> |
getProjectsUsing(AssignableWorkflowScheme workflowScheme)
Return the list of projects that use the passed workflow scheme.
|
String |
getSchemeDesc() |
String |
getSchemeEntityName() |
Collection<org.ofbiz.core.entity.GenericValue> |
getSchemesForWorkflow(JiraWorkflow workflow)
Returns all workflow schemes that the passed workflow is assigned to, not including draft schemes.
|
Iterable<WorkflowScheme> |
getSchemesForWorkflowIncludingDrafts(JiraWorkflow workflow)
Returns all workflow schemes that the passed workflow is assigned to, including draft schemes.
|
Map<String,String> |
getWorkflowMap(Project project)
Returns a map representation of a workflow scheme for a passed project.
|
String |
getWorkflowName(org.ofbiz.core.entity.GenericValue scheme,
String issueType)
Get the name of the workflow from the passed scheme associated with the passed issue type.
|
String |
getWorkflowName(Project project,
String issueType)
Get the name of the workflow associated with the passed project and issue type.
|
org.ofbiz.core.entity.GenericValue |
getWorkflowScheme(org.ofbiz.core.entity.GenericValue project) |
org.ofbiz.core.entity.GenericValue |
getWorkflowScheme(Project project) |
AssignableWorkflowScheme |
getWorkflowSchemeObj(long id)
Return the workflow scheme with the passed id.
|
AssignableWorkflowScheme |
getWorkflowSchemeObj(Project project)
Return the workflow scheme associated with the passed project.
|
AssignableWorkflowScheme |
getWorkflowSchemeObj(String name)
Return the workflow scheme with the passed name.
|
boolean |
hasDraft(AssignableWorkflowScheme workflowScheme)
Tells the caller if the passed workflow scheme has a draft.
|
boolean |
isActive(WorkflowScheme workflowScheme)
Return true if the passed workflow scheme is being used by a project.
|
boolean |
isUsingDefaultScheme(Project project)
Tells the caller if the passed project is using the default workflow scheme.
|
void |
replaceSchemeWithDraft(DraftWorkflowScheme draft) |
DraftWorkflowScheme |
updateDraftWorkflowScheme(ApplicationUser user,
DraftWorkflowScheme scheme)
Save changes to the passed draft workflow scheme.
|
void |
updateSchemesForRenamedWorkflow(String oldWorkflowName,
String newWorkflowName)
Updates Workflow Schemes's such that schemes associated to the workflow with name oldWorkflowName will be changed
to newWorkflowName.
|
AssignableWorkflowScheme |
updateWorkflowScheme(AssignableWorkflowScheme scheme)
Save changes to the passed workflow scheme.
|
<T> T |
waitForUpdatesToFinishAndExecute(AssignableWorkflowScheme scheme,
Callable<T> task)
If the passed workflow scheme is currently being edited, then this method blocks until the editing is finished.
|
addDefaultSchemeToProject, addDefaultSchemeToProject, addSchemeToProject, addSchemeToProject, copyScheme, copyScheme, createDefaultScheme, createScheme, createSchemeAndEntities, createSchemeEntity, createSchemeObject, deleteEntities, deleteEntity, deleteScheme, getAssociatedSchemes, getDefaultScheme, getDefaultSchemeObject, getEntities, getEntitiesByIds, getEntity, getGroups, getGroups, getProjects, getScheme, getScheme, getSchemeFor, getSchemeIdFor, getSchemeObject, getSchemeObject, getSchemeObjects, getSchemes, getSchemes, getUnassociatedSchemes, getUsers, getUsers, getUsers, getUsers, removeEntities, removeEntities, removeSchemesFromProject, removeSchemesFromProject, schemeExists, swapParameterForEntitiesOfType, updateScheme, updateScheme
List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme) throws org.ofbiz.core.entity.GenericEntityException
getEntities
in interface SchemeManager
scheme
- The scheme that the entities belong toorg.ofbiz.core.entity.GenericEntityException
- If a DB error occursList<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
getEntities
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
getEntities
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long entityTypeId, String parameter) throws org.ofbiz.core.entity.GenericEntityException
getEntities
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String type, Long entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
getEntities
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
String getSchemeEntityName()
String getEntityName()
String getAssociationType()
String getSchemeDesc()
org.ofbiz.core.entity.GenericValue getWorkflowScheme(org.ofbiz.core.entity.GenericValue project) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericValue getWorkflowScheme(Project project) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericValue getDefaultEntity(org.ofbiz.core.entity.GenericValue scheme) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
AssignableWorkflowScheme getDefaultWorkflowScheme()
List<org.ofbiz.core.entity.GenericValue> getNonDefaultEntities(org.ofbiz.core.entity.GenericValue scheme) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
Collection<String> getActiveWorkflowNames() throws org.ofbiz.core.entity.GenericEntityException, WorkflowException
org.ofbiz.core.entity.GenericEntityException
WorkflowException
void addWorkflowToScheme(org.ofbiz.core.entity.GenericValue scheme, String workflowName, String issueTypeId) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
void updateSchemesForRenamedWorkflow(String oldWorkflowName, String newWorkflowName)
Note: There is no validation performed by this method to determine if the provided oldWorkflowName or newWorkflowName are valid workflow names or if the workflow is active/inactive. These validations must be done by the caller.
oldWorkflowName
- name of the workflow to re-assign all its associated schemes fromnewWorkflowName
- name of the workflow to assign all the schemes associated to targetWorkflowCollection<org.ofbiz.core.entity.GenericValue> getSchemesForWorkflow(JiraWorkflow workflow)
workflow
- the workflow whose schemes must be returnedIterable<WorkflowScheme> getSchemesForWorkflowIncludingDrafts(JiraWorkflow workflow)
workflow
- the workflow whose schemes must be returnedvoid clearWorkflowCache()
Map<String,String> getWorkflowMap(Project project)
project
- the project whose scheme should be returned.String getWorkflowName(Project project, String issueType)
project
- the project used in the search.issueType
- the issue type used in the search.String getWorkflowName(org.ofbiz.core.entity.GenericValue scheme, String issueType)
scheme
- the scheme to search.issueType
- the issue type used in the search.boolean isUsingDefaultScheme(Project project)
project
- the project to check.boolean hasDraft(@Nonnull AssignableWorkflowScheme workflowScheme)
workflowScheme
- the workflow scheme to check. It is illegal to pass a draft workflow scheme to this method.AssignableWorkflowScheme.Builder assignableBuilder()
AssignableWorkflowScheme
.DraftWorkflowScheme.Builder draftBuilder(AssignableWorkflowScheme parent)
DraftWorkflowScheme
for the passed workflow scheme.@Nonnull AssignableWorkflowScheme createScheme(@Nonnull AssignableWorkflowScheme workflowScheme)
workflowScheme
- the workflow scheme to create a draft of. It cannot be a draft, the default scheme, a scheme
that already has a draft or a scheme that is not already in the database (i.e. does not have an ID).@Nonnull DraftWorkflowScheme createDraftOf(ApplicationUser creator, @Nonnull AssignableWorkflowScheme workflowScheme)
creator
- the user that is going to create the draft. This user is recorded as the person who last
modified the new draftscheme.workflowScheme
- the workflow scheme to create a draft of. It cannot be a draft, the default scheme, a scheme
that already has a draft or a scheme that is not already in the database (i.e. does not have an ID).@Nonnull DraftWorkflowScheme createDraft(ApplicationUser creator, @Nonnull DraftWorkflowScheme workflowScheme)
draftBuilder(AssignableWorkflowScheme)
method.
creator
- the user that is going to create the draft. This user is recorded as the person who last
modified the new draftscheme.workflowScheme
- the workflow scheme to create.@Nonnull Iterable<AssignableWorkflowScheme> getAssignableSchemes()
@Nullable AssignableWorkflowScheme getWorkflowSchemeObj(long id)
id
- the id to search.@Nullable AssignableWorkflowScheme getWorkflowSchemeObj(String name)
name
- the name to search.@Nonnull AssignableWorkflowScheme getWorkflowSchemeObj(@Nonnull Project project)
project
- the project whose scheme is to be returned.DraftWorkflowScheme getDraftForParent(@Nonnull AssignableWorkflowScheme workflowScheme)
workflowScheme
- the workflow scheme whose draft is being sought.DraftWorkflowScheme getDraft(long id)
id
- the id of the draft workflow scheme to be returnedAssignableWorkflowScheme getParentForDraft(long draftSchemeId)
draftSchemeId
- the id of the draft workflow scheme whose parent is being sought.boolean isActive(@Nonnull WorkflowScheme workflowScheme)
workflowScheme
- the workflow scheme to test.boolean deleteWorkflowScheme(@Nonnull WorkflowScheme scheme)
scheme
- the scheme to delete. Cannot be the default scheme, active scheme or a scheme that is not already
in the database.DraftWorkflowScheme updateDraftWorkflowScheme(ApplicationUser user, @Nonnull DraftWorkflowScheme scheme)
user
- the user making the changes.scheme
- the draft scheme to change.AssignableWorkflowScheme updateWorkflowScheme(@Nonnull AssignableWorkflowScheme scheme)
scheme
- the scheme to change.@Nonnull List<Project> getProjectsUsing(@Nonnull AssignableWorkflowScheme workflowScheme)
workflowScheme
- the workflow scheme to check.AssignableWorkflowScheme cleanUpSchemeDraft(Project project, ApplicationUser user)
project
- project who's workflow scheme draft is to be copied to a separate scheme.user
- the user making the changes.AssignableWorkflowScheme copyDraft(DraftWorkflowScheme draft, ApplicationUser user, String newDescription)
void replaceSchemeWithDraft(DraftWorkflowScheme draft)
<T> T waitForUpdatesToFinishAndExecute(AssignableWorkflowScheme scheme, Callable<T> task) throws Exception
T
- return type of the task.scheme
- the workflow scheme.task
- task to execute.Exception
- any exception occurred during task execution.Copyright © 2002-2016 Atlassian. All Rights Reserved.