View Javadoc
1   package org.kuali.ole.coa.businessobject;
2   
3   import org.apache.commons.lang.StringUtils;
4   import org.apache.commons.lang.time.DateFormatUtils;
5   import org.apache.commons.lang.time.DateUtils;
6   import org.apache.log4j.Logger;
7   import org.kuali.ole.olekrad.service.OLELegacyDataAdapterHelperService;
8   import org.kuali.ole.sys.OLEPropertyConstants;
9   import org.kuali.ole.sys.ObjectUtil;
10  import org.kuali.ole.sys.context.SpringContext;
11  import org.kuali.rice.core.api.datetime.DateTimeService;
12  import org.kuali.rice.core.api.util.type.KualiDecimal;
13  import org.kuali.rice.kew.api.doctype.DocumentTypeService;
14  import org.kuali.rice.kew.doctype.bo.DocumentType;
15  import org.kuali.rice.kew.doctype.bo.DocumentTypeEBO;
16  import org.kuali.rice.kim.api.identity.Person;
17  import org.kuali.rice.kim.api.identity.PersonService;
18  import org.kuali.rice.krad.bo.PersistableAttachmentBase;
19  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
20  
21  import java.text.DateFormat;
22  import java.text.SimpleDateFormat;
23  import java.util.*;
24  
25  /**
26   * Created with IntelliJ IDEA.
27   * User: aurojyotit
28   * Date: 10/15/14
29   * Time: 6:01 PM
30   * To change this template use File | Settings | File Templates.
31   */
32  public class OLEAccountDelegateGlobalFormModel extends PersistableBusinessObjectBase{
33      private static final Logger LOG = Logger.getLogger(AccountDelegateModel.class);
34  
35      private String chartOfAccountsCode;
36      private String organizationCode;
37      private String accountDelegateModelName;
38      private boolean active;
39      private List<AccountDelegateModelDetail> accountDelegateModelDetails;
40  
41      private Organization organization;
42      private Chart chartOfAccounts;
43  
44  
45      /**
46       * Gets the chartOfAccountsCode attribute.
47       *
48       * @return Returns the chartOfAccountsCode
49       */
50      public String getChartOfAccountsCode() {
51          return chartOfAccountsCode;
52      }
53  
54      /**
55       * Sets the chartOfAccountsCode attribute.
56       *
57       * @param chartOfAccountsCode The chartOfAccountsCode to set.
58       */
59      public void setChartOfAccountsCode(String chartOfAccountsCode) {
60          this.chartOfAccountsCode = chartOfAccountsCode;
61      }
62  
63  
64      /**
65       * Gets the organizationCode attribute.
66       *
67       * @return Returns the organizationCode
68       */
69      public String getOrganizationCode() {
70          return organizationCode;
71      }
72  
73      /**
74       * Sets the organizationCode attribute.
75       *
76       * @param organizationCode The organizationCode to set.
77       */
78      public void setOrganizationCode(String organizationCode) {
79          this.organizationCode = organizationCode;
80      }
81  
82  
83      /**
84       * Gets the accountDelegateModelName attribute.
85       *
86       * @return Returns the accountDelegateModelName
87       */
88      public String getAccountDelegateModelName() {
89          return accountDelegateModelName;
90      }
91  
92      /**
93       * Sets the accountDelegateModelName attribute.
94       *
95       * @param accountDelegateModelName The accountDelegateModelName to set.
96       */
97      public void setAccountDelegateModelName(String organizationRoutingModelName) {
98          this.accountDelegateModelName = organizationRoutingModelName;
99      }
100 
101 
102     /**
103      * Gets the organization attribute.
104      *
105      * @return Returns the organization
106      */
107     public Organization getOrganization() {
108         return organization;
109     }
110 
111     /**
112      * Sets the organization attribute.
113      *
114      * @param organization The organization to set.
115      * @deprecated
116      */
117     public void setOrganization(Organization organization) {
118         this.organization = organization;
119     }
120 
121     /**
122      * Gets the chartOfAccounts attribute.
123      *
124      * @return Returns the chartOfAccounts
125      */
126     public Chart getChartOfAccounts() {
127         return chartOfAccounts;
128     }
129 
130     /**
131      * Sets the chartOfAccounts attribute.
132      *
133      * @param chartOfAccounts The chartOfAccounts to set.
134      * @deprecated
135      */
136     public void setChartOfAccounts(Chart chartOfAccounts) {
137         this.chartOfAccounts = chartOfAccounts;
138     }
139 
140     /**
141      * Gets the accountDelegateModelDetails attribute.
142      *
143      * @return Returns the accountDelegateModelDetails.
144      */
145     public List<AccountDelegateModelDetail> getAccountDelegateModelDetails() {
146         return accountDelegateModelDetails;
147     }
148 
149     /**
150      * Sets the accountDelegateModelDetails attribute value.
151      *
152      * @param accountDelegateModelDetails The accountDelegateModelDetails to set.
153      */
154     public void setAccountDelegateModelDetails(List<AccountDelegateModelDetail> organizationRoutingModel) {
155         this.accountDelegateModelDetails = organizationRoutingModel;
156     }
157 
158     /**
159      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
160      */
161     protected LinkedHashMap toStringMapper() {
162         LinkedHashMap m = new LinkedHashMap();
163         m.put("chartOfAccountsCode", this.chartOfAccountsCode);
164         m.put("organizationCode", this.organizationCode);
165         m.put("accountDelegateModelName", this.accountDelegateModelName);
166         return m;
167     }
168 
169     /**
170      * @see org.kuali.rice.krad.bo.PersistableBusinessObjectBase#linkEditableUserFields()
171      */
172     @Override
173     public void linkEditableUserFields() {
174         super.linkEditableUserFields();
175         if (this == null) {
176             throw new IllegalArgumentException("parameter passed in was null");
177         }
178         List bos = new ArrayList();
179         bos.addAll(getAccountDelegateModelDetails());
180         new OLELegacyDataAdapterHelperService().linkUserFields(bos);
181     }
182 
183     /**
184      * Gets the active attribute.
185      * @return Returns the active.
186      */
187     public boolean isActive() {
188         return active;
189     }
190 
191     /**
192      * Sets the active attribute value.
193      * @param active The active to set.
194      */
195     public void setActive(boolean active) {
196         this.active = active;
197     }
198 
199 
200 }