Enum Class IssueTransition

java.lang.Object
java.lang.Enum<IssueTransition>
cdc.issues.answers.IssueTransition
All Implemented Interfaces:
Serializable, Comparable<IssueTransition>, Constable

public enum IssueTransition extends Enum<IssueTransition>
Enumeration of possible status/resolution transitions.
Author:
Damien Carbonne
  • Enum Constant Details

  • Method Details

    • values

      public static IssueTransition[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IssueTransition valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isManual

      public boolean isManual()
      Returns:
      true if this transition can be triggered manually.
    • isAutomatic

      public boolean isAutomatic()
      Returns:
      true if this transition can be triggered automatically.
    • isValidSource

      public boolean isValidSource(IssueStatus status, IssueResolution resolution)
      Returns true if a (status, resolution) pair is a valid source state to trigger this transition.
      Parameters:
      status - The status.
      resolution - The resolution.
      Returns:
      true if (status, resolution) pair is a valid source state to trigger this transition
    • getTargetStatus

      public IssueStatus getTargetStatus()
      Returns:
      The status reached after applying this transition.
    • getTargetResolution

      public IssueResolution getTargetResolution()
      Returns:
      The resolution reached after applying this transition.
    • getTransitionsFrom

      public static Set<IssueTransition> getTransitionsFrom(IssueStatus status, IssueResolution resolution)
      Returns a set of transitions that can be applied from a given starting (status, resolution) point.
      Parameters:
      status - The starting status.
      resolution - The starting resolution.
      Returns:
      The set of transition that can be applied from (status, resolution).