public class DefaultWorkflowSchemeManager extends AbstractSchemeManager implements WorkflowSchemeManager, Startable
eventPublisher, groupManager, projectManager, schemeFactory, securityTypeManager
PROJECT_ASSOCIATION
Constructor and Description |
---|
DefaultWorkflowSchemeManager(ProjectManager projectManager,
PermissionTypeManager permissionTypeManager,
PermissionContextFactory permissionContextFactory,
SchemeFactory schemeFactory,
WorkflowManager workflowManager,
ConstantsManager constantsManager,
OfBizDelegator ofBizDelegator,
com.atlassian.event.api.EventPublisher eventPublisher,
NodeAssociationStore nodeAssociationStore,
GroupManager groupManager,
DraftWorkflowSchemeStore draftWorkflowSchemeStore,
JiraAuthenticationContext context,
UserManager userManager,
I18nHelper.BeanFactory i18nFactory,
AssignableWorkflowSchemeStore assignableWorkflowSchemeStore,
com.atlassian.cache.CacheManager cacheManager,
com.atlassian.beehive.ClusterLockService clusterLockService) |
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.
|
org.ofbiz.core.entity.GenericValue |
createScheme(String name,
String description)
Creates a new scheme
|
protected AbstractSchemeAddedToProjectEvent |
createSchemeAddedToProjectEvent(Scheme scheme,
Project project) |
protected AbstractSchemeCopiedEvent |
createSchemeCopiedEvent(Scheme oldScheme,
Scheme newScheme) |
protected AbstractSchemeEvent |
createSchemeCreatedEvent(Scheme scheme) |
org.ofbiz.core.entity.GenericValue |
createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
SchemeEntity schemeEntity) |
org.ofbiz.core.entity.GenericValue |
createSchemeEntity(long schemeId,
SchemeEntity schemeEntity) |
protected Object |
createSchemeEntityDeletedEvent(org.ofbiz.core.entity.GenericValue entity) |
protected org.ofbiz.core.entity.GenericValue |
createSchemeEntityNoEvent(org.ofbiz.core.entity.GenericValue scheme,
SchemeEntity schemeEntity) |
protected AbstractSchemeRemovedFromProjectEvent |
createSchemeRemovedFromProjectEvent(Scheme scheme,
Project project) |
protected AbstractSchemeUpdatedEvent |
createSchemeUpdatedEvent(Scheme scheme,
Scheme originalScheme) |
void |
deleteEntities(Iterable<Long> ids)
Deletes a collection of entities from the database.
|
void |
deleteEntity(Long id)
Deletes an entity with the given id from the database.
|
void |
deleteScheme(Long id)
Deletes a scheme from the database
|
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. |
protected void |
flushProjectSchemes() |
Collection<String> |
getActiveWorkflowNames() |
Iterable<AssignableWorkflowScheme> |
getAssignableSchemes()
Return all the assignable workflow schemes.
|
String |
getDefaultDescriptionKey() |
org.ofbiz.core.entity.GenericValue |
getDefaultEntity(org.ofbiz.core.entity.GenericValue scheme) |
String |
getDefaultNameKey() |
AssignableWorkflowScheme |
getDefaultWorkflowScheme() |
DraftWorkflowScheme |
getDraft(long id)
Return the draft workflow scheme with the given id.
|
DraftWorkflowScheme |
getDraftForParent(AssignableWorkflowScheme scheme)
Return the draft workflow scheme for the passed workflow scheme.
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId)
Inherited from SchemeManager.
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId,
String parameter)
Inherited from SchemeManager.
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String issuetype)
Inherited from SchemeManager.
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String type,
Long entityTypeId)
Inherited from SchemeManager.
|
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 issueTypeId)
Get the name of the workflow from the passed scheme associated with the passed issue type.
|
String |
getWorkflowName(Project project,
String issueTypeId)
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 scheme)
Tells the caller if the passed workflow scheme has a draft.
|
boolean |
isActive(WorkflowScheme scheme)
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.
|
protected SchemeEntity |
makeSchemeEntity(org.ofbiz.core.entity.GenericValue entity) |
void |
onClearCache(ClearCacheEvent event) |
boolean |
removeEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId)
Retrieves all the entites for this permission and then removes them.
|
void |
replaceSchemeWithDraft(DraftWorkflowScheme draft) |
void |
start()
This method will be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
|
DraftWorkflowScheme |
updateDraftWorkflowScheme(ApplicationUser user,
DraftWorkflowScheme scheme)
Save changes to the passed draft workflow scheme.
|
void |
updateScheme(org.ofbiz.core.entity.GenericValue entity)
Updates any changes to the given scheme
|
void |
updateScheme(Scheme scheme)
Updates any changes to the scheme object.
|
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 workflowScheme)
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, createSchemeAndEntities, createSchemeGenericValue, createSchemeNoEvent, createSchemeObject, getApplicationI18n, getAssociatedSchemes, getAssociationType, getDefaultScheme, getDefaultSchemeObject, getEntities, getEntities, getEntitiesByIds, getEntity, getGroups, getGroups, getNameForCopy, getProjects, getScheme, getScheme, getSchemeFor, getSchemeIdFor, getSchemeObject, getSchemeObject, getSchemeObjects, getSchemes, getSchemes, getUnassociatedSchemes, getUsers, getUsers, getUsers, getUsers, removeEntities, removeSchemesFromProject, removeSchemesFromProject, schemeExists, swapParameterForEntitiesOfType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAssociationType, getEntities
addDefaultSchemeToProject, addDefaultSchemeToProject, addSchemeToProject, addSchemeToProject, copyScheme, copyScheme, createDefaultScheme, createSchemeAndEntities, createSchemeObject, getAssociatedSchemes, getDefaultScheme, getDefaultSchemeObject, getEntities, getEntitiesByIds, getEntity, getGroups, getGroups, getProjects, getScheme, getScheme, getSchemeFor, getSchemeIdFor, getSchemeObject, getSchemeObject, getSchemeObjects, getSchemes, getSchemes, getUnassociatedSchemes, getUsers, getUsers, getUsers, getUsers, removeEntities, removeSchemesFromProject, removeSchemesFromProject, schemeExists, swapParameterForEntitiesOfType
public DefaultWorkflowSchemeManager(ProjectManager projectManager, PermissionTypeManager permissionTypeManager, PermissionContextFactory permissionContextFactory, SchemeFactory schemeFactory, WorkflowManager workflowManager, ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, com.atlassian.event.api.EventPublisher eventPublisher, NodeAssociationStore nodeAssociationStore, GroupManager groupManager, DraftWorkflowSchemeStore draftWorkflowSchemeStore, JiraAuthenticationContext context, UserManager userManager, I18nHelper.BeanFactory i18nFactory, AssignableWorkflowSchemeStore assignableWorkflowSchemeStore, com.atlassian.cache.CacheManager cacheManager, com.atlassian.beehive.ClusterLockService clusterLockService)
public void start()
Startable
@EventListener public void onClearCache(ClearCacheEvent event)
onClearCache
in class AbstractSchemeManager
public String getSchemeEntityName()
getSchemeEntityName
in interface WorkflowSchemeManager
getSchemeEntityName
in class AbstractSchemeManager
public String getEntityName()
getEntityName
in interface WorkflowSchemeManager
getEntityName
in class AbstractSchemeManager
public void clearWorkflowCache()
clearWorkflowCache
in interface WorkflowSchemeManager
public String getSchemeDesc()
getSchemeDesc
in interface WorkflowSchemeManager
getSchemeDesc
in class AbstractSchemeManager
public String getDefaultNameKey()
getDefaultNameKey
in class AbstractSchemeManager
public String getDefaultDescriptionKey()
getDefaultDescriptionKey
in class AbstractSchemeManager
public org.ofbiz.core.entity.GenericValue getWorkflowScheme(org.ofbiz.core.entity.GenericValue project) throws org.ofbiz.core.entity.GenericEntityException
getWorkflowScheme
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue getWorkflowScheme(Project project) throws org.ofbiz.core.entity.GenericEntityException
getWorkflowScheme
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
public boolean hasDraft(@Nonnull AssignableWorkflowScheme scheme)
WorkflowSchemeManager
hasDraft
in interface WorkflowSchemeManager
scheme
- the workflow scheme to check. It is illegal to pass a draft workflow scheme to this method.@Nonnull public AssignableWorkflowScheme createScheme(@Nonnull AssignableWorkflowScheme workflowScheme)
WorkflowSchemeManager
createScheme
in interface WorkflowSchemeManager
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).public org.ofbiz.core.entity.GenericValue createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme, SchemeEntity schemeEntity) throws org.ofbiz.core.entity.GenericEntityException
createSchemeEntity
in interface SchemeManager
org.ofbiz.core.entity.GenericEntityException
protected org.ofbiz.core.entity.GenericValue createSchemeEntityNoEvent(org.ofbiz.core.entity.GenericValue scheme, SchemeEntity schemeEntity) throws org.ofbiz.core.entity.GenericEntityException
createSchemeEntityNoEvent
in class AbstractSchemeManager
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue createSchemeEntity(long schemeId, SchemeEntity schemeEntity) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String issuetype) throws org.ofbiz.core.entity.GenericEntityException
WorkflowSchemeManager
getEntities
in interface SchemeManager
getEntities
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
public Map<String,String> getWorkflowMap(Project project)
WorkflowSchemeManager
getWorkflowMap
in interface WorkflowSchemeManager
project
- the project whose scheme should be returned.public String getWorkflowName(Project project, String issueTypeId)
WorkflowSchemeManager
getWorkflowName
in interface WorkflowSchemeManager
project
- the project used in the search.issueTypeId
- the ID of issue type used in the search.public String getWorkflowName(org.ofbiz.core.entity.GenericValue scheme, String issueTypeId)
WorkflowSchemeManager
getWorkflowName
in interface WorkflowSchemeManager
scheme
- the scheme to search.issueTypeId
- the ID of issue type used in the search.public boolean isUsingDefaultScheme(Project project)
WorkflowSchemeManager
isUsingDefaultScheme
in interface WorkflowSchemeManager
project
- the project to check.public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
WorkflowSchemeManager
getEntities
in interface SchemeManager
getEntities
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long entityTypeId, String parameter) throws org.ofbiz.core.entity.GenericEntityException
WorkflowSchemeManager
getEntities
in interface SchemeManager
getEntities
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
public List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String type, Long entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
WorkflowSchemeManager
getEntities
in interface SchemeManager
getEntities
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue getDefaultEntity(org.ofbiz.core.entity.GenericValue scheme) throws org.ofbiz.core.entity.GenericEntityException
getDefaultEntity
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
public AssignableWorkflowScheme getDefaultWorkflowScheme()
getDefaultWorkflowScheme
in interface WorkflowSchemeManager
public List<org.ofbiz.core.entity.GenericValue> getNonDefaultEntities(org.ofbiz.core.entity.GenericValue scheme) throws org.ofbiz.core.entity.GenericEntityException
getNonDefaultEntities
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
public Collection<String> getActiveWorkflowNames() throws org.ofbiz.core.entity.GenericEntityException, WorkflowException
getActiveWorkflowNames
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
WorkflowException
public void addWorkflowToScheme(org.ofbiz.core.entity.GenericValue scheme, String workflowName, String issueTypeId) throws org.ofbiz.core.entity.GenericEntityException
addWorkflowToScheme
in interface WorkflowSchemeManager
org.ofbiz.core.entity.GenericEntityException
@Nonnull public DraftWorkflowScheme createDraftOf(ApplicationUser creator, @Nonnull AssignableWorkflowScheme workflowScheme)
WorkflowSchemeManager
createDraftOf
in interface WorkflowSchemeManager
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 public DraftWorkflowScheme createDraft(ApplicationUser creator, @Nonnull DraftWorkflowScheme workflowScheme)
WorkflowSchemeManager
WorkflowSchemeManager.draftBuilder(AssignableWorkflowScheme)
method.
createDraft
in interface WorkflowSchemeManager
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 public Iterable<AssignableWorkflowScheme> getAssignableSchemes()
WorkflowSchemeManager
getAssignableSchemes
in interface WorkflowSchemeManager
public void updateSchemesForRenamedWorkflow(String oldWorkflowName, String newWorkflowName)
WorkflowSchemeManager
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.
updateSchemesForRenamedWorkflow
in interface WorkflowSchemeManager
oldWorkflowName
- name of the workflow to re-assign all its associated schemes fromnewWorkflowName
- name of the workflow to assign all the schemes associated to targetWorkflowpublic Collection<org.ofbiz.core.entity.GenericValue> getSchemesForWorkflow(JiraWorkflow workflow)
WorkflowSchemeManager
getSchemesForWorkflow
in interface WorkflowSchemeManager
workflow
- the workflow whose schemes must be returnedpublic Iterable<WorkflowScheme> getSchemesForWorkflowIncludingDrafts(JiraWorkflow workflow)
WorkflowSchemeManager
getSchemesForWorkflowIncludingDrafts
in interface WorkflowSchemeManager
workflow
- the workflow whose schemes must be returnedpublic void deleteEntity(Long id) throws DataAccessException
SchemeManager
deleteEntity
in interface SchemeManager
deleteEntity
in class AbstractSchemeManager
id
- The id of the entity to be deletedDataAccessException
public void deleteEntities(Iterable<Long> ids)
SchemeManager
deleteEntities
in interface SchemeManager
deleteEntities
in class AbstractSchemeManager
ids
- a collection entity ids to be deleted.protected SchemeEntity makeSchemeEntity(org.ofbiz.core.entity.GenericValue entity)
makeSchemeEntity
in class AbstractSchemeManager
protected Object createSchemeEntityDeletedEvent(org.ofbiz.core.entity.GenericValue entity)
createSchemeEntityDeletedEvent
in class AbstractSchemeManager
public boolean removeEntities(org.ofbiz.core.entity.GenericValue scheme, Long entityTypeId) throws RemoveException
SchemeManager
removeEntities
in interface SchemeManager
removeEntities
in class AbstractSchemeManager
scheme
- to remove entites from must NOT be nullentityTypeId
- to removeRemoveException
- if the delete fails (DB error)public org.ofbiz.core.entity.GenericValue createScheme(String name, String description) throws org.ofbiz.core.entity.GenericEntityException
SchemeManager
createScheme
in interface SchemeManager
createScheme
in class AbstractSchemeManager
name
- The name of the new schemedescription
- The description of the new schemeorg.ofbiz.core.entity.GenericEntityException
- If a DB error occursprotected AbstractSchemeEvent createSchemeCreatedEvent(Scheme scheme)
createSchemeCreatedEvent
in class AbstractSchemeManager
@Nonnull protected AbstractSchemeCopiedEvent createSchemeCopiedEvent(@Nonnull Scheme oldScheme, @Nonnull Scheme newScheme)
createSchemeCopiedEvent
in class AbstractSchemeManager
public void deleteScheme(Long id)
SchemeManager
deleteScheme
in interface SchemeManager
deleteScheme
in class AbstractSchemeManager
id
- Id of the scheme to be deleted@Nonnull protected AbstractSchemeAddedToProjectEvent createSchemeAddedToProjectEvent(Scheme scheme, Project project)
createSchemeAddedToProjectEvent
in class AbstractSchemeManager
protected void flushProjectSchemes()
flushProjectSchemes
in class AbstractSchemeManager
@Nullable public AssignableWorkflowScheme getWorkflowSchemeObj(long id)
WorkflowSchemeManager
getWorkflowSchemeObj
in interface WorkflowSchemeManager
id
- the id to search.public AssignableWorkflowScheme getWorkflowSchemeObj(String name)
WorkflowSchemeManager
getWorkflowSchemeObj
in interface WorkflowSchemeManager
name
- the name to search.public DraftWorkflowScheme getDraftForParent(@Nonnull AssignableWorkflowScheme scheme)
WorkflowSchemeManager
getDraftForParent
in interface WorkflowSchemeManager
scheme
- the workflow scheme whose draft is being sought.public DraftWorkflowScheme getDraft(long id)
WorkflowSchemeManager
getDraft
in interface WorkflowSchemeManager
id
- the id of the draft workflow scheme to be returnedpublic AssignableWorkflowScheme getParentForDraft(long draftSchemeId)
WorkflowSchemeManager
getParentForDraft
in interface WorkflowSchemeManager
draftSchemeId
- the id of the draft workflow scheme whose parent is being sought.public boolean isActive(@Nonnull WorkflowScheme scheme)
WorkflowSchemeManager
isActive
in interface WorkflowSchemeManager
scheme
- the workflow scheme to test.public boolean deleteWorkflowScheme(@Nonnull WorkflowScheme scheme)
WorkflowSchemeManager
deleteWorkflowScheme
in interface WorkflowSchemeManager
scheme
- the scheme to delete. Cannot be the default scheme, active scheme or a scheme that is not already
in the database.public DraftWorkflowScheme updateDraftWorkflowScheme(ApplicationUser user, @Nonnull DraftWorkflowScheme scheme)
WorkflowSchemeManager
updateDraftWorkflowScheme
in interface WorkflowSchemeManager
user
- the user making the changes.scheme
- the draft scheme to change.public AssignableWorkflowScheme updateWorkflowScheme(@Nonnull AssignableWorkflowScheme workflowScheme)
WorkflowSchemeManager
updateWorkflowScheme
in interface WorkflowSchemeManager
workflowScheme
- the scheme to change.public void updateScheme(org.ofbiz.core.entity.GenericValue entity) throws org.ofbiz.core.entity.GenericEntityException
SchemeManager
updateScheme
in interface SchemeManager
updateScheme
in class AbstractSchemeManager
entity
- The modified schemeorg.ofbiz.core.entity.GenericEntityException
- If a DB error occurspublic void updateScheme(Scheme scheme) throws DataAccessException
SchemeManager
updateScheme
in interface SchemeManager
updateScheme
in class AbstractSchemeManager
scheme
- The modified scheme objectDataAccessException
@Nonnull protected AbstractSchemeRemovedFromProjectEvent createSchemeRemovedFromProjectEvent(Scheme scheme, Project project)
createSchemeRemovedFromProjectEvent
in class AbstractSchemeManager
protected AbstractSchemeUpdatedEvent createSchemeUpdatedEvent(Scheme scheme, Scheme originalScheme)
createSchemeUpdatedEvent
in class AbstractSchemeManager
public <T> T waitForUpdatesToFinishAndExecute(AssignableWorkflowScheme scheme, Callable<T> task) throws Exception
WorkflowSchemeManager
waitForUpdatesToFinishAndExecute
in interface WorkflowSchemeManager
T
- return type of the task.scheme
- the workflow scheme.task
- task to execute.Exception
- any exception occurred during task execution.@Nonnull public AssignableWorkflowScheme getWorkflowSchemeObj(@Nonnull Project project)
WorkflowSchemeManager
getWorkflowSchemeObj
in interface WorkflowSchemeManager
project
- the project whose scheme is to be returned.@Nonnull public List<Project> getProjectsUsing(@Nonnull AssignableWorkflowScheme workflowScheme)
WorkflowSchemeManager
getProjectsUsing
in interface WorkflowSchemeManager
workflowScheme
- the workflow scheme to check.public AssignableWorkflowScheme cleanUpSchemeDraft(Project project, ApplicationUser user)
WorkflowSchemeManager
cleanUpSchemeDraft
in interface WorkflowSchemeManager
project
- project who's workflow scheme draft is to be copied to a separate scheme.user
- the user making the changes.public AssignableWorkflowScheme copyDraft(DraftWorkflowScheme draft, ApplicationUser user, String newDescription)
copyDraft
in interface WorkflowSchemeManager
public void replaceSchemeWithDraft(DraftWorkflowScheme draft)
replaceSchemeWithDraft
in interface WorkflowSchemeManager
public AssignableWorkflowScheme.Builder assignableBuilder()
WorkflowSchemeManager
AssignableWorkflowScheme
.assignableBuilder
in interface WorkflowSchemeManager
public DraftWorkflowScheme.Builder draftBuilder(AssignableWorkflowScheme parent)
WorkflowSchemeManager
DraftWorkflowScheme
for the passed workflow scheme.draftBuilder
in interface WorkflowSchemeManager
Copyright © 2002-2024 Atlassian. All Rights Reserved.