com.atlassian.jira.workflow
Class DefaultProjectWorkflowSchemeHelper

java.lang.Object
  extended by com.atlassian.jira.workflow.DefaultProjectWorkflowSchemeHelper
All Implemented Interfaces:
ProjectWorkflowSchemeHelper

public class DefaultProjectWorkflowSchemeHelper
extends Object
implements ProjectWorkflowSchemeHelper

Since:
v4.4

Constructor Summary
DefaultProjectWorkflowSchemeHelper(ProjectService projectService, WorkflowSchemeManager workflowSchemeManager, JiraAuthenticationContext authenticationContext)
           
 
Method Summary
 List<Project> getProjectsForScheme(Long schemeId)
          Return a list of projects that use the workflow scheme with the passed query.
 com.google.common.collect.Multimap<String,Project> getProjectsForWorkflow(Set<String> workflows)
          Return a map of active workflow names to the projects that use those workflows.
 List<Project> getProjectsForWorkflow(String workflowName)
          Returns a list of the projects are currently using the passed workflow.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProjectWorkflowSchemeHelper

public DefaultProjectWorkflowSchemeHelper(ProjectService projectService,
                                          WorkflowSchemeManager workflowSchemeManager,
                                          JiraAuthenticationContext authenticationContext)
Method Detail

getProjectsForScheme

public List<Project> getProjectsForScheme(Long schemeId)
Description copied from interface: ProjectWorkflowSchemeHelper
Return a list of projects that use the workflow scheme with the passed query. Only projects that the passed user can change the configurtion for will be returned.

Specified by:
getProjectsForScheme in interface ProjectWorkflowSchemeHelper
Parameters:
schemeId - the scheme id query. Null can be passed to search for the magical default workflow scheme.
Returns:
a list of projects that use the workflow. The list is sorted by project name. The list is mutable and can be changed by the caller safely.

getProjectsForWorkflow

public List<Project> getProjectsForWorkflow(String workflowName)
Description copied from interface: ProjectWorkflowSchemeHelper
Returns a list of the projects are currently using the passed workflow. A workflow is only considered "active" if it is currently actually being used by a project. This means it is active if:
  1. The workflow is mapped to an issue type in the project's scheme and the project has that issue type.
  2. The workflow is a default for the project's scheme and there are some unmapped issue types.
Only projects that the passed user can change the configurtion for will be returned.

Specified by:
getProjectsForWorkflow in interface ProjectWorkflowSchemeHelper
Parameters:
workflowName - the name of the workflow the check.
Returns:
a list of active projects. The list is sorted by project name. The list is mutable and can be changed by the caller safely.

getProjectsForWorkflow

public com.google.common.collect.Multimap<String,Project> getProjectsForWorkflow(Set<String> workflows)
Description copied from interface: ProjectWorkflowSchemeHelper
Return a map of active workflow names to the projects that use those workflows. A workflow is only considered "active" if it is currently actually being used by a project. This means it is active if:
  1. The workflow is mapped to an issue type in the project's scheme and the project has that issue type.
  2. The workflow is a default for the project's scheme and there are some unmapped issue types.
Only projects that the passed user can change the configurtion for will be returned.

Specified by:
getProjectsForWorkflow in interface ProjectWorkflowSchemeHelper
Parameters:
workflows - the workflows to query.
Returns:
a list of active projects. The projects are sorted by name. The map is mutable and can be changed by the caller.


Copyright © 2002-2013 Atlassian. All Rights Reserved.