Class OperationApplicationResult


  • public class OperationApplicationResult
    extends Object
    Result of the application of an operation, which can either succeed in adding a new history entry to the project, or fail with an error. In both cases, the operation has the opportunity to expose additional data:
    • For success, return a subclass of ChangeResult which stores additional information. This information should be serialized in JSON as well.
    • For failure, the exception itself can carry more data (and should also be serializable in JSON).
    Author:
    Antonin Delpeuch
    • Constructor Detail

      • OperationApplicationResult

        public OperationApplicationResult​(HistoryEntry historyEntry,
                                          ChangeResult changeResult)
        Construct an instance representing a successful application.
      • OperationApplicationResult

        public OperationApplicationResult​(OperationException exception)
        Construct an instance representing an unsuccessful application.