Coverage Report - org.kuali.rice.kim.bo.impl.PermissionImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
PermissionImpl
0%
0/43
0%
0/2
1.038
 
 1  
 /*
 2  
  * Copyright 2007-2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.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/ecl2.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.rice.kim.bo.impl;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 import javax.persistence.Transient;
 21  
 
 22  
 import org.apache.commons.lang.StringUtils;
 23  
 import org.kuali.rice.kim.bo.Person;
 24  
 import org.kuali.rice.kim.bo.role.impl.KimPermissionImpl;
 25  
 import org.kuali.rice.kim.impl.group.GroupBo;
 26  
 import org.kuali.rice.kim.impl.role.RoleBo;
 27  
 import org.kuali.rice.kim.util.KimConstants;
 28  
 import org.springframework.util.AutoPopulatingList;
 29  
 
 30  
 /**
 31  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 32  
  */
 33  0
 public class PermissionImpl extends KimPermissionImpl {
 34  
 
 35  
         private static final long serialVersionUID = 1L;
 36  0
         @Transient
 37  
         List<RoleBo> assignedToRoles = new AutoPopulatingList(RoleBo.class);
 38  
         @Transient
 39  
         protected String assignedToRoleNamespaceForLookup;
 40  
         @Transient
 41  
         protected String assignedToRoleNameForLookup;
 42  
         @Transient
 43  
         protected RoleBo assignedToRole;
 44  
         @Transient
 45  
         protected String assignedToPrincipalNameForLookup;
 46  
         @Transient
 47  
         protected Person assignedToPrincipal;
 48  
         @Transient
 49  
         protected String assignedToGroupNamespaceForLookup;
 50  
         @Transient
 51  
         protected String assignedToGroupNameForLookup;
 52  
         @Transient
 53  
         protected GroupBo assignedToGroup;
 54  
         @Transient
 55  
         protected String attributeName;
 56  
         @Transient
 57  
         protected String attributeValue;
 58  
         @Transient
 59  
         protected String detailCriteria;
 60  
         
 61  
         /**
 62  
          * @return the assignedToRoles
 63  
          */
 64  
         public String getAssignedToRolesToDisplay() {
 65  0
                 StringBuffer assignedToRolesToDisplay = new StringBuffer();
 66  0
                 for(RoleBo roleImpl: assignedToRoles){
 67  0
                         assignedToRolesToDisplay.append(getRoleDetailsToDisplay(roleImpl));
 68  
                 }
 69  0
                 return StringUtils.chomp( assignedToRolesToDisplay.toString(), KimConstants.KimUIConstants.COMMA_SEPARATOR);
 70  
         }
 71  
 
 72  
         public String getRoleDetailsToDisplay(RoleBo roleImpl){
 73  0
                 return roleImpl.getNamespaceCode().trim()+" "+roleImpl.getName().trim()+KimConstants.KimUIConstants.COMMA_SEPARATOR;
 74  
         }
 75  
         
 76  
         /**
 77  
          * @return the assignedToGroupNameForLookup
 78  
          */
 79  
         public String getAssignedToGroupNameForLookup() {
 80  0
                 return this.assignedToGroupNameForLookup;
 81  
         }
 82  
 
 83  
         /**
 84  
          * @param assignedToGroupNameForLookup the assignedToGroupNameForLookup to set
 85  
          */
 86  
         public void setAssignedToGroupNameForLookup(String assignedToGroupNameForLookup) {
 87  0
                 this.assignedToGroupNameForLookup = assignedToGroupNameForLookup;
 88  0
         }
 89  
 
 90  
         /**
 91  
          * @return the assignedToGroupNamespaceForLookup
 92  
          */
 93  
         public String getAssignedToGroupNamespaceForLookup() {
 94  0
                 return this.assignedToGroupNamespaceForLookup;
 95  
         }
 96  
 
 97  
         /**
 98  
          * @param assignedToGroupNamespaceForLookup the assignedToGroupNamespaceForLookup to set
 99  
          */
 100  
         public void setAssignedToGroupNamespaceForLookup(
 101  
                         String assignedToGroupNamespaceForLookup) {
 102  0
                 this.assignedToGroupNamespaceForLookup = assignedToGroupNamespaceForLookup;
 103  0
         }
 104  
 
 105  
         /**
 106  
          * @return the assignedToPrincipalNameForLookup
 107  
          */
 108  
         public String getAssignedToPrincipalNameForLookup() {
 109  0
                 return this.assignedToPrincipalNameForLookup;
 110  
         }
 111  
 
 112  
         /**
 113  
          * @param assignedToPrincipalNameForLookup the assignedToPrincipalNameForLookup to set
 114  
          */
 115  
         public void setAssignedToPrincipalNameForLookup(
 116  
                         String assignedToPrincipalNameForLookup) {
 117  0
                 this.assignedToPrincipalNameForLookup = assignedToPrincipalNameForLookup;
 118  0
         }
 119  
 
 120  
         /**
 121  
          * @return the assignedToRoleNameForLookup
 122  
          */
 123  
         public String getAssignedToRoleNameForLookup() {
 124  0
                 return this.assignedToRoleNameForLookup;
 125  
         }
 126  
 
 127  
         /**
 128  
          * @param assignedToRoleNameForLookup the assignedToRoleNameForLookup to set
 129  
          */
 130  
         public void setAssignedToRoleNameForLookup(String assignedToRoleNameForLookup) {
 131  0
                 this.assignedToRoleNameForLookup = assignedToRoleNameForLookup;
 132  0
         }
 133  
 
 134  
         /**
 135  
          * @return the assignedToRoleNamespaceForLookup
 136  
          */
 137  
         public String getAssignedToRoleNamespaceForLookup() {
 138  0
                 return this.assignedToRoleNamespaceForLookup;
 139  
         }
 140  
 
 141  
         /**
 142  
          * @param assignedToRoleNamespaceForLookup the assignedToRoleNamespaceForLookup to set
 143  
          */
 144  
         public void setAssignedToRoleNamespaceForLookup(
 145  
                         String assignedToRoleNamespaceForLookup) {
 146  0
                 this.assignedToRoleNamespaceForLookup = assignedToRoleNamespaceForLookup;
 147  0
         }
 148  
 
 149  
         /**
 150  
          * @return the attributeValue
 151  
          */
 152  
         public String getAttributeValue() {
 153  0
                 return this.attributeValue;
 154  
         }
 155  
 
 156  
         /**
 157  
          * @param attributeValue the attributeValue to set
 158  
          */
 159  
         public void setAttributeValue(String attributeValue) {
 160  0
                 this.attributeValue = attributeValue;
 161  0
         }
 162  
 
 163  
         /**
 164  
          * @return the assignedToRoles
 165  
          */
 166  
         public List<RoleBo> getAssignedToRoles() {
 167  0
                 return this.assignedToRoles;
 168  
         }
 169  
 
 170  
         /**
 171  
          * @param assignedToRoles the assignedToRoles to set
 172  
          */
 173  
         public void setAssignedToRoles(List<RoleBo> assignedToRoles) {
 174  0
                 this.assignedToRoles = assignedToRoles;
 175  0
         }
 176  
 
 177  
         /**
 178  
          * @return the assignedToGroup
 179  
          */
 180  
         public GroupBo getAssignedToGroup() {
 181  0
                 return this.assignedToGroup;
 182  
         }
 183  
 
 184  
         /**
 185  
          * @param assignedToGroup the assignedToGroup to set
 186  
          */
 187  
         public void setAssignedToGroup(GroupBo assignedToGroup) {
 188  0
                 this.assignedToGroup = assignedToGroup;
 189  0
         }
 190  
 
 191  
         /**
 192  
          * @return the assignedToPrincipal
 193  
          */
 194  
         public Person getAssignedToPrincipal() {
 195  0
                 return this.assignedToPrincipal;
 196  
         }
 197  
 
 198  
         /**
 199  
          * @param assignedToPrincipal the assignedToPrincipal to set
 200  
          */
 201  
         public void setAssignedToPrincipal(Person assignedToPrincipal) {
 202  0
                 this.assignedToPrincipal = assignedToPrincipal;
 203  0
         }
 204  
 
 205  
         /**
 206  
          * @return the assignedToRole
 207  
          */
 208  
         public RoleBo getAssignedToRole() {
 209  0
                 return this.assignedToRole;
 210  
         }
 211  
 
 212  
         /**
 213  
          * @param assignedToRole the assignedToRole to set
 214  
          */
 215  
         public void setAssignedToRole(RoleBo assignedToRole) {
 216  0
                 this.assignedToRole = assignedToRole;
 217  0
         }
 218  
 
 219  
         public String getDetailCriteria() {
 220  0
                 return this.detailCriteria;
 221  
         }
 222  
 
 223  
         public void setDetailCriteria(String detailCriteria) {
 224  0
                 this.detailCriteria = detailCriteria;
 225  0
         }
 226  
 
 227  
         /**
 228  
          * @return the attributeName
 229  
          */
 230  
         public String getAttributeName() {
 231  0
                 return this.attributeName;
 232  
         }
 233  
 
 234  
         /**
 235  
          * @param attributeName the attributeName to set
 236  
          */
 237  
         public void setAttributeName(String attributeName) {
 238  0
                 this.attributeName = attributeName;
 239  0
         }
 240  
 
 241  
 }