View Javadoc
1   package org.kuali.ole.select.gokb;
2   
3   import org.apache.commons.lang.StringUtils;
4   import org.kuali.ole.OLEConstants;
5   import org.kuali.ole.select.bo.OLEPlatformStatus;
6   import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
7   import org.kuali.rice.krad.service.KRADServiceLocator;
8   
9   import java.sql.Timestamp;
10  import java.util.HashMap;
11  import java.util.List;
12  import java.util.Map;
13  
14  /**
15   * Created by premkumarv on 12/8/14.
16   */
17  public class OleGokbPlatform extends PersistableBusinessObjectBase {
18  
19      private Integer gokbPlatformId;
20      private String platformName;
21      private String status;
22      private String statusId;
23      private Integer platformProviderId=0;
24      private String platformProvider;
25      private String authentication;
26      private String softwarePlatform;
27      private Timestamp dateCreated;
28      private Timestamp dateUpdated;
29      private OleGokbOrganization oleGokbOrganization;
30  
31  
32  
33      public Integer getGokbPlatformId() {
34          return gokbPlatformId;
35      }
36  
37      public void setGokbPlatformId(Integer gokbPlatformId) {
38          this.gokbPlatformId = gokbPlatformId;
39      }
40  
41      public String getPlatformName() {
42          return platformName;
43      }
44  
45      public void setPlatformName(String platformName) {
46          this.platformName = platformName;
47      }
48  
49      public String getStatus() {
50          return status;
51      }
52  
53      public void setStatus(String status) {
54          this.status = status;
55      }
56  
57      public String getStatusId() {
58          if (StringUtils.isNotBlank(this.getStatus())){
59              Map statusMap = new HashMap();
60              statusMap.put(OLEConstants.PLATFORM_STATUS_NAME, this.getStatus());
61              List<OLEPlatformStatus> platformStatusList = (List<OLEPlatformStatus>) KRADServiceLocator.getBusinessObjectService().findMatching(OLEPlatformStatus.class, statusMap);
62              if (platformStatusList != null && platformStatusList.size() > 0) {
63                  return platformStatusList.get(0).getPlatformStatusId();
64              }
65          }
66          return statusId;
67      }
68  
69      public void setStatusId(String statusId) {
70          this.statusId = statusId;
71      }
72  
73      public Integer getPlatformProviderId() {
74          return platformProviderId;
75      }
76  
77      public void setPlatformProviderId(Integer platformProviderId) {
78          this.platformProviderId = platformProviderId;
79      }
80  
81      public String getPlatformProvider() {
82          if (oleGokbOrganization!=null){
83              return oleGokbOrganization.getOrganizationName();
84          }
85          return platformProvider;
86      }
87  
88      public void setPlatformProvider(String platformProvider) {
89          this.platformProvider = platformProvider;
90      }
91  
92      public String getAuthentication() {
93          return authentication;
94      }
95  
96      public void setAuthentication(String authentication) {
97          this.authentication = authentication;
98      }
99  
100     public String getSoftwarePlatform() {
101         return softwarePlatform;
102     }
103 
104     public void setSoftwarePlatform(String softwarePlatform) {
105         this.softwarePlatform = softwarePlatform;
106     }
107 
108     public Timestamp getDateCreated() {
109         return dateCreated;
110     }
111 
112     public void setDateCreated(Timestamp dateCreated) {
113         this.dateCreated = dateCreated;
114     }
115 
116     public Timestamp getDateUpdated() {
117         return dateUpdated;
118     }
119 
120     public void setDateUpdated(Timestamp dateUpdated) {
121         this.dateUpdated = dateUpdated;
122     }
123 
124     public OleGokbOrganization getOleGokbOrganization() {
125         return oleGokbOrganization;
126     }
127 
128     public void setOleGokbOrganization(OleGokbOrganization oleGokbOrganization) {
129         this.oleGokbOrganization = oleGokbOrganization;
130     }
131 }