View Javadoc

1   package org.riverock.dbrevision.manager.patch;
2   
3   /**
4    * User: SergeMaslyukov
5    * Date: 05.08.2007
6    * Time: 15:12:05
7    */
8   public class PatchStatus {
9       public enum Status {SUCCESS, ERROR}
10  
11      private Status status = Status.SUCCESS;
12  
13      private PatchMessages messages = new PatchMessages();
14  
15      public PatchMessages getMessages() {
16          return messages;
17      }
18  
19      public Status getStatus() {
20          return status;
21      }
22  
23      public void setStatus(Status status) {
24          if (this.status==Status.ERROR && status==Status.SUCCESS) {
25              throw new IllegalStateException("Init status to SUCCESS after status was inited to ERROR");
26          }
27          this.status = status;
28      }
29  }