View Javadoc
1   package org.kuali.ole.deliver.util;
2   
3   import org.kuali.ole.deliver.drools.DroolsExchange;
4   
5   /**
6    * Created by pvsubrah on 7/28/15.
7    */
8   public class DroolsResponse {
9       private ErrorMessage errorMessage;
10      private String sucessMessage;
11      private DroolsExchange droolsExchange;
12      private boolean ruleMatched;
13  
14      public ErrorMessage getErrorMessage() {
15          if (null == errorMessage) {
16              errorMessage = new ErrorMessage();
17          }
18          return errorMessage;
19      }
20  
21      public void setErrorMessage(ErrorMessage errorMessage) {
22          this.errorMessage = errorMessage;
23      }
24  
25      public void addErrorMessage(String errorMessage){
26          getErrorMessage().setErrorMessage(errorMessage);
27      }
28  
29      public String getSucessMessage() {
30          return sucessMessage;
31      }
32  
33      public void setSucessMessage(String sucessMessage) {
34          this.sucessMessage = sucessMessage;
35      }
36  
37      public boolean isRuleMatched() {
38          return ruleMatched;
39      }
40  
41      public void setRuleMatched(boolean ruleMatched) {
42          this.ruleMatched = ruleMatched;
43      }
44  
45      public DroolsExchange getDroolsExchange() {
46          if (null == droolsExchange) {
47              droolsExchange = new DroolsExchange();
48          }
49          return droolsExchange;
50      }
51  
52      public void setDroolsExchange(DroolsExchange droolsExchange) {
53          this.droolsExchange = droolsExchange;
54      }
55  
56      public void addOverridePermissions(String permissions) {
57          getErrorMessage().addOverridePermissions(permissions);
58      }
59  
60      public void addErrorMessageCode(String errorCode) {
61          getErrorMessage().setErrorCode(errorCode);
62      }
63  
64      public String retrieveErrorMessage() {
65          return getErrorMessage().getErrorMessage();
66      }
67  
68      public String retriveErrorCode() {
69          return getErrorMessage().getErrorCode();
70      }
71  }