org.kuali.rice.kns.authorization
Class BusinessObjectAuthorizerBase

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

public class BusinessObjectAuthorizerBase
extends Object
implements BusinessObjectAuthorizer


Field Summary
private static DataDictionaryService dataDictionaryService
           
private static IdentityManagementService identityManagementService
           
private static KualiModuleService kualiModuleService
           
private static PersistenceStructureService persistenceStructureService
           
private static PersonService<Person> personService
           
 
Constructor Summary
BusinessObjectAuthorizerBase()
           
 
Method Summary
protected  void addPermissionDetails(BusinessObject primaryBusinessObjectOrDocument, Map<String,String> attributes)
          Override this method to populate the permission details from the primary business object or document.
protected  void addRoleQualification(BusinessObject primaryBusinessObjectOrDocument, Map<String,String> attributes)
          Override this method to populate the role qualifier attributes from the primary business object or document.
private  void addStandardAttributes(BusinessObject primaryBusinessObjectOrDocument, Map<String,String> attributes)
           
 Map<String,String> getCollectionItemPermissionDetails(BusinessObject collectionItemBusinessObject)
           
 Map<String,String> getCollectionItemRoleQualifications(BusinessObject collectionItemBusinessObject)
           
protected static DataDictionaryService getDataDictionaryService()
           
protected static IdentityManagementService getIdentityManagementService()
           
protected static KualiModuleService getKualiModuleService()
           
protected  Map<String,String> getPermissionDetailValues(BusinessObject businessObject)
          Returns a permission details map based off data from the primary business object or the document.
protected static PersonService<Person> getPersonService()
           
protected  Map<String,String> getRoleQualification(BusinessObject primaryBusinessObjectOrDocument)
          Returns a role qualification map based off data from the primary business object or the document.
protected  Map<String,String> getRoleQualification(BusinessObject primaryBusinessObjectOrDocument, String principalId)
           
 boolean isAuthorized(BusinessObject businessObject, String namespaceCode, String permissionName, String principalId)
           
 boolean isAuthorized(BusinessObject businessObject, String namespaceCode, String permissionName, String principalId, Map<String,String> collectionOrFieldLevelPermissionDetails, Map<String,String> collectionOrFieldLevelRoleQualification)
           
 boolean isAuthorizedByTemplate(BusinessObject businessObject, String namespaceCode, String permissionTemplateName, String principalId)
           
 boolean isAuthorizedByTemplate(BusinessObject businessObject, String namespaceCode, String permissionTemplateName, String principalId, Map<String,String> collectionOrFieldLevelPermissionDetails, Map<String,String> collectionOrFieldLevelRoleQualification)
           
protected  boolean permissionExistsByTemplate(BusinessObject businessObject, String namespaceCode, String permissionTemplateName)
           
protected  boolean permissionExistsByTemplate(BusinessObject businessObject, 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<Person> personService

kualiModuleService

private static KualiModuleService kualiModuleService

dataDictionaryService

private static DataDictionaryService dataDictionaryService

persistenceStructureService

private static PersistenceStructureService persistenceStructureService
Constructor Detail

BusinessObjectAuthorizerBase

public BusinessObjectAuthorizerBase()
Method Detail

addRoleQualification

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

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

addPermissionDetails

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

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

addStandardAttributes

private void addStandardAttributes(BusinessObject primaryBusinessObjectOrDocument,
                                   Map<String,String> attributes)
Parameters:
primaryBusinessObjectOrDocument - the primary business object (i.e. the main BO 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(BusinessObject businessObject,
                                                   String namespaceCode,
                                                   String permissionTemplateName)

permissionExistsByTemplate

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

permissionExistsByTemplate

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

isAuthorized

public final boolean isAuthorized(BusinessObject businessObject,
                                  String namespaceCode,
                                  String permissionName,
                                  String principalId)
Specified by:
isAuthorized in interface BusinessObjectAuthorizer

isAuthorizedByTemplate

public final boolean isAuthorizedByTemplate(BusinessObject businessObject,
                                            String namespaceCode,
                                            String permissionTemplateName,
                                            String principalId)
Specified by:
isAuthorizedByTemplate in interface BusinessObjectAuthorizer

isAuthorized

public final boolean isAuthorized(BusinessObject businessObject,
                                  String namespaceCode,
                                  String permissionName,
                                  String principalId,
                                  Map<String,String> collectionOrFieldLevelPermissionDetails,
                                  Map<String,String> collectionOrFieldLevelRoleQualification)
Specified by:
isAuthorized in interface BusinessObjectAuthorizer

isAuthorizedByTemplate

public final boolean isAuthorizedByTemplate(BusinessObject businessObject,
                                            String namespaceCode,
                                            String permissionTemplateName,
                                            String principalId,
                                            Map<String,String> collectionOrFieldLevelPermissionDetails,
                                            Map<String,String> collectionOrFieldLevelRoleQualification)
Specified by:
isAuthorizedByTemplate in interface BusinessObjectAuthorizer

getRoleQualification

protected final Map<String,String> getRoleQualification(BusinessObject primaryBusinessObjectOrDocument)
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:
primaryBusinessObjectOrDocument - the primary business object (i.e. the main BO instance behind the lookup result row or inquiry) or the document
Returns:
a Map containing role qualifications

getRoleQualification

protected final Map<String,String> getRoleQualification(BusinessObject primaryBusinessObjectOrDocument,
                                                        String principalId)

getCollectionItemPermissionDetails

public Map<String,String> getCollectionItemPermissionDetails(BusinessObject collectionItemBusinessObject)
Specified by:
getCollectionItemPermissionDetails in interface BusinessObjectAuthorizer
See Also:
BusinessObjectAuthorizer.getCollectionItemPermissionDetails(org.kuali.rice.kns.bo.BusinessObject)

getCollectionItemRoleQualifications

public Map<String,String> getCollectionItemRoleQualifications(BusinessObject collectionItemBusinessObject)
Specified by:
getCollectionItemRoleQualifications in interface BusinessObjectAuthorizer
See Also:
BusinessObjectAuthorizer.getCollectionItemRoleQualifications(org.kuali.rice.kns.bo.BusinessObject)

getPermissionDetailValues

protected final Map<String,String> getPermissionDetailValues(BusinessObject businessObject)
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:
primaryBusinessObjectOrDocument - the primary business object (i.e. the main BO 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<Person> getPersonService()

getKualiModuleService

protected static final KualiModuleService getKualiModuleService()

getDataDictionaryService

protected static final DataDictionaryService getDataDictionaryService()


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