org.kuali.rice.krad.bo.authorization
Class BusinessObjectAuthorizerBase

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

public class BusinessObjectAuthorizerBase
extends Object
implements BusinessObjectAuthorizer


Constructor Summary
BusinessObjectAuthorizerBase()
           
 
Method Summary
protected  void addPermissionDetails(Object primaryDataObjectOrDocument, Map<String,String> attributes)
          Override this method to populate the permission details from the primary business object or document.
protected  void addRoleQualification(Object primaryDataObjectOrDocument, Map<String,String> attributes)
          Override this method to populate the role qualifier attributes from the primary business object or document.
 Map<String,String> getCollectionItemPermissionDetails(BusinessObject collectionItemBusinessObject)
           
 Map<String,String> getCollectionItemRoleQualifications(BusinessObject collectionItemBusinessObject)
           
protected static DataDictionaryService getDataDictionaryService()
           
protected static KualiModuleService getKualiModuleService()
           
protected  Map<String,String> getPermissionDetailValues(Object dataObject)
          Returns a permission details map based off data from the primary business object or the document.
protected static PermissionService getPermissionService()
           
protected static PersonService 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(Object primaryDataObjectOrDocument, 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 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(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
 

Constructor Detail

BusinessObjectAuthorizerBase

public BusinessObjectAuthorizerBase()
Method Detail

addRoleQualification

protected void addRoleQualification(Object primaryDataObjectOrDocument,
                                    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(Object primaryDataObjectOrDocument,
                                    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

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 dataObject,
                                            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(Object dataObject,
                                            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(Object primaryDataObjectOrDocument,
                                                        String principalId)

getCollectionItemPermissionDetails

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

getCollectionItemRoleQualifications

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

getPermissionDetailValues

protected final Map<String,String> getPermissionDetailValues(Object dataObject)
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

getPermissionService

protected static final PermissionService getPermissionService()

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.