org.kuali.rice.kns.uif.authorization
Class AuthorizerBase

java.lang.Object
  extended by org.kuali.rice.kns.uif.authorization.AuthorizerBase
All Implemented Interfaces:
Authorizer
Direct Known Subclasses:
DocumentAuthorizerBase, InquiryAuthorizerBase

public class AuthorizerBase
extends Object
implements Authorizer

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
private static DataDictionaryService dataDictionaryService
           
private static IdentityManagementService identityManagementService
           
private static KualiModuleService kualiModuleService
           
private static PersonService personService
           
 
Constructor Summary
AuthorizerBase()
           
 
Method Summary
protected  void addPermissionDetails(Object primaryDataObjectOrDocument, Map<String,String> attributes)
          Override this method to populate the permission details from the primary data object or document.
protected  void addRoleQualification(Object primaryDataObjectOrDocument, Map<String,String> attributes)
          Override this method to populate the role qualifier attributes from the primary data object or document.
private  void addStandardAttributes(Object primaryDataObjectOrDocument, Map<String,String> attributes)
           
 Set<String> getActionFlags(UifFormBase model, Person user, Set<String> documentActions)
           
protected static DataDictionaryService getDataDictionaryService()
           
 Set<String> getEditModes(UifFormBase model, Person user, Set<String> editModes)
           
protected static IdentityManagementService getIdentityManagementService()
           
protected static KualiModuleService getKualiModuleService()
           
protected  Map<String,String> getPermissionDetailValues(Object primaryDataObjectOrDocument)
          Returns a permission details map based off data from the primary business object or the document.
protected static PersonService getPersonService()
           
protected  Map<String,String> getRoleQualification(Object primaryDataObjectOrDocument)
          Returns a role qualification map based off data from the primary business object or the document.
protected  Map<String,String> getRoleQualification(Object primaryDataObjectOrDocument, String principalId)
           
 Set<String> getSecurePotentiallyHiddenGroupIds()
           
 Set<String> getSecurePotentiallyReadOnlyGroupIds()
           
 boolean isAuthorized(Object dataObject, String namespaceCode, String permissionName, String principalId)
           
 boolean isAuthorized(Object dataObject, String namespaceCode, String permissionName, String principalId, Map<String,String> collectionOrFieldLevelPermissionDetails, Map<String,String> collectionOrFieldLevelRoleQualification)
           
 boolean isAuthorizedByTemplate(Object dataObject, String namespaceCode, String permissionTemplateName, String principalId)
           
 boolean isAuthorizedByTemplate(Object dataObject, String namespaceCode, String permissionTemplateName, String principalId, Map<String,String> collectionOrFieldLevelPermissionDetails, Map<String,String> collectionOrFieldLevelRoleQualification)
           
protected  boolean permissionExistsByTemplate(Object dataObject, String namespaceCode, String permissionTemplateName)
           
protected  boolean permissionExistsByTemplate(Object dataObject, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails)
           
protected  boolean permissionExistsByTemplate(String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

identityManagementService

private static IdentityManagementService identityManagementService

personService

private static PersonService personService

kualiModuleService

private static KualiModuleService kualiModuleService

dataDictionaryService

private static DataDictionaryService dataDictionaryService
Constructor Detail

AuthorizerBase

public AuthorizerBase()
Method Detail

getActionFlags

public Set<String> getActionFlags(UifFormBase model,
                                  Person user,
                                  Set<String> documentActions)
Specified by:
getActionFlags in interface Authorizer
See Also:
Authorizer.getActionFlags(org.kuali.rice.kns.web.spring.form.UifFormBase, org.kuali.rice.kim.bo.Person, java.util.Set)

getEditModes

public Set<String> getEditModes(UifFormBase model,
                                Person user,
                                Set<String> editModes)
Specified by:
getEditModes in interface Authorizer
See Also:
Authorizer.getEditModes(org.kuali.rice.kns.web.spring.form.UifFormBase, org.kuali.rice.kim.bo.Person, java.util.Set)

getSecurePotentiallyHiddenGroupIds

public Set<String> getSecurePotentiallyHiddenGroupIds()
Specified by:
getSecurePotentiallyHiddenGroupIds in interface Authorizer
See Also:
Authorizer.getSecurePotentiallyHiddenGroupIds()

getSecurePotentiallyReadOnlyGroupIds

public Set<String> getSecurePotentiallyReadOnlyGroupIds()
Specified by:
getSecurePotentiallyReadOnlyGroupIds in interface Authorizer
See Also:
Authorizer.getSecurePotentiallyReadOnlyGroupIds()

addRoleQualification

protected void addRoleQualification(Object primaryDataObjectOrDocument,
                                    Map<String,String> attributes)
Override this method to populate the role qualifier attributes from the primary data object or document. This will only be called once per request.

Parameters:
primaryDataObjectOrDocument - - the primary data object (i.e. the main object instance behind the lookup result row or inquiry) or the document
attributes - - role qualifiers will be added to this map

addPermissionDetails

protected void addPermissionDetails(Object primaryDataObjectOrDocument,
                                    Map<String,String> attributes)
Override this method to populate the permission details from the primary data object or document. This will only be called once per request.

Parameters:
primaryDataObjectOrDocument - - the primary data object (i.e. the main object instance behind the lookup result row or inquiry) or the document
attributes - - permission details will be added to this map

addStandardAttributes

private void addStandardAttributes(Object primaryDataObjectOrDocument,
                                   Map<String,String> attributes)
Parameters:
primaryDataObjectOrDocument - - the primary data object (i.e. the main object instance behind the lookup result row or inquiry) or the document
attributes - - attributes (i.e. role qualifications or permission details) will be added to this map

permissionExistsByTemplate

protected final boolean permissionExistsByTemplate(Object dataObject,
                                                   String namespaceCode,
                                                   String permissionTemplateName)

permissionExistsByTemplate

protected final boolean permissionExistsByTemplate(String namespaceCode,
                                                   String permissionTemplateName,
                                                   Map<String,String> permissionDetails)

permissionExistsByTemplate

protected final boolean permissionExistsByTemplate(Object dataObject,
                                                   String namespaceCode,
                                                   String permissionTemplateName,
                                                   Map<String,String> permissionDetails)

isAuthorized

public final boolean isAuthorized(Object dataObject,
                                  String namespaceCode,
                                  String permissionName,
                                  String principalId)

isAuthorizedByTemplate

public final boolean isAuthorizedByTemplate(Object dataObject,
                                            String namespaceCode,
                                            String permissionTemplateName,
                                            String principalId)

isAuthorized

public final boolean isAuthorized(Object dataObject,
                                  String namespaceCode,
                                  String permissionName,
                                  String principalId,
                                  Map<String,String> collectionOrFieldLevelPermissionDetails,
                                  Map<String,String> collectionOrFieldLevelRoleQualification)

isAuthorizedByTemplate

public final boolean isAuthorizedByTemplate(Object dataObject,
                                            String namespaceCode,
                                            String permissionTemplateName,
                                            String principalId,
                                            Map<String,String> collectionOrFieldLevelPermissionDetails,
                                            Map<String,String> collectionOrFieldLevelRoleQualification)

getRoleQualification

protected final Map<String,String> getRoleQualification(Object primaryDataObjectOrDocument)
Returns a role qualification map based off data from the primary business object or the document. DO NOT MODIFY THE MAP RETURNED BY THIS METHOD

Parameters:
primaryDataObjectOrDocument - the primary data object (i.e. the main object instance behind the lookup result row or inquiry) or the document
Returns:
a Map containing role qualifications

getRoleQualification

protected final Map<String,String> getRoleQualification(Object primaryDataObjectOrDocument,
                                                        String principalId)

getPermissionDetailValues

protected final Map<String,String> getPermissionDetailValues(Object primaryDataObjectOrDocument)
Returns a permission details map based off data from the primary business object or the document. DO NOT MODIFY THE MAP RETURNED BY THIS METHOD

Parameters:
primaryDataObjectOrDocument - the primary data object (i.e. the main object instance behind the lookup result row or inquiry) or the document
Returns:
a Map containing permission details

getIdentityManagementService

protected static final IdentityManagementService getIdentityManagementService()

getPersonService

protected static final PersonService getPersonService()

getKualiModuleService

protected static final KualiModuleService getKualiModuleService()

getDataDictionaryService

protected static final DataDictionaryService getDataDictionaryService()


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.