Interface PriorityManager

All Known Implementing Classes:
DefaultPriorityManager

@PublicApi public interface PriorityManager
Manager for Priorityies
Since:
v5.0
  • Method Details

    • createPriority

      Priority createPriority(String name, String description, String iconUrl, String color)
      Create a new priority. Newly added priority will be added to default priority scheme.
      Parameters:
      name - name of the priority. Cannot be blank or null. Must be unique.
      description - description of the priority
      iconUrl - icon url of the priority
      color - color for the priority.
      Returns:
      the new Priority
    • editPriority

      void editPriority(Priority priority, String name, String description, String iconUrl, String color)
      Edit an existing priority.
      Parameters:
      priority - existing priority.
      name - name of the priority
      description - description of the priority
      iconUrl - icon Url of the priority
      color - color of the priority
    • getPriorities

      List<Priority> getPriorities()
      Returns all priorities. Sorted by sequence. The order can be modified by calling movePriorityDown(String) or movePriorityUp(String)
      Returns:
      a List of Priority
    • removePriority

      void removePriority(String id, String newPriorityId)
      Removes a priority. When removing the priority it will change the priority of all issues which have the priority that has been deleted to the priority with id specified as the second argument. Priority will be also removed from all priority schemes.
      Parameters:
      id - priority id to remove.
      newPriorityId - priority to use for all issues which have the priority which has been removed. Cannot be null.
    • getPriority

      Priority getPriority(String id)
      Returns a priority.
      Parameters:
      id - priority id
      Returns:
      a Priority or null if no priority with the specified id could be found.
    • setDefaultPriority

      @Deprecated void setDefaultPriority(String id)
      Deprecated.
      Sets the default priority.
      Parameters:
      id - priority id
    • getDefaultPriority

      @Deprecated Priority getDefaultPriority()
      Deprecated.
      Returns the default priority.
      Returns:
      the default Priority or if none configured null.
    • movePriorityUp

      void movePriorityUp(String id)
      Move the resolution up in the order.
      Parameters:
      id - id of the resolution.
    • movePriorityDown

      void movePriorityDown(String id)
      Move the resolution down in the order.
      Parameters:
      id - id of the resolution.
    • findPriorities

      @ExperimentalApi Stream<Priority> findPriorities(@Nonnull String substring, @Nonnull Set<Long> projectIds)
      Returns priorities whose names start with or fully match given substring.
      Parameters:
      substring - the string that priority names will be matched with
      projectIds - the set of project ids to filter priorities