|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.scheme.AbstractSchemeManager com.atlassian.jira.workflow.DefaultWorkflowSchemeManager
public class DefaultWorkflowSchemeManager
Field Summary |
---|
Fields inherited from class com.atlassian.jira.scheme.AbstractSchemeManager |
---|
projectManager, schemeFactory |
Fields inherited from interface com.atlassian.jira.scheme.SchemeManager |
---|
PROJECT_ASSOCIATION |
Constructor Summary | |
---|---|
DefaultWorkflowSchemeManager(ProjectManager projectManager,
PermissionTypeManager permissionTypeManager,
PermissionContextFactory permissionContextFactory,
SchemeFactory schemeFactory,
WorkflowManager workflowManager,
ConstantsManager constantsManager,
OfBizDelegator ofBizDelegator,
com.atlassian.event.api.EventPublisher eventPublisher,
AssociationManager associationManager,
GroupManager groupManager)
|
Method Summary | |
---|---|
void |
addSchemeToProject(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue scheme)
Adds a scheme to a particular project |
void |
addSchemeToProject(Project project,
Scheme scheme)
Adds a scheme to a particular project |
void |
addWorkflowToScheme(org.ofbiz.core.entity.GenericValue scheme,
String workflowName,
String issueTypeId)
|
void |
clearWorkflowCache()
|
Scheme |
copyScheme(Scheme scheme)
Copys a scheme, giving the new scheme the same entities as the original one |
org.ofbiz.core.entity.GenericValue |
copySchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
org.ofbiz.core.entity.GenericValue entity)
|
org.ofbiz.core.entity.GenericValue |
createScheme(String name,
String description)
Creates a new scheme |
org.ofbiz.core.entity.GenericValue |
createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme,
SchemeEntity schemeEntity)
|
Scheme |
createSchemeObject(String name,
String description)
Creates a new scheme |
void |
deleteEntity(Long id)
Deletes an entity with the given id from the database. |
void |
deleteScheme(Long id)
Deletes a scheme from the database |
protected void |
flushProjectSchemes()
|
Collection<String> |
getActiveWorkflowNames()
|
protected List<org.ofbiz.core.entity.GenericValue> |
getAllIssueTypes()
|
String |
getDefaultDescriptionKey()
|
org.ofbiz.core.entity.GenericValue |
getDefaultEntity(org.ofbiz.core.entity.GenericValue scheme)
|
String |
getDefaultNameKey()
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId)
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
Long entityTypeId,
String parameter)
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String issuetype)
|
List<org.ofbiz.core.entity.GenericValue> |
getEntities(org.ofbiz.core.entity.GenericValue scheme,
String type,
Long entityTypeId)
|
String |
getEntityName()
|
List<org.ofbiz.core.entity.GenericValue> |
getNonDefaultEntities(org.ofbiz.core.entity.GenericValue scheme)
|
String |
getSchemeDesc()
|
String |
getSchemeEntityName()
|
Collection<org.ofbiz.core.entity.GenericValue> |
getSchemesForWorkflow(JiraWorkflow workflow)
|
protected JiraWorkflow |
getWorkflowFromScheme(org.ofbiz.core.entity.GenericValue workflowScheme,
String issueTypeId)
|
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)
|
boolean |
hasSchemeAuthority(Long entityType,
org.ofbiz.core.entity.GenericValue entity)
Checks anonymous permission of the given permission type for the given entity. |
boolean |
hasSchemeAuthority(Long entityType,
org.ofbiz.core.entity.GenericValue entity,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Checks the given user's permission of the given permission type for the given entity. |
boolean |
isUsingDefaultScheme(Project project)
Tells the caller if the passed project is using the default workflow scheme. |
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 |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
void |
updateScheme(Scheme scheme)
Updates any changes to the scheme object. |
void |
updateSchemesForRenamedWorkflow(String oldWorkflowName,
String newWorkflowName)
Updates Workflow Schemes's such that schemes asscoiated to the workflow with name oldWorkflowName will be changed to newWorkflowName. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.workflow.WorkflowSchemeManager |
---|
getAssociationType |
Methods inherited from interface com.atlassian.jira.scheme.SchemeManager |
---|
addDefaultSchemeToProject, addDefaultSchemeToProject, copyScheme, createDefaultScheme, createSchemeAndEntities, getAssociatedSchemes, getDefaultScheme, getDefaultSchemeObject, getEntities, getEntities, getEntity, getGroups, getGroups, getProjects, getProjects, getScheme, getScheme, getSchemeFor, getSchemeObject, getSchemeObject, getSchemeObjects, getSchemes, getSchemes, getUnassociatedSchemes, getUsers, getUsers, getUsers, getUsers, removeEntities, removeSchemesFromProject, removeSchemesFromProject, schemeExists, updateScheme |
Constructor Detail |
---|
public DefaultWorkflowSchemeManager(ProjectManager projectManager, PermissionTypeManager permissionTypeManager, PermissionContextFactory permissionContextFactory, SchemeFactory schemeFactory, WorkflowManager workflowManager, ConstantsManager constantsManager, OfBizDelegator ofBizDelegator, com.atlassian.event.api.EventPublisher eventPublisher, AssociationManager associationManager, GroupManager groupManager)
Method Detail |
---|
public void start() throws Exception
Startable
start
in interface Startable
Exception
- Allows implementations to throw an Exception.@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 createSchemeEntity(org.ofbiz.core.entity.GenericValue scheme, SchemeEntity schemeEntity) throws org.ofbiz.core.entity.GenericEntityException
createSchemeEntity
in interface SchemeManager
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
getEntities
in interface SchemeManager
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 issueType)
WorkflowSchemeManager
getWorkflowName
in interface WorkflowSchemeManager
project
- the project used in the search.issueType
- the issue type used in the search.
public String getWorkflowName(org.ofbiz.core.entity.GenericValue scheme, String issueType)
WorkflowSchemeManager
getWorkflowName
in interface WorkflowSchemeManager
scheme
- the scheme to search.issueType
- the issue type used in the search.
public boolean isUsingDefaultScheme(Project project)
WorkflowSchemeManager
isUsingDefaultScheme
in interface WorkflowSchemeManager
project
- the project to check.
public org.ofbiz.core.entity.GenericValue copySchemeEntity(org.ofbiz.core.entity.GenericValue scheme, org.ofbiz.core.entity.GenericValue entity) throws org.ofbiz.core.entity.GenericEntityException
copySchemeEntity
in class AbstractSchemeManager
org.ofbiz.core.entity.GenericEntityException
public List<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
public 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
public 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
public boolean hasSchemeAuthority(Long entityType, org.ofbiz.core.entity.GenericValue entity)
SchemeManager
hasSchemeAuthority
in interface SchemeManager
entityType
- permission type.entity
- the entity to which permission is being checked.
public boolean hasSchemeAuthority(Long entityType, org.ofbiz.core.entity.GenericValue entity, com.atlassian.crowd.embedded.api.User user, boolean issueCreation)
SchemeManager
hasSchemeAuthority
in interface SchemeManager
entityType
- permission type.entity
- the entity to which permission is being checked.user
- the user.issueCreation
- whether the permission is for creating an issue.
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 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
public void updateSchemesForRenamedWorkflow(String oldWorkflowName, String newWorkflowName)
WorkflowSchemeManager
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)
getSchemesForWorkflow
in interface WorkflowSchemeManager
public void deleteEntity(Long id) throws DataAccessException
SchemeManager
deleteEntity
in interface SchemeManager
deleteEntity
in class AbstractSchemeManager
id
- The id of the entity to be deleted
DataAccessException
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 remove
RemoveException
- 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 scheme
org.ofbiz.core.entity.GenericEntityException
- If a DB error occurspublic Scheme createSchemeObject(String name, String description)
SchemeManager
createSchemeObject
in interface SchemeManager
createSchemeObject
in class AbstractSchemeManager
name
- The name of the new schemedescription
- The description of the new scheme
public Scheme copyScheme(Scheme scheme)
SchemeManager
copyScheme
in interface SchemeManager
copyScheme
in class AbstractSchemeManager
scheme
- The permission scheme to be copied
public void updateScheme(Scheme scheme) throws DataAccessException
SchemeManager
updateScheme
in interface SchemeManager
updateScheme
in class AbstractSchemeManager
scheme
- The modified scheme object
DataAccessException
public void deleteScheme(Long id) throws org.ofbiz.core.entity.GenericEntityException
SchemeManager
deleteScheme
in interface SchemeManager
deleteScheme
in class AbstractSchemeManager
id
- Id of the scheme to be deleted
org.ofbiz.core.entity.GenericEntityException
- If a DB error occurspublic void addSchemeToProject(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue scheme) throws org.ofbiz.core.entity.GenericEntityException
SchemeManager
addSchemeToProject
in interface SchemeManager
addSchemeToProject
in class AbstractSchemeManager
project
- The project that the scheme is to be added toscheme
- The scheme to be added
org.ofbiz.core.entity.GenericEntityException
- If a DB error occurspublic void addSchemeToProject(Project project, Scheme scheme) throws DataAccessException
SchemeManager
addSchemeToProject
in interface SchemeManager
addSchemeToProject
in class AbstractSchemeManager
project
- The project that the scheme is to be added toscheme
- The scheme to be added
DataAccessException
protected void flushProjectSchemes()
flushProjectSchemes
in class AbstractSchemeManager
protected List<org.ofbiz.core.entity.GenericValue> getAllIssueTypes()
protected JiraWorkflow getWorkflowFromScheme(org.ofbiz.core.entity.GenericValue workflowScheme, String issueTypeId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |