org.kuali.rice.kns.document.authorization
Class DocumentAuthorizerBase

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

public class DocumentAuthorizerBase
extends BusinessObjectAuthorizerBase
implements DocumentAuthorizer

DocumentAuthorizer containing common, reusable document-level authorization code.


Field Summary
static String EDIT_MODE_DEFAULT_TRUE_VALUE
           
protected static org.apache.commons.logging.Log LOG
           
static String PRE_ROUTING_ROUTE_NAME
           
static String USER_SESSION_METHOD_TO_CALL_COMPLETE_MARKER
           
static String USER_SESSION_METHOD_TO_CALL_COMPLETE_OBJECT_KEY
           
static String USER_SESSION_METHOD_TO_CALL_OBJECT_KEY
           
 
Constructor Summary
DocumentAuthorizerBase()
           
 
Method Summary
protected  void addPermissionDetails(org.kuali.rice.kns.bo.BusinessObject businessObject, Map<String,String> attributes)
          Override this method to populate the permission details from the primary business object or document.
protected  void addRoleQualification(org.kuali.rice.kns.bo.BusinessObject businessObject, Map<String,String> attributes)
          Override this method to populate the role qualifier attributes from the primary business object or document.
protected  void addStandardAttributes(Document document, Map<String,String> attributes)
           
 boolean canAddNoteAttachment(Document document, String attachmentTypeCode, org.kuali.rice.kim.bo.Person user)
           
 boolean canDeleteNoteAttachment(Document document, String attachmentTypeCode, String createdBySelfOnly, org.kuali.rice.kim.bo.Person user)
           
 boolean canEditDocumentOverview(Document document, org.kuali.rice.kim.bo.Person user)
           
 boolean canInitiate(String documentTypeName, org.kuali.rice.kim.bo.Person user)
           
 boolean canOpen(Document document, org.kuali.rice.kim.bo.Person user)
           
 boolean canReceiveAdHoc(Document document, org.kuali.rice.kim.bo.Person user, String actionRequestCode)
           
 boolean canSendAdHocRequests(Document document, String actionRequestCd, org.kuali.rice.kim.bo.Person user)
           
protected  boolean canSendAnyTypeAdHocRequests(Document document, org.kuali.rice.kim.bo.Person user)
           
protected  boolean canTakeRequestedAction(Document document, String actionRequestCode, org.kuali.rice.kim.bo.Person user)
           
 boolean canViewNoteAttachment(Document document, String attachmentTypeCode, org.kuali.rice.kim.bo.Person user)
           
 Set<String> getDocumentActions(Document document, org.kuali.rice.kim.bo.Person user, Set<String> documentActions)
          Individual document families will need to reimplement this according to their own needs; this version should be good enough to be usable during initial development.
protected  RouteHeaderService getRouteHeaderService()
           
protected  boolean isDocumentInitiator(Document document, org.kuali.rice.kim.bo.Person user)
           
 
Methods inherited from class org.kuali.rice.kns.authorization.BusinessObjectAuthorizerBase
getCollectionItemPermissionDetails, getCollectionItemRoleQualifications, getDataDictionaryService, getIdentityManagementService, getKualiModuleService, getPermissionDetailValues, getPersonService, getRoleQualification, getRoleQualification, isAuthorized, isAuthorized, isAuthorizedByTemplate, isAuthorizedByTemplate, permissionExistsByTemplate, permissionExistsByTemplate, permissionExistsByTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.kns.authorization.BusinessObjectAuthorizer
getCollectionItemPermissionDetails, getCollectionItemRoleQualifications, isAuthorized, isAuthorized, isAuthorizedByTemplate, isAuthorizedByTemplate
 

Field Detail

LOG

protected static org.apache.commons.logging.Log LOG

PRE_ROUTING_ROUTE_NAME

public static final String PRE_ROUTING_ROUTE_NAME
See Also:
Constant Field Values

EDIT_MODE_DEFAULT_TRUE_VALUE

public static final String EDIT_MODE_DEFAULT_TRUE_VALUE
See Also:
Constant Field Values

USER_SESSION_METHOD_TO_CALL_OBJECT_KEY

public static final String USER_SESSION_METHOD_TO_CALL_OBJECT_KEY
See Also:
Constant Field Values

USER_SESSION_METHOD_TO_CALL_COMPLETE_OBJECT_KEY

public static final String USER_SESSION_METHOD_TO_CALL_COMPLETE_OBJECT_KEY
See Also:
Constant Field Values

USER_SESSION_METHOD_TO_CALL_COMPLETE_MARKER

public static final String USER_SESSION_METHOD_TO_CALL_COMPLETE_MARKER
See Also:
Constant Field Values
Constructor Detail

DocumentAuthorizerBase

public DocumentAuthorizerBase()
Method Detail

getDocumentActions

public Set<String> getDocumentActions(Document document,
                                      org.kuali.rice.kim.bo.Person user,
                                      Set<String> documentActions)
Individual document families will need to reimplement this according to their own needs; this version should be good enough to be usable during initial development.

Specified by:
getDocumentActions in interface DocumentAuthorizer
See Also:
org.kuali.rice.kns.authorization.DocumentAuthorizer#getDocumentActionFlags(org.kuali.rice.kns.document.Document, org.kuali.rice.kns.bo.user.KualiUser)

canInitiate

public final boolean canInitiate(String documentTypeName,
                                 org.kuali.rice.kim.bo.Person user)
Specified by:
canInitiate in interface DocumentAuthorizer

canReceiveAdHoc

public final boolean canReceiveAdHoc(Document document,
                                     org.kuali.rice.kim.bo.Person user,
                                     String actionRequestCode)
Specified by:
canReceiveAdHoc in interface DocumentAuthorizer

canOpen

public final boolean canOpen(Document document,
                             org.kuali.rice.kim.bo.Person user)
Specified by:
canOpen in interface DocumentAuthorizer

canAddNoteAttachment

public final boolean canAddNoteAttachment(Document document,
                                          String attachmentTypeCode,
                                          org.kuali.rice.kim.bo.Person user)
Specified by:
canAddNoteAttachment in interface DocumentAuthorizer

canDeleteNoteAttachment

public final boolean canDeleteNoteAttachment(Document document,
                                             String attachmentTypeCode,
                                             String createdBySelfOnly,
                                             org.kuali.rice.kim.bo.Person user)
Specified by:
canDeleteNoteAttachment in interface DocumentAuthorizer

canViewNoteAttachment

public final boolean canViewNoteAttachment(Document document,
                                           String attachmentTypeCode,
                                           org.kuali.rice.kim.bo.Person user)
Specified by:
canViewNoteAttachment in interface DocumentAuthorizer

canSendAdHocRequests

public final boolean canSendAdHocRequests(Document document,
                                          String actionRequestCd,
                                          org.kuali.rice.kim.bo.Person user)
Specified by:
canSendAdHocRequests in interface DocumentAuthorizer

canEditDocumentOverview

public boolean canEditDocumentOverview(Document document,
                                       org.kuali.rice.kim.bo.Person user)

canSendAnyTypeAdHocRequests

protected final boolean canSendAnyTypeAdHocRequests(Document document,
                                                    org.kuali.rice.kim.bo.Person user)

canTakeRequestedAction

protected boolean canTakeRequestedAction(Document document,
                                         String actionRequestCode,
                                         org.kuali.rice.kim.bo.Person user)

addPermissionDetails

protected void addPermissionDetails(org.kuali.rice.kns.bo.BusinessObject businessObject,
                                    Map<String,String> attributes)
Description copied from class: BusinessObjectAuthorizerBase
Override this method to populate the permission details from the primary business object or document. This will only be called once per request.

Overrides:
addPermissionDetails in class BusinessObjectAuthorizerBase
Parameters:
businessObject - 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

addRoleQualification

protected void addRoleQualification(org.kuali.rice.kns.bo.BusinessObject businessObject,
                                    Map<String,String> attributes)
Description copied from class: BusinessObjectAuthorizerBase
Override this method to populate the role qualifier attributes from the primary business object or document. This will only be called once per request.

Overrides:
addRoleQualification in class BusinessObjectAuthorizerBase
Parameters:
businessObject - 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

addStandardAttributes

protected void addStandardAttributes(Document document,
                                     Map<String,String> attributes)

isDocumentInitiator

protected boolean isDocumentInitiator(Document document,
                                      org.kuali.rice.kim.bo.Person user)

getRouteHeaderService

protected RouteHeaderService getRouteHeaderService()


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