com.atlassian.greenhopper.service.workflow
Class WorkflowServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.workflow.WorkflowServiceImpl
All Implemented Interfaces:
WorkflowService

@Service(value="gh-workflowService")
public class WorkflowServiceImpl
extends java.lang.Object
implements WorkflowService

Provides workflow related service methods


Field Summary
 
Fields inherited from interface com.atlassian.greenhopper.service.workflow.WorkflowService
SERVICE
 
Constructor Summary
WorkflowServiceImpl()
           
 
Method Summary
 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 available status objects.
 com.atlassian.jira.issue.status.Status getStatusByName(java.lang.String statusName)
          Get a status given its name
 com.atlassian.jira.issue.status.Status getWorkflowStatusObject(java.lang.String statusId)
          Get the status object for a given id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowServiceImpl

public WorkflowServiceImpl()
Method Detail

getWorkflowStatusObject

public com.atlassian.jira.issue.status.Status getWorkflowStatusObject(java.lang.String statusId)
Description copied from interface: WorkflowService
Get the status object for a given id

Specified by:
getWorkflowStatusObject in interface WorkflowService
Parameters:
statusId - the id to look up
Returns:
a status object or null if the id is invalid

getStatusByName

public com.atlassian.jira.issue.status.Status getStatusByName(java.lang.String statusName)
Description copied from interface: WorkflowService
Get a status given its name

Specified by:
getStatusByName in interface WorkflowService

getAllWorkflowStatusObjects

public java.util.Set<com.atlassian.jira.issue.status.Status> getAllWorkflowStatusObjects()
Get all available status objects. Statuses are global in JIRA, the actual workflows define to what steps each status is attached to.

Specified by:
getAllWorkflowStatusObjects in interface WorkflowService

getAccessibleStatuses

@NotNull
public java.util.Set<com.atlassian.jira.issue.status.Status> getAccessibleStatuses(com.atlassian.crowd.embedded.api.User user,
                                                                                           com.atlassian.query.Query query)
Description copied from interface: WorkflowService
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?".

Specified by:
getAccessibleStatuses in interface WorkflowService
Parameters:
user - the user who would be performing the search
query - the query being asked about
Returns:
the list of statuses


Copyright © 2007-2012 Atlassian. All Rights Reserved.