Coverage Report - org.kuali.rice.kim.util.KimConstants
 
Classes in this File Line Coverage Branch Coverage Complexity
KimConstants
0%
0/2
N/A
1.733
KimConstants$AttributeConstants
0%
0/1
N/A
1.733
KimConstants$CacheRefreshPeriodSeconds
0%
0/1
N/A
1.733
KimConstants$EntityTypes
0%
0/2
N/A
1.733
KimConstants$KimGroupMemberTypes
0%
0/2
N/A
1.733
KimConstants$KimUIConstants
0%
0/25
N/A
1.733
KimConstants$Namespaces
0%
0/1
N/A
1.733
KimConstants$ParameterKey
0%
0/1
N/A
1.733
KimConstants$PermissionNames
0%
0/2
N/A
1.733
KimConstants$PermissionTemplateNames
0%
0/2
N/A
1.733
KimConstants$PersonAffiliationTypes
0%
0/2
N/A
1.733
KimConstants$PersonExternalIdentifierTypes
0%
0/2
N/A
1.733
KimConstants$PrimaryKeyConstants
0%
0/2
N/A
1.733
KimConstants$SequenceNames
0%
0/2
N/A
1.733
KimConstants$UniqueKeyConstants
0%
0/2
N/A
1.733
 
 1  
 /*
 2  
  * Copyright 2007-2008 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.util;
 17  
 
 18  
 import org.kuali.rice.core.api.CoreConstants;
 19  
 
 20  
 import java.util.HashMap;
 21  
 import java.util.Map;
 22  
 
 23  
 /**
 24  
  * This is a description of what this class does - jonathan don't forget to fill this in.
 25  
  *
 26  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 27  
  *
 28  
  */
 29  
 public final class KimConstants {
 30  
 
 31  
         public static final String KIM_MODULE_NAMESPACE = "KIM";
 32  
         
 33  
         public static final String NAMESPACE_CODE = "KR-IDM";
 34  
         public static final String KIM_TYPE_DEFAULT_NAMESPACE = "KUALI";
 35  
         public static final String KIM_TYPE_DEFAULT_NAME = "Default";
 36  
         public static final String KIM_GROUP_DEFAULT_NAMESPACE_CODE = "KUALI";
 37  
         public static final String KIM_GROUP_WORKFLOW_NAMESPACE_CODE = "KR-WKFLW";
 38  
         public static final String RESTRICTED_DATA_MASK = "Xxxxxx";
 39  
 
 40  
         //Kim services constants for API
 41  
         public static final String KIM_IDENTITY_MANAGEMENT_SERVICE = "kimIdentityManagementService";
 42  
         public static final String KIM_PERSON_SERVICE = "personService";
 43  
         public static final String DEFAULT_KIM_TYPE_SERVICE = "kimTypeService";
 44  
 
 45  
         //Kim Attribute Boolean representations
 46  
         public static final String KIM_ATTRIBUTE_BOOLEAN_TRUE_STR_VALUE_DISPLAY = "Yes";
 47  
         public static final String KIM_ATTRIBUTE_BOOLEAN_FALSE_STR_VALUE_DISPLAY = "No";
 48  
         public static final String KIM_ATTRIBUTE_BOOLEAN_TRUE_STR_VALUE = "Y";
 49  
         public static final String KIM_ATTRIBUTE_BOOLEAN_FALSE_STR_VALUE = "N";
 50  
         
 51  
         public static final class EntityTypes {
 52  
                 public static final String PERSON = "PERSON";
 53  
                 public static final String SYSTEM = "SYSTEM";
 54  
                 
 55  0
                 private EntityTypes() {
 56  0
                         throw new UnsupportedOperationException("do not call");
 57  
                 }
 58  
         }
 59  
 
 60  
         public static final class PersonExternalIdentifierTypes {
 61  
                 public static final String TAX = "TAX";
 62  
                 
 63  0
                 private PersonExternalIdentifierTypes() {
 64  0
                         throw new UnsupportedOperationException("do not call");
 65  
                 }
 66  
         }
 67  
         public static final class PersonAffiliationTypes {
 68  
                 public static final String STAFF_AFFILIATION_TYPE = "STAFF";
 69  
                 public static final String STUDENT_AFFILIATION_TYPE = "STUDENT";
 70  
                 public static final String AFFILIATE_AFFILIATION_TYPE = "AFFILIATE";
 71  
                 public static final String FACULTY_AFFILIATION_TYPE = "FACULTY";
 72  
                 
 73  0
                 private PersonAffiliationTypes() {
 74  0
                         throw new UnsupportedOperationException("do not call");
 75  
                 }
 76  
         }
 77  
 
 78  
         public static final class PermissionTemplateNames {
 79  
         public static final String FULL_UNMASK_FIELD = "Full Unmask Field";
 80  
             public static final String PARTIAL_UNMASK_FIELD = "Partial Unmask Field";
 81  
             public static final String VIEW_FIELD = "View Inquiry or Maintenance Document Field";
 82  
             public static final String MODIFY_FIELD = "Modify Maintenance Document Field";
 83  
             public static final String VIEW_SECTION = "View Inquiry or Maintenance Document Section";
 84  
             public static final String MODIFY_SECTION = "Modify Maintenance Document Section";
 85  
             public static final String CREATE_MAINTAIN_RECORDS = "Create / Maintain Record(s)";
 86  
 
 87  
             public static final String EDIT_DOCUMENT = "Edit Document";
 88  
             public static final String COPY_DOCUMENT = "Copy Document";
 89  
             public static final String OPEN_DOCUMENT = "Open Document";
 90  
             public static final String TAKE_REQUESTED_ACTION = "Take Requested Action";
 91  
             public static final String INITIATE_DOCUMENT = "Initiate Document";
 92  
             public static final String BLANKET_APPROVE_DOCUMENT ="Blanket Approve Document";
 93  
             public static final String CANCEL_DOCUMENT ="Cancel Document";
 94  
             public static final String SAVE_DOCUMENT ="Save Document";
 95  
             public static final String ROUTE_DOCUMENT ="Route Document";
 96  
             public static final String APPROVE_DOCUMENT = "Approve Document";
 97  
             public static final String AD_HOC_REVIEW_DOCUMENT = "Ad Hoc Review Document";
 98  
             public static final String ADD_MESSAGE_TO_ROUTE_LOG = "Add Message to Route Log";
 99  
             
 100  
             public static final String ADD_NOTE_ATTACHMENT = "Add Note / Attachment";
 101  
             public static final String VIEW_NOTE_ATTACHMENT = "View Note / Attachment";
 102  
             public static final String DELETE_NOTE_ATTACHMENT = "Delete Note / Attachment";
 103  
 
 104  
             public static final String USE_TRANSACTIONAL_DOCUMENT = "Use Transactional Document";
 105  
 
 106  
             public static final String POPULATE_GROUP = "Populate Group";
 107  
             public static final String ASSIGN_ROLE = "Assign Role";
 108  
             public static final String GRANT_PERMISSION = "Grant Permission";
 109  
             public static final String GRANT_RESPONSIBILITY = "Grant Responsibility";
 110  
 
 111  
             public static final String LOOK_UP_RECORDS = "Look Up Records";
 112  
             public static final String INQUIRE_INTO_RECORDS = "Inquire Into Records";
 113  
             public static final String USE_SCREEN = "Use Screen";
 114  
 
 115  
             public static final String PERFORM_CUSTOM_MAINTENANCE_DOCUMENT_FUNCTION ="Perform Custom Maintenance Document Function";
 116  
             public static final String MAINTAIN_SYSTEM_PARAMETER = "Maintain System Parameter";
 117  
             public static final String SEND_AD_HOC_REQUEST ="Send Ad Hoc Request";
 118  
             
 119  0
                 private PermissionTemplateNames() {
 120  0
                         throw new UnsupportedOperationException("do not call");
 121  
                 }
 122  
         }
 123  
 
 124  
         public final static class PermissionNames {
 125  
                 public static final String LOG_IN = "Log In Kuali Portal";
 126  
                 public static final String ADMIN_PESSIMISTIC_LOCKING = "Administer Pessimistic Locking";
 127  
                 public static final String OVERRIDE_ENTITY_PRIVACY_PREFERENCES = "Override Entity Privacy Preferences";
 128  
             public static final String MODIFY_ENTITY = "Modify Entity";
 129  
             
 130  0
                 private PermissionNames() {
 131  0
                         throw new UnsupportedOperationException("do not call");
 132  
                 }
 133  
         }
 134  
 
 135  
         public final static class KimUIConstants {
 136  
                 public static final String NAME_VALUE_SEPARATOR = " : ";
 137  
                 public static final String COMMA_SEPARATOR = ", ";
 138  
                 public static final String OR_OPERATOR = "|";
 139  
                 public static final String URL_SEPARATOR = "/";
 140  
                 public static final String PARAMETERIZED_URL_SEPARATOR = "%2F";
 141  
                 public static final String KIM_URL_KEY = "kim.url";
 142  
                 public static final String KIM_APPLICATION = "kim";
 143  
                 public static final String MEMBER_ID_PREFIX = PrimaryKeyConstants.MEMBER_ID+".";
 144  
                 public static final String MEMBER_NAME = "memberName";
 145  
                 public static final String MEMBER_NAMESPACE_CODE = "memberNamespaceCode";
 146  
                 public static final String MEMBER_TYPE_PRINCIPAL_CODE = "P";
 147  
                 public static final String MEMBER_TYPE_GROUP_CODE = "G";
 148  
                 public static final String MEMBER_TYPE_ROLE_CODE = "R";
 149  
                 public static final String MEMBER_TYPE_PRINCIPAL = "Principal";
 150  
                 public static final String MEMBER_TYPE_GROUP = "Group";
 151  
                 public static final String MEMBER_TYPE_ROLE = "Role";
 152  0
                 public static final Map<String, String> KIM_MEMBER_TYPES_MAP = getKimMemberTypesMap();
 153  
             private static Map<String, String> getKimMemberTypesMap() {
 154  0
                     Map<String, String> kimDocumentActionsMap = new HashMap<String, String>();
 155  0
                     kimDocumentActionsMap.put(MEMBER_TYPE_PRINCIPAL_CODE, MEMBER_TYPE_PRINCIPAL);
 156  0
                     kimDocumentActionsMap.put(MEMBER_TYPE_GROUP_CODE, MEMBER_TYPE_GROUP);
 157  0
                     kimDocumentActionsMap.put(MEMBER_TYPE_ROLE_CODE, MEMBER_TYPE_ROLE);
 158  0
                 return kimDocumentActionsMap;
 159  
             }
 160  
 
 161  
                 public static final String KIM_ROLE_DOCUMENT_TYPE_NAME = "IdentityManagementRoleDocument";
 162  
                 public static final String KIM_GROUP_DOCUMENT_TYPE_NAME = "IdentityManagementGroupDocument";
 163  
                 public static final String KIM_PERSON_DOCUMENT_TYPE_NAME = "IdentityManagementPersonDocument";
 164  
                 public static final String KIM_PERMISSION_DOCUMENT_TYPE_NAME = "IdentityManagementGenericPermissionMaintenanceDocument";
 165  
                 public static final String KIM_REVIEW_RESPONSIBILITY_DOCUMENT_TYPE_NAME = "IdentityManagementReviewResponsibilityMaintenanceDocument";
 166  
                 public static final String KIM_ROLE_DOCUMENT_SHORT_KEY = "IMRD";
 167  
                 public static final String KIM_GROUP_DOCUMENT_SHORT_KEY = "IMGD";
 168  
                 public static final String KIM_PERSON_DOCUMENT_SHORT_KEY = "IMPD";
 169  
                 public static final String KIM_ROLE_DOCUMENT_ACTION = "identityManagementRoleDocument.do";
 170  
                 public static final String KIM_ROLE_INQUIRY_ACTION = "identityManagementRoleInquiry.do";
 171  
                 public static final String KIM_PERSON_DOCUMENT_ACTION = "identityManagementPersonDocument.do";
 172  
                 public static final String KIM_PERSON_INQUIRY_ACTION = "identityManagementPersonInquiry.do";
 173  
                 public static final String KIM_GROUP_DOCUMENT_ACTION = "identityManagementGroupDocument.do";
 174  
                 public static final String KIM_GROUP_INQUIRY_ACTION = "identityManagementGroupInquiry.do";
 175  0
                 public static final Map<String, String> KIM_DOCUMENTS_ACTIONS_MAP = getDocumentActionsMap();
 176  
             private static Map<String, String> getDocumentActionsMap() {
 177  0
                     Map<String, String> kimDocumentActionsMap = new HashMap<String, String>();
 178  0
                     kimDocumentActionsMap.put(KIM_ROLE_DOCUMENT_SHORT_KEY, KIM_ROLE_DOCUMENT_ACTION);
 179  0
                     kimDocumentActionsMap.put(KIM_GROUP_DOCUMENT_SHORT_KEY, KIM_GROUP_DOCUMENT_ACTION);
 180  0
                     kimDocumentActionsMap.put(KIM_PERSON_DOCUMENT_SHORT_KEY, KIM_PERSON_DOCUMENT_ACTION);
 181  0
                 return kimDocumentActionsMap;
 182  
             }
 183  
 
 184  0
                 public static final Map<String, String> KIM_DOCUMENT_TYPE_NAMES_MAP = getDocumentTypeNamesMap();
 185  
             private static Map<String, String> getDocumentTypeNamesMap() {
 186  0
                     Map<String, String> kimDocumentTypeNamesMap = new HashMap<String, String>();
 187  0
                         kimDocumentTypeNamesMap.put(KIM_ROLE_DOCUMENT_SHORT_KEY, KIM_ROLE_DOCUMENT_TYPE_NAME);
 188  0
                         kimDocumentTypeNamesMap.put(KIM_GROUP_DOCUMENT_SHORT_KEY, KIM_GROUP_DOCUMENT_TYPE_NAME);
 189  0
                         kimDocumentTypeNamesMap.put(KIM_PERSON_DOCUMENT_SHORT_KEY, KIM_PERSON_DOCUMENT_TYPE_NAME);
 190  0
                         return kimDocumentTypeNamesMap;
 191  
             }
 192  
 
 193  
             public static final String DELEGATION_PRIMARY = "P";
 194  
             public static final String DELEGATION_SECONDARY = "S";
 195  
             public static final String DELEGATION_PRIMARY_LABEL = "Primary";
 196  
             public static final String DELEGATION_SECONDARY_LABEL = "Secondary";
 197  
 
 198  0
             public static final Map<String, String> DELEGATION_TYPES = getDelegationTypesMap();
 199  
             private static Map<String, String> getDelegationTypesMap() {
 200  0
                     Map<String, String> delegationTypesMap = new HashMap<String, String>();
 201  0
                     delegationTypesMap.put(DELEGATION_PRIMARY, DELEGATION_PRIMARY_LABEL);
 202  0
                     delegationTypesMap.put(DELEGATION_SECONDARY, DELEGATION_SECONDARY_LABEL);
 203  0
                     return delegationTypesMap;
 204  
             }
 205  
 
 206  
             public static final String ROLE_LOOKUPABLE_IMPL = "roleLookupable";
 207  
             public static final String KIM_DOCUMENT_ROLE_MEMBER_LOOKUPABLE_IMPL = "kimDocumentRoleMemberLookupable";
 208  
             public static final String ROLE_MEMBER_LOOKUPABLE_IMPL = "roleMemberImplLookupable";
 209  
             public static final String ROLE_MEMBERS_COLLECTION_NAME = "roleMembers";
 210  
             
 211  0
                 private KimUIConstants() {
 212  0
                         throw new UnsupportedOperationException("do not call");
 213  
                 }
 214  
         }
 215  
 
 216  
         public final static class PrimaryKeyConstants {
 217  
                 public static final String ENTITY_ID = "entityId";
 218  
                 public static final String PRINCIPAL_ID = "principalId";
 219  
                 public static final String ROLE_ID = "id";
 220  
         public static final String SUB_ROLE_ID = "roleId";
 221  
                 public static final String GROUP_ID = "id";
 222  
                 public static final String KIM_TYPE_ID = "id";
 223  
                 public static final String RESPONSIBILITY_ID = "id";
 224  
                 public static final String PERMISSION_ID = "permissionId";
 225  
                 public static final String DELEGATION_ID = "delegationId";
 226  
                 public static final String MEMBER_ID = "memberId";
 227  
                 public static final String DELEGATION_MEMBER_ID = "delegationMemberId";
 228  
                 public static final String ROLE_MEMBER_ID = "roleMemberId";
 229  
                 public static final String ROLE_RESPONSIBILITY_ID = "roleResponsibilityId";
 230  
                 public static final String ROLE_RESPONSIBILITY_ACTION_ID = "roleResponsibilityActionId";
 231  
                 public static final String KIM_PERMISSION_REQUIRED_ATTR_ID = "kimPermissionRequiredAttributeId";
 232  
                 public static final String KIM_ATTRIBUTE_ID = "kimAttributeId";
 233  
                 public static final String KIM_TYPE_CODE ="code";
 234  
         public static final String ID = "id";
 235  
                 
 236  0
                 private PrimaryKeyConstants() {
 237  0
                         throw new UnsupportedOperationException("do not call");
 238  
                 }
 239  
         }
 240  
 
 241  
         public final static class UniqueKeyConstants {
 242  
                 public static final String NAMESPACE_CODE = "namespaceCode";
 243  
                 public static final String PRINCIPAL_NAME = "principalName";
 244  
                 public static final String GROUP_NAME = "name";
 245  
                 public static final String ROLE_NAME = "roleName";
 246  
                 public static final String PERMISSION_NAME = "name";
 247  
                 public static final String RESPONSIBILITY_NAME = "name";
 248  
                 public static final String PERMISSION_TEMPLATE_NAME = "name";
 249  
                 public static final String RESPONSIBILITY_TEMPLATE_NAME = "name";
 250  
         public static final String NAME = "name";
 251  
                 
 252  0
                 private UniqueKeyConstants() {
 253  0
                         throw new UnsupportedOperationException("do not call");
 254  
                 }
 255  
         }
 256  
 
 257  
         public final static class SequenceNames {
 258  
                 public static final String KRIM_PRNCPL_ID_S = "KRIM_PRNCPL_ID_S";
 259  
                 public static final String KRIM_ENTITY_ID_S = "KRIM_ENTITY_ID_S";
 260  
                 public static final String KRIM_ROLE_ID_S = "KRIM_ROLE_ID_S";
 261  
                 public static final String KRIM_GROUP_ID_S = "KRIM_GRP_ID_S";
 262  
                 public static final String KRIM_ROLE_PERM_ID_S = "KRIM_ROLE_PERM_ID_S";
 263  
                 public static final String KRIM_ROLE_RSP_ID_S = "KRIM_ROLE_RSP_ID_S";
 264  
                 public static final String KRIM_ROLE_MBR_ID_S = "KRIM_ROLE_MBR_ID_S";
 265  
                 public static final String KRIM_DLGN_MBR_ID_S = "KRIM_DLGN_MBR_ID_S";
 266  
                 public static final String KRIM_ROLE_RSP_ACTN_ID_S = "KRIM_ROLE_RSP_ACTN_ID_S";
 267  
                 public static final String KRIM_DLGN_ID_S = "KRIM_DLGN_ID_S";
 268  
                 public static final String KRIM_PERM_ID_S = "KRIM_PERM_ID_S";
 269  
                 public static final String KRIM_RSP_ID_S = "KRIM_RSP_ID_S";
 270  
                 public static final String KRIM_ATTR_DATA_ID_S = "KRIM_ATTR_DATA_ID_S";
 271  
                 
 272  0
                 private SequenceNames() {
 273  0
                         throw new UnsupportedOperationException("do not call");
 274  
                 }
 275  
         }
 276  
         
 277  0
         public static class CacheRefreshPeriodSeconds {
 278  
                 public static final String KIM_CACHE_PERMISSION_REFRESH_PERIOD_SECONDS = "kim.cache.permission.refresh.period.seconds";
 279  
                 public static final String KIM_CACHE_ROLE_REFRESH_PERIOD_SECONDS = "kim.cache.role.refresh.period.seconds";
 280  
         }
 281  
 
 282  0
     public final static class AttributeConstants {
 283  
 
 284  
         public static final String PRINCIPAL_ID = KIMPropertyConstants.Person.PRINCIPAL_ID;
 285  
         public static final String BUTTON_NAME = "buttonName";
 286  
         public static final String BEAN_NAME = "beanName";
 287  
         public static final String ACTION_CLASS = "actionClass";
 288  
         public static final String NAMESPACE_CODE = "namespaceCode";
 289  
         public static final String COMPONENT_NAME = "componentName";
 290  
         public static final String PROPERTY_NAME = "propertyName";
 291  
         public static final String EXISTING_RECORDS_ONLY = "existingRecordsOnly";
 292  
         public static final String CREATED_BY_SELF = "createdBySelf";
 293  
         public static final String CREATED_BY_SELF_ONLY = "createdBySelfOnly";
 294  
         public static final String ATTACHMENT_TYPE_CODE = "attachmentTypeCode";
 295  
         public static final String EDIT_MODE = "editMode";
 296  
         public static final String PARAMETER_NAME = "parameterName";
 297  
         public static final String CAMPUS_CODE = "campusCode";
 298  
         public static final String ACTION_REQUEST_CD = "actionRequestCd";
 299  
         public static final String ROUTE_STATUS_CODE = "routeStatusCode";
 300  
         public static final String ROUTE_NODE_NAME = "routeNodeName";
 301  
         public static final String ROLE_NAME = "roleName";
 302  
         public static final String PERMISSION_NAME = "permissionName";
 303  
         public static final String RESPONSIBILITY_NAME = "responsibilityName";
 304  
         public static final String GROUP_NAME = "groupName";
 305  
         public static final String REQUIRED = "required";
 306  
         public static final String ACTION_DETAILS_AT_ROLE_MEMBER_LEVEL = "actionDetailsAtRoleMemberLevel";
 307  
         public static final String DOCUMENT_NUMBER = "documentNumber";
 308  
         public static final String DOCUMENT_TYPE_NAME = "documentTypeName";
 309  
         public static final String SECTION_ID = "sectionId";
 310  
         public static final String KIM_TYPE_ID = PrimaryKeyConstants.KIM_TYPE_ID;
 311  
         public static final String QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER = "qualifierResolverProvidedIdentifier";
 312  
     }
 313  
 
 314  
         /**
 315  
          *
 316  
          * KimGroupS can contain other KimGroupS and KimPrincipalS.
 317  
          * Use these constants to flags their members with the appropriate member
 318  
          * type code.
 319  
          *
 320  
          * @author Kuali Rice Team (rice.collab@kuali.org)
 321  
          */
 322  
         public final static class KimGroupMemberTypes {
 323  
 
 324  
                 /**
 325  
                  * For group members that are themselves groups
 326  
                  */
 327  
                 public static final String GROUP_MEMBER_TYPE = "G";
 328  
 
 329  
                 /**
 330  
                  * For group members that are principals
 331  
                  */
 332  
                 public static final String PRINCIPAL_MEMBER_TYPE = "P";
 333  
                 
 334  0
                 private KimGroupMemberTypes() {
 335  0
                         throw new UnsupportedOperationException("do not call");
 336  
                 }
 337  
         }
 338  
 
 339  0
         private KimConstants() {
 340  0
                 throw new UnsupportedOperationException("do not call");
 341  
         }
 342  
 
 343  0
     public final static class Namespaces {
 344  
         public static final String KIM_NAMESPACE_PREFIX = CoreConstants.Namespaces.ROOT_NAMESPACE_PREFIX + "/kim";
 345  
 
 346  
         public static final String KIM_NAMESPACE_2_0 = KIM_NAMESPACE_PREFIX + "/" + CoreConstants.Versions.VERSION_2_0;
 347  
     }
 348  
     
 349  0
     public static class ParameterKey {
 350  
             public static final String SHOW_BLANK_QUALIFIERS = "KIM_SHOW_BLANK_QUALIFIERS";
 351  
         }
 352  
     
 353  
 }