Enum DoiRequestStatus

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DoiRequestStatus>

    public enum DoiRequestStatus
    extends java.lang.Enum<DoiRequestStatus>
    • Field Detail

      • ERROR_MESSAGE_NOT_ALLOWED_TO_CHANGE_STATUS_FROM_S_TO_S

        public static final java.lang.String ERROR_MESSAGE_NOT_ALLOWED_TO_CHANGE_STATUS_FROM_S_TO_S
        See Also:
        Constant Field Values
      • INVALID_DOI_REQUEST_STATUS_ERROR

        public static final java.lang.String INVALID_DOI_REQUEST_STATUS_ERROR
        See Also:
        Constant Field Values
      • validStatusChangeForRejected

        protected static final java.util.Set<DoiRequestStatus> validStatusChangeForRejected
      • validStatusChangeForRequested

        protected static final java.util.Set<DoiRequestStatus> validStatusChangeForRequested
      • validDefaultStatusChanges

        protected static final java.util.Set<DoiRequestStatus> validDefaultStatusChanges
    • Method Detail

      • values

        public static DoiRequestStatus[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DoiRequestStatus c : DoiRequestStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DoiRequestStatus valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • parse

        public static DoiRequestStatus parse​(java.lang.String doiRequestStatus)
      • isValidStatusChange

        public boolean isValidStatusChange​(DoiRequestStatus requestedStatusChange)
      • changeStatus

        public DoiRequestStatus changeStatus​(DoiRequestStatus requestedStatusChange)
        Changes status for a DoiRequestStatus change. It will return the new DoiRequestStatus if the transition is valid.
        Parameters:
        requestedStatusChange - requested DOIRequestStatus to transform to.
        Returns:
        New DoiRequestStatus.
        Throws:
        java.lang.IllegalArgumentException - requestedStatusChange is not valid to change into.
      • getErrorMessageForNotAllowedStatusChange

        protected java.lang.String getErrorMessageForNotAllowedStatusChange​(DoiRequestStatus requestedStatusChange)