Package com.atlassian.jira.workflow
Interface ProjectWorkflowSchemeHelper
- All Known Implementing Classes:
DefaultProjectWorkflowSchemeHelper
@ExperimentalApi
public interface ProjectWorkflowSchemeHelper
Provides the ability to deromilize the workflow -> workflowscheme ->project relationship in a number of different ways.
This is really an internal helper class for Project Configuration.
- Since:
- v4.4
-
Method Summary
Modifier and TypeMethodDescriptiongetAllProjectsForScheme
(Long schemeId) Return a list of projects that use the workflow scheme with the passed query.getAllProjectsForWorkflow
(String workflowName) Returns a list of the projects are currently using the passed workflow.getAllProjectsForWorkflow
(Set<String> workflows) Return a map of active workflow names to the projects that use those workflows.getProjectsForWorkflow
(String workflowName) Returns a list of the projects are currently using the passed workflow.getProjectsForWorkflow
(Set<String> workflows) Return a map of active workflow names to the projects that use those workflows.boolean
isWorkflowIsolated
(String workflowName) Checks whether given workflow is used by only one project.
-
Method Details
-
getAllProjectsForScheme
Return a list of projects that use the workflow scheme with the passed query.- 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
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:- The workflow is mapped to an issue type in the project's scheme and the project has that issue type.
- 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.
- 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.
-
getAllProjectsForWorkflow
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:- The workflow is mapped to an issue type in the project's scheme and the project has that issue type.
- 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.
- 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
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:- The workflow is mapped to an issue type in the project's scheme and the project has that issue type.
- 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 configuration for will be returned.
- 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.
-
getAllProjectsForWorkflow
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:- The workflow is mapped to an issue type in the project's scheme and the project has that issue type.
- The workflow is a default for the project's scheme and there are some unmapped issue types.
All projects will be returned, even projects which cannot be accessible by current user.
- 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.
-
isWorkflowIsolated
Checks whether given workflow is used by only one project.- Parameters:
workflowName
- workflow name.- Returns:
- true if given workflow is used only by one projects, false if it is used by zero or more than one projects.
- Since:
- 7.4
-