com.atlassian.greenhopper.service.workflow
Interface WorkflowService

All Known Implementing Classes:
WorkflowServiceImpl

public interface WorkflowService

Provides workflow related service methods


Field Summary
static java.lang.String SERVICE
           
 
Method Summary
 ServiceOutcome<java.lang.Void> associateSchemeToProject(com.atlassian.jira.project.Project project, com.atlassian.jira.scheme.Scheme scheme)
          Associates scheme to project
 ServiceOutcome<java.lang.Void> associateWorkflowToSchemeAsDefault(java.lang.String workflowName, com.atlassian.jira.scheme.Scheme scheme)
          Associates a workflow to the given scheme, makes it the default workflow for that scheme
 ServiceOutcome<com.atlassian.jira.workflow.JiraWorkflow> copyWorkflow(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.workflow.JiraWorkflow workflow, java.lang.String newName, java.lang.String newDescription)
          Creates a new copy of the existing workflow, with the specified name and description.
 ServiceOutcome<java.lang.Void> deleteScheme(java.lang.String name)
          Delete a workflow scheme with the specified name
 ServiceOutcome<java.lang.Void> deleteWorkflow(java.lang.String name)
          Delete a workflow with the specified name.
 ServiceOutcome<java.lang.Boolean> doesWorkflowSchemeExist(java.lang.String name)
          Does a workflow scheme with the specified name exist?
 java.util.Set<com.atlassian.jira.issue.status.Status> getAccessibleStatuses(com.atlassian.crowd.embedded.api.User user, com.atlassian.query.Query query)
          Get the list of accessible statuses for issues potentially returned by the current query.
 java.util.Set<com.atlassian.jira.issue.status.Status> getAllWorkflowStatusObjects()
          Get all workflow statuses available in the system
 java.util.Collection<com.atlassian.jira.workflow.JiraWorkflow> getJiraWorkflows(com.atlassian.jira.project.Project project)
          Given a project, returns all JIRA workflows which are associated to that project Empty on error
 java.util.Collection<com.atlassian.jira.workflow.JiraWorkflow> getJiraWorkflows(com.atlassian.jira.project.Project project, java.lang.String issueTypeId)
          Given a project and an issue type id, returns the JIRA Workflow which is associated to that project for that issue type Empty on error
 com.atlassian.jira.issue.status.Status getStatusByName(java.lang.String statusName)
          Get a status given its name
 ServiceOutcome<com.atlassian.jira.workflow.JiraWorkflow> getWorkflow(com.atlassian.crowd.embedded.api.User user, java.lang.String workflowName)
          Retrieve the workflow with the specified name
 ServiceOutcome<com.atlassian.jira.scheme.Scheme> getWorkflowSchemeForProject(com.atlassian.jira.project.Project project)
          Returns the scheme currently associated to the specified Project.
 ServiceOutcome<java.util.Collection<com.atlassian.jira.workflow.JiraWorkflow>> getWorkflowsForProject(com.atlassian.jira.project.Project project)
          Retrieve the workflows that are in use for the specified Project.
 com.atlassian.jira.issue.status.Status getWorkflowStatusObject(java.lang.String statusId)
          Get the status object for a given id
 ServiceOutcome<java.lang.Boolean> isStatusInitialStatus(com.atlassian.jira.workflow.JiraWorkflow workflow, com.atlassian.jira.issue.status.Status status)
          Is this status the initial status for this workflow?
 ServiceOutcome<java.lang.Boolean> isWorkflowSchemeActive(java.lang.String name)
          Is the workflow scheme with the specified name active?
 

Field Detail

SERVICE

static final java.lang.String SERVICE
See Also:
Constant Field Values
Method Detail

getAllWorkflowStatusObjects

java.util.Set<com.atlassian.jira.issue.status.Status> getAllWorkflowStatusObjects()
Get all workflow statuses available in the system


getWorkflowStatusObject

com.atlassian.jira.issue.status.Status getWorkflowStatusObject(java.lang.String statusId)
Get the status object for a given id

Parameters:
statusId - the id to look up
Returns:
a status object or null if the id is invalid

getStatusByName

com.atlassian.jira.issue.status.Status getStatusByName(java.lang.String statusName)
Get a status given its name


getAccessibleStatuses

@NotNull
java.util.Set<com.atlassian.jira.issue.status.Status> getAccessibleStatuses(com.atlassian.crowd.embedded.api.User user,
                                                                                    com.atlassian.query.Query query)
Get the list of accessible statuses for issues potentially returned by the current query. In effect we are asking, "What projects and issue types could be returned by this query for this user, and what statuses are linked to workflows assigned to those projects and issue types?".

Parameters:
user - the user who would be performing the search
query - the query being asked about
Returns:
the list of statuses

isStatusInitialStatus

@NotNull
ServiceOutcome<java.lang.Boolean> isStatusInitialStatus(@NotNull
                                                                com.atlassian.jira.workflow.JiraWorkflow workflow,
                                                                @NotNull
                                                                com.atlassian.jira.issue.status.Status status)
Is this status the initial status for this workflow?

Parameters:
workflow - the workflow
status - the status
Returns:
the result

copyWorkflow

@NotNull
ServiceOutcome<com.atlassian.jira.workflow.JiraWorkflow> copyWorkflow(com.atlassian.crowd.embedded.api.User user,
                                                                              @NotNull
                                                                              com.atlassian.jira.workflow.JiraWorkflow workflow,
                                                                              @NotNull
                                                                              java.lang.String newName,
                                                                              @NotNull
                                                                              java.lang.String newDescription)
Creates a new copy of the existing workflow, with the specified name and description.

Parameters:
user - the user
workflow - the original workflow
newName - the new name
newDescription - the new description
Returns:
the new workflow

getWorkflow

@NotNull
ServiceOutcome<com.atlassian.jira.workflow.JiraWorkflow> getWorkflow(com.atlassian.crowd.embedded.api.User user,
                                                                             @NotNull
                                                                             java.lang.String workflowName)
Retrieve the workflow with the specified name

Parameters:
user - the user
workflowName - the workflow name
Returns:
the result

getWorkflowsForProject

@NotNull
ServiceOutcome<java.util.Collection<com.atlassian.jira.workflow.JiraWorkflow>> getWorkflowsForProject(com.atlassian.jira.project.Project project)
Retrieve the workflows that are in use for the specified Project.

Parameters:
project - the project
Returns:
the result

doesWorkflowSchemeExist

@NotNull
ServiceOutcome<java.lang.Boolean> doesWorkflowSchemeExist(java.lang.String name)
Does a workflow scheme with the specified name exist?

Parameters:
name - the name
Returns:
the result

getWorkflowSchemeForProject

@NotNull
ServiceOutcome<com.atlassian.jira.scheme.Scheme> getWorkflowSchemeForProject(com.atlassian.jira.project.Project project)
Returns the scheme currently associated to the specified Project. null will be the result if there is no scheme associated (i.e. the Default Scheme is in use).

Parameters:
project - the project
Returns:
the result

isWorkflowSchemeActive

@NotNull
ServiceOutcome<java.lang.Boolean> isWorkflowSchemeActive(java.lang.String name)
Is the workflow scheme with the specified name active?

Parameters:
name - the name
Returns:
the result

deleteScheme

@NotNull
ServiceOutcome<java.lang.Void> deleteScheme(java.lang.String name)
Delete a workflow scheme with the specified name

Parameters:
name - workflow scheme name
Returns:
the result

deleteWorkflow

@NotNull
ServiceOutcome<java.lang.Void> deleteWorkflow(java.lang.String name)
Delete a workflow with the specified name.

Parameters:
name - workflow name
Returns:
the result

getJiraWorkflows

@NotNull
java.util.Collection<com.atlassian.jira.workflow.JiraWorkflow> getJiraWorkflows(com.atlassian.jira.project.Project project)
Given a project, returns all JIRA workflows which are associated to that project Empty on error


getJiraWorkflows

@NotNull
java.util.Collection<com.atlassian.jira.workflow.JiraWorkflow> getJiraWorkflows(com.atlassian.jira.project.Project project,
                                                                                        java.lang.String issueTypeId)
Given a project and an issue type id, returns the JIRA Workflow which is associated to that project for that issue type Empty on error


associateWorkflowToSchemeAsDefault

@NotNull
ServiceOutcome<java.lang.Void> associateWorkflowToSchemeAsDefault(java.lang.String workflowName,
                                                                          com.atlassian.jira.scheme.Scheme scheme)
Associates a workflow to the given scheme, makes it the default workflow for that scheme


associateSchemeToProject

@NotNull
ServiceOutcome<java.lang.Void> associateSchemeToProject(com.atlassian.jira.project.Project project,
                                                                com.atlassian.jira.scheme.Scheme scheme)
Associates scheme to project



Copyright © 2007-2012 Atlassian. All Rights Reserved.