1 /*
2 * Copyright 2010 The Kuali Foundation.
3 *
4 * Licensed under the Educational Community License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl1.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.ole.sec.businessobject;
17
18 import org.kuali.ole.sys.context.SpringContext;
19 import org.kuali.rice.kim.api.identity.Person;
20 import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
21
22 /**
23 * Holds fields needed to run a security simulation and the display results
24 */
25 public class AccessSecuritySimulation extends TransientBusinessObjectBase {
26 // search fields
27 protected String principalId;
28 protected String templateId;
29 protected String attributeName;
30 protected String financialSystemDocumentTypeCode;
31 protected String inquiryNamespaceCode;
32
33 // return fields
34 protected String attributeValue;
35 protected String attributeValueName;
36
37 protected Person securityPerson;
38
39 public AccessSecuritySimulation() {
40
41 }
42
43
44 /**
45 * Gets the attributeName attribute.
46 *
47 * @return Returns the attributeName.
48 */
49 public String getAttributeName() {
50 return attributeName;
51 }
52
53
54 /**
55 * Sets the attributeName attribute value.
56 *
57 * @param attributeName The attributeName to set.
58 */
59 public void setAttributeName(String attributeName) {
60 this.attributeName = attributeName;
61 }
62
63
64 /**
65 * Gets the principalId attribute.
66 *
67 * @return Returns the principalId.
68 */
69 public String getPrincipalId() {
70 return principalId;
71 }
72
73
74 /**
75 * Sets the principalId attribute value.
76 *
77 * @param principalId The principalId to set.
78 */
79 public void setPrincipalId(String principalId) {
80 this.principalId = principalId;
81 }
82
83
84 /**
85 * Gets the templateId attribute.
86 *
87 * @return Returns the templateId.
88 */
89 public String getTemplateId() {
90 return templateId;
91 }
92
93
94 /**
95 * Sets the templateId attribute value.
96 *
97 * @param templateId The templateId to set.
98 */
99 public void setTemplateId(String templateId) {
100 this.templateId = templateId;
101 }
102
103
104 /**
105 * Gets the financialSystemDocumentTypeCode attribute.
106 *
107 * @return Returns the financialSystemDocumentTypeCode.
108 */
109 public String getFinancialSystemDocumentTypeCode() {
110 return financialSystemDocumentTypeCode;
111 }
112
113
114 /**
115 * Sets the financialSystemDocumentTypeCode attribute value.
116 *
117 * @param financialSystemDocumentTypeCode The financialSystemDocumentTypeCode to set.
118 */
119 public void setFinancialSystemDocumentTypeCode(String financialSystemDocumentTypeCode) {
120 this.financialSystemDocumentTypeCode = financialSystemDocumentTypeCode;
121 }
122
123
124 /**
125 * Gets the inquiryNamespaceCode attribute.
126 *
127 * @return Returns the inquiryNamespaceCode.
128 */
129 public String getInquiryNamespaceCode() {
130 return inquiryNamespaceCode;
131 }
132
133
134 /**
135 * Sets the inquiryNamespaceCode attribute value.
136 *
137 * @param inquiryNamespaceCode The inquiryNamespaceCode to set.
138 */
139 public void setInquiryNamespaceCode(String inquiryNamespaceCode) {
140 this.inquiryNamespaceCode = inquiryNamespaceCode;
141 }
142
143
144 /**
145 * Gets the attributeValue attribute.
146 *
147 * @return Returns the attributeValue.
148 */
149 public String getAttributeValue() {
150 return attributeValue;
151 }
152
153
154 /**
155 * Sets the attributeValue attribute value.
156 *
157 * @param attributeValue The attributeValue to set.
158 */
159 public void setAttributeValue(String attributeValue) {
160 this.attributeValue = attributeValue;
161 }
162
163
164 /**
165 * Gets the attributeValueName attribute.
166 *
167 * @return Returns the attributeValueName.
168 */
169 public String getAttributeValueName() {
170 return attributeValueName;
171 }
172
173
174 /**
175 * Sets the attributeValueName attribute value.
176 *
177 * @param attributeValueName The attributeValueName to set.
178 */
179 public void setAttributeValueName(String attributeValueName) {
180 this.attributeValueName = attributeValueName;
181 }
182
183 /**
184 * Gets the securityPerson attribute.
185 *
186 * @return Returns the securityPerson.
187 */
188 public Person getSecurityPerson() {
189 securityPerson = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(principalId, securityPerson);
190 return securityPerson;
191 }
192
193
194 /**
195 * Sets the securityPerson attribute value.
196 *
197 * @param securityPerson The securityPerson to set.
198 */
199 public void setSecurityPerson(Person securityPerson) {
200 this.securityPerson = securityPerson;
201 }
202
203 }