Enum OperationResultStatus

    • Enum Constant Detail

      • UNKNOWN

        public static final OperationResultStatus UNKNOWN
        No information about operation is present. Presence of this status usually means programming bug, e.g. someone forgot to set or compute appropriate operation result.
      • SUCCESS

        public static final OperationResultStatus SUCCESS
        Used when operation and sub operations finish successfully. The operation is completed and the result is final.
      • WARNING

        public static final OperationResultStatus WARNING
        Used when operation finish successfully, but minor problem occurred. For example operation code recovered from some error and after that operation finished successfully. The operation is completed and the result is final.
      • PARTIAL_ERROR

        public static final OperationResultStatus PARTIAL_ERROR
        Used when operation contains at least one operation witch status SUCCESS/WARNING and at least one operation with status FATAL_ERROR. The operation is completed and the result is final.
      • FATAL_ERROR

        public static final OperationResultStatus FATAL_ERROR
        Used when operation didn't finish correctly. The operation is completed and the result is final.
      • HANDLED_ERROR

        public static final OperationResultStatus HANDLED_ERROR
        The operation didn't finish correctly but that was expected and handled. It is equivalent to success for all practical cases except for displaying the result. But using success status for this situation might be misleading. The operation is completed and the result is final.
      • NOT_APPLICABLE

        public static final OperationResultStatus NOT_APPLICABLE
        Result does not make any sense for the operation. This is useful in cases that the operation is not supported (e.g. an optional part of the interface). This is different than UNKNOWN, as in this case we really know that it result is not applicable. In UNKNOWN case we know nothing. The operation is completed and the result is final.
      • IN_PROGRESS

        public static final OperationResultStatus IN_PROGRESS
        The operation is being executed. This is set for operations that are executed asynchronously or take a significant amount of time. Short synchronous operations do not need to set this status, they may go well with the default UNKNOWN status. The operation is in progress and the final result is not yet known.
    • Method Detail

      • values

        public static OperationResultStatus[] 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 (OperationResultStatus c : OperationResultStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static OperationResultStatus valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isConsideredSuccess

        public boolean isConsideredSuccess()
        Meaning "the operation completed in more-or-less successful way".
      • isError

        public boolean isError()
        Meaning "the operation completely or partially failed".