View Javadoc
1   package org.kuali.ole.alert.bo;
2   
3   import org.kuali.ole.alert.bo.AlertConditionAndReceiverInformation;
4   import org.kuali.rice.kim.api.identity.Person;
5   import org.kuali.rice.kim.api.services.KimApiServiceLocator;
6   import org.kuali.rice.kim.impl.identity.PersonImpl;
7   import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
8   
9   import java.util.ArrayList;
10  import java.util.List;
11  
12  /**
13   * Created by maheswarang on 8/12/14.
14   */
15  public class AlertDocument extends PersistableBusinessObjectBase {
16  
17      private String alertDocumentId;
18  
19      private String documentTypeId;
20  
21      private String documentTypeName;
22  
23      private String documentClassName;
24  
25      private String alertDocumentCreatorId;
26  
27      private String alertDocumentCreatorName;
28  
29      private boolean repeatable;
30  
31      private AlertDocumentType alertDocumentType;
32  
33    /*  private List<AlertFieldValueMapping> alertFieldValueMappings=new ArrayList<>();*/
34  
35      private List<AlertConditionAndReceiverInformation> alertConditionAndReceiverInformations=new ArrayList<>();
36  
37  
38      public String getAlertDocumentId() {
39          return alertDocumentId;
40      }
41  
42      public void setAlertDocumentId(String alertDocumentId) {
43          this.alertDocumentId = alertDocumentId;
44      }
45  
46      public String getDocumentTypeName() {
47          return documentTypeName;
48      }
49  
50      public void setDocumentTypeName(String documentTypeName) {
51          this.documentTypeName = documentTypeName;
52      }
53  
54      public String getAlertDocumentCreatorId() {
55          return alertDocumentCreatorId;
56      }
57  
58      public void setAlertDocumentCreatorId(String alertDocumentCreatorId) {
59          this.alertDocumentCreatorId = alertDocumentCreatorId;
60      }
61  
62  /*    public List<AlertFieldValueMapping> getAlertFieldValueMappings() {
63          return alertFieldValueMappings;
64      }
65  
66      public void setAlertFieldValueMappings(List<AlertFieldValueMapping> alertFieldValueMappings) {
67          this.alertFieldValueMappings = alertFieldValueMappings;
68      }*/
69  
70      public List<AlertConditionAndReceiverInformation> getAlertConditionAndReceiverInformations() {
71          return alertConditionAndReceiverInformations;
72      }
73  
74      public void setAlertConditionAndReceiverInformations(List<AlertConditionAndReceiverInformation> alertConditionAndReceiverInformations) {
75          this.alertConditionAndReceiverInformations = alertConditionAndReceiverInformations;
76      }
77  
78      public String getDocumentClassName() {
79            if(documentClassName == null && alertDocumentType!=null){
80                documentClassName = alertDocumentType.getAlertDocumentClass();
81            }
82          return documentClassName;
83      }
84  
85      public void setDocumentClassName(String documentClassName) {
86          this.documentClassName = documentClassName;
87      }
88  
89      public String getAlertDocumentCreatorName() {
90          if(alertDocumentCreatorId != null){
91             Person person =  KimApiServiceLocator.getPersonService().getPerson(alertDocumentCreatorId);
92          alertDocumentCreatorName = person.getName();
93          }
94          return alertDocumentCreatorName;
95      }
96  
97      public void setAlertDocumentCreatorName(String alertDocumentCreatorName) {
98          this.alertDocumentCreatorName = alertDocumentCreatorName;
99      }
100 
101     public AlertDocumentType getAlertDocumentType() {
102         return alertDocumentType;
103     }
104 
105     public void setAlertDocumentType(AlertDocumentType alertDocumentType) {
106         this.alertDocumentType = alertDocumentType;
107     }
108 
109     public String getDocumentTypeId() {
110         return documentTypeId;
111     }
112 
113     public void setDocumentTypeId(String documentTypeId) {
114         this.documentTypeId = documentTypeId;
115     }
116 
117     public boolean isRepeatable() {
118         return repeatable;
119     }
120 
121     public void setRepeatable(boolean repeatable) {
122         this.repeatable = repeatable;
123     }
124 }