001 /* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.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/ecl2.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 */ 016 package org.kuali.kfs.sec.businessobject; 017 018 import java.util.ArrayList; 019 import java.util.LinkedHashMap; 020 021 import org.kuali.kfs.sys.KFSPropertyConstants; 022 import org.kuali.rice.kns.bo.Inactivateable; 023 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 024 import org.kuali.rice.kns.util.KualiInteger; 025 026 /** 027 * Security Attribute represents attributes that can used within the security system to define restrictions. 028 */ 029 public class SecurityAttribute extends PersistableBusinessObjectBase implements Inactivateable { 030 private KualiInteger id; 031 private String name; 032 private boolean active; 033 034 public SecurityAttribute() { 035 super(); 036 } 037 038 /** 039 * Gets the id attribute. 040 * 041 * @return Returns the id. 042 */ 043 public KualiInteger getId() { 044 return id; 045 } 046 047 /** 048 * Sets the id attribute value. 049 * 050 * @param id The id to set. 051 */ 052 public void setId(KualiInteger id) { 053 this.id = id; 054 } 055 056 /** 057 * Gets the name attribute. 058 * 059 * @return Returns the name. 060 */ 061 public String getName() { 062 return name; 063 } 064 065 /** 066 * Sets the name attribute value. 067 * 068 * @param name The name to set. 069 */ 070 public void setName(String name) { 071 this.name = name; 072 } 073 074 /** 075 * Gets the active attribute. 076 * 077 * @return Returns the active. 078 */ 079 public boolean isActive() { 080 return active; 081 } 082 083 /** 084 * Sets the active attribute value. 085 * 086 * @param active The active to set. 087 */ 088 public void setActive(boolean active) { 089 this.active = active; 090 } 091 092 /** 093 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 094 */ 095 @Override 096 protected LinkedHashMap toStringMapper() { 097 LinkedHashMap m = new LinkedHashMap(); 098 099 m.put(KFSPropertyConstants.ID, this.id); 100 101 return m; 102 } 103 }