java.lang.Object
com.codebarrel.automation.rulecomponent.jira.service.StatusService

public class StatusService extends Object
  • Constructor Details

  • Method Details

    • getStatusesFromCategory

      public Set<StatusBean> getStatusesFromCategory(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey)
      Get a list of statuses matching the given category key from the global set
      Parameters:
      statusCategoryKey - One of NEW, DONE, INDETERMINATE, UNDEFINED
      Returns:
      A list of StatusBeans that conform to the given category
    • getStatusesFromCategory

      public Set<StatusBean> getStatusesFromCategory(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey, Long projectId)
      Get a list of statuses matching the given category key that are available in the given project
      Parameters:
      statusCategoryKey - One of NEW, DONE, INDETERMINATE, UNDEFINED
      projectId - ID of the project to get statuses from
      Returns:
      A list of StatusBeans that conform to the given category
    • getStatusForProjectByName

      public Optional<StatusBean> getStatusForProjectByName(TenantActor tenantActor, Long projectId, StatusBean.StatusCategory.Key statusCategory, String statusName)
    • getFirstStatusFromCategory

      public Optional<StatusBean> getFirstStatusFromCategory(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey)
      Get the first status (by ID) from the statuses matching the given category key
      Parameters:
      statusCategoryKey - One of NEW, DONE, INDETERMINATE, UNDEFINED
      Returns:
      An optional StatusBean conforming to the given category
    • getFirstStatusFromCategory

      public Optional<StatusBean> getFirstStatusFromCategory(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey, Long projectId)
      Get the first status (by ID) from the statuses matching the given category key available in the given project
      Parameters:
      statusCategoryKey - One of NEW, DONE, INDETERMINATE, UNDEFINED
      Returns:
      An optional StatusBean conforming to the given category
    • getDoneOrFirstDoneStatusFromCategory

      public Optional<StatusBean> getDoneOrFirstDoneStatusFromCategory(TenantActor tenantActor)
      Get the status called "Done" if it exists. Otherwise just grab the first one in that category. This is useful in global sample rules as it has the tendency to pick strange resolutions...
      Returns:
      An optional StatusBean conforming to the given category
    • getStatusById

      public Optional<StatusBean> getStatusById(TenantActor tenantActor, Long statusId)