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

java.lang.Object
  extended by org.kuali.rice.krad.bo.authorization.BusinessObjectAuthorizerBase
      extended by org.kuali.rice.krad.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(Object dataObject, Map<String,String> attributes)
          Override this method to populate the permission details from the primary business object or document.
protected  void addRoleQualification(Object dataObject, 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, Person user)
           
 boolean canDeleteNoteAttachment(Document document, String attachmentTypeCode, String createdBySelfOnly, Person user)
           
 boolean canEditDocumentOverview(Document document, Person user)
           
 boolean canInitiate(String documentTypeName, Person user)
           
 boolean canOpen(Document document, Person user)
           
 boolean canReceiveAdHoc(Document document, Person user, String actionRequestCode)
           
 boolean canSendAdHocRequests(Document document, String actionRequestCd, Person user)
           
protected  boolean canSendAnyTypeAdHocRequests(Document document, Person user)
           
protected  boolean canTakeRequestedAction(Document document, String actionRequestCode, Person user)
           
 boolean canViewNoteAttachment(Document document, String attachmentTypeCode, Person user)
           
 Set<String> getDocumentActions(Document document, 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  boolean isDocumentInitiator(Document document, Person user)
           
 
Methods inherited from class org.kuali.rice.krad.bo.authorization.BusinessObjectAuthorizerBase
getCollectionItemPermissionDetails, getCollectionItemRoleQualifications, getDataDictionaryService, getKualiModuleService, getPermissionDetailValues, getPermissionService, 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.krad.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,
                                      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

canInitiate

public final boolean canInitiate(String documentTypeName,
                                 Person user)
Specified by:
canInitiate in interface DocumentAuthorizer

canReceiveAdHoc

public final boolean canReceiveAdHoc(Document document,
                                     Person user,
                                     String actionRequestCode)
Specified by:
canReceiveAdHoc in interface DocumentAuthorizer

canOpen

public final boolean canOpen(Document document,
                             Person user)
Specified by:
canOpen in interface DocumentAuthorizer

canAddNoteAttachment

public final boolean canAddNoteAttachment(Document document,
                                          String attachmentTypeCode,
                                          Person user)
Specified by:
canAddNoteAttachment in interface DocumentAuthorizer

canDeleteNoteAttachment

public final boolean canDeleteNoteAttachment(Document document,
                                             String attachmentTypeCode,
                                             String createdBySelfOnly,
                                             Person user)
Specified by:
canDeleteNoteAttachment in interface DocumentAuthorizer

canViewNoteAttachment

public final boolean canViewNoteAttachment(Document document,
                                           String attachmentTypeCode,
                                           Person user)
Specified by:
canViewNoteAttachment in interface DocumentAuthorizer

canSendAdHocRequests

public final boolean canSendAdHocRequests(Document document,
                                          String actionRequestCd,
                                          Person user)
Specified by:
canSendAdHocRequests in interface DocumentAuthorizer

canEditDocumentOverview

public boolean canEditDocumentOverview(Document document,
                                       Person user)

canSendAnyTypeAdHocRequests

protected final boolean canSendAnyTypeAdHocRequests(Document document,
                                                    Person user)

canTakeRequestedAction

protected boolean canTakeRequestedAction(Document document,
                                         String actionRequestCode,
                                         Person user)

addPermissionDetails

protected void addPermissionDetails(Object dataObject,
                                    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
attributes - permission details will be added to this map

addRoleQualification

protected void addRoleQualification(Object dataObject,
                                    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
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,
                                      Person user)


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