001/* 002 * Copyright 2010 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 1.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl1.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.ole.sec.businessobject; 017 018import org.kuali.ole.sys.context.SpringContext; 019import org.kuali.rice.kim.api.identity.Person; 020import org.kuali.rice.krad.bo.TransientBusinessObjectBase; 021 022/** 023 * Holds fields needed to run a security simulation and the display results 024 */ 025public class AccessSecuritySimulation extends TransientBusinessObjectBase { 026 // search fields 027 protected String principalId; 028 protected String templateId; 029 protected String attributeName; 030 protected String financialSystemDocumentTypeCode; 031 protected String inquiryNamespaceCode; 032 033 // return fields 034 protected String attributeValue; 035 protected String attributeValueName; 036 037 protected Person securityPerson; 038 039 public AccessSecuritySimulation() { 040 041 } 042 043 044 /** 045 * Gets the attributeName attribute. 046 * 047 * @return Returns the attributeName. 048 */ 049 public String getAttributeName() { 050 return attributeName; 051 } 052 053 054 /** 055 * Sets the attributeName attribute value. 056 * 057 * @param attributeName The attributeName to set. 058 */ 059 public void setAttributeName(String attributeName) { 060 this.attributeName = attributeName; 061 } 062 063 064 /** 065 * Gets the principalId attribute. 066 * 067 * @return Returns the principalId. 068 */ 069 public String getPrincipalId() { 070 return principalId; 071 } 072 073 074 /** 075 * Sets the principalId attribute value. 076 * 077 * @param principalId The principalId to set. 078 */ 079 public void setPrincipalId(String principalId) { 080 this.principalId = principalId; 081 } 082 083 084 /** 085 * Gets the templateId attribute. 086 * 087 * @return Returns the templateId. 088 */ 089 public String getTemplateId() { 090 return templateId; 091 } 092 093 094 /** 095 * Sets the templateId attribute value. 096 * 097 * @param templateId The templateId to set. 098 */ 099 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}