org.kuali.kfs.fp.document.authorization
Class ServiceBillingDocumentAuthorizer

java.lang.Object
  extended by org.kuali.rice.kns.authorization.BusinessObjectAuthorizerBase
      extended by org.kuali.rice.kns.document.authorization.DocumentAuthorizerBase
          extended by org.kuali.rice.kns.document.authorization.TransactionalDocumentAuthorizerBase
              extended by org.kuali.kfs.sys.document.authorization.FinancialSystemTransactionalDocumentAuthorizerBase
                  extended by org.kuali.kfs.sys.document.authorization.AccountingDocumentAuthorizerBase
                      extended by org.kuali.kfs.fp.document.authorization.ServiceBillingDocumentAuthorizer
All Implemented Interfaces:
org.kuali.rice.kns.authorization.BusinessObjectAuthorizer, org.kuali.rice.kns.document.authorization.DocumentAuthorizer, org.kuali.rice.kns.document.authorization.TransactionalDocumentAuthorizer

public class ServiceBillingDocumentAuthorizer
extends AccountingDocumentAuthorizerBase

The customized document authorizer for the Service Billing document


Field Summary
protected static String serviceBillingDocumentTypeName
           
 
Fields inherited from class org.kuali.kfs.sys.document.authorization.AccountingDocumentAuthorizerBase
LOG
 
Fields inherited from class org.kuali.rice.kns.document.authorization.DocumentAuthorizerBase
EDIT_MODE_DEFAULT_TRUE_VALUE, PRE_ROUTING_ROUTE_NAME, USER_SESSION_METHOD_TO_CALL_COMPLETE_MARKER, USER_SESSION_METHOD_TO_CALL_COMPLETE_OBJECT_KEY, USER_SESSION_METHOD_TO_CALL_OBJECT_KEY
 
Constructor Summary
ServiceBillingDocumentAuthorizer()
           
 
Method Summary
protected  Map<String,String> buildPermissionDetails(org.kuali.rice.kns.document.Document document)
          Builds the permission details map for permission check
protected  Map<String,String> buildRoleQualifiers(AccountingLine accountingLine)
          Builds a map of role qualifiers, each containing the chart and account of the given accounting line
 boolean canModifyAccountingLine(org.kuali.rice.kns.document.Document document, AccountingLine accountingLine, org.kuali.rice.kim.bo.Person user)
          Determines if the given user can modify the given accounting line, which is a source line on the given document
protected  boolean canModifyAllSourceAccountingLines(org.kuali.rice.kns.document.Document document, org.kuali.rice.kim.bo.Person user)
          Determines if the given user has permission to modify all accounting lines on the document
 Set<String> getDocumentActions(org.kuali.rice.kns.document.Document document, org.kuali.rice.kim.bo.Person user, Set<String> documentActionsFromPresentationController)
          Overridden to only allow error correction and copy actions if the current user has Modify Accounting Document permission on every accounting line on the document
protected  String getDocumentTypeName(org.kuali.rice.kns.document.Document document)
          Looks up in the data dictionary the document type name
 
Methods inherited from class org.kuali.kfs.sys.document.authorization.AccountingDocumentAuthorizerBase
addRoleQualification, determineLineEditability
 
Methods inherited from class org.kuali.kfs.sys.document.authorization.FinancialSystemTransactionalDocumentAuthorizerBase
canEditBankCode, canErrorCorrect
 
Methods inherited from class org.kuali.rice.kns.document.authorization.TransactionalDocumentAuthorizerBase
getEditModes
 
Methods inherited from class org.kuali.rice.kns.document.authorization.DocumentAuthorizerBase
addPermissionDetails, addStandardAttributes, canAddNoteAttachment, canDeleteNoteAttachment, canEditDocumentOverview, canInitiate, canOpen, canReceiveAdHoc, canSendAdHocRequests, canSendAnyTypeAdHocRequests, canTakeRequestedAction, canViewNoteAttachment, getRouteHeaderService, isDocumentInitiator
 
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.document.authorization.DocumentAuthorizer
canAddNoteAttachment, canDeleteNoteAttachment, canInitiate, canOpen, canReceiveAdHoc, canSendAdHocRequests, canViewNoteAttachment
 
Methods inherited from interface org.kuali.rice.kns.authorization.BusinessObjectAuthorizer
getCollectionItemPermissionDetails, getCollectionItemRoleQualifications, isAuthorized, isAuthorized, isAuthorizedByTemplate, isAuthorizedByTemplate
 

Field Detail

serviceBillingDocumentTypeName

protected static String serviceBillingDocumentTypeName
Constructor Detail

ServiceBillingDocumentAuthorizer

public ServiceBillingDocumentAuthorizer()
Method Detail

getDocumentActions

public Set<String> getDocumentActions(org.kuali.rice.kns.document.Document document,
                                      org.kuali.rice.kim.bo.Person user,
                                      Set<String> documentActionsFromPresentationController)
Overridden to only allow error correction and copy actions if the current user has Modify Accounting Document permission on every accounting line on the document

Specified by:
getDocumentActions in interface org.kuali.rice.kns.document.authorization.DocumentAuthorizer
Overrides:
getDocumentActions in class FinancialSystemTransactionalDocumentAuthorizerBase
See Also:
FinancialSystemTransactionalDocumentAuthorizerBase.getDocumentActions(org.kuali.rice.kns.document.Document, org.kuali.rice.kim.bo.Person, java.util.Set)

canModifyAllSourceAccountingLines

protected boolean canModifyAllSourceAccountingLines(org.kuali.rice.kns.document.Document document,
                                                    org.kuali.rice.kim.bo.Person user)
Determines if the given user has permission to modify all accounting lines on the document

Parameters:
document - the document with source accounting lines to check
user - the user to check
Returns:
true if the user can modify all the accounting lines, false otherwise

canModifyAccountingLine

public boolean canModifyAccountingLine(org.kuali.rice.kns.document.Document document,
                                       AccountingLine accountingLine,
                                       org.kuali.rice.kim.bo.Person user)
Determines if the given user can modify the given accounting line, which is a source line on the given document

Parameters:
document - a document with source accounting lines
accountingLine - the accounting line to check the modifyability of
user - the user being checked
Returns:
true if the user can modify the given accounting line, false otherwise

buildPermissionDetails

protected Map<String,String> buildPermissionDetails(org.kuali.rice.kns.document.Document document)
Builds the permission details map for permission check

Parameters:
document - the document, which is used to find the real document type name
Returns:
a Map of permissionDetail values

getDocumentTypeName

protected String getDocumentTypeName(org.kuali.rice.kns.document.Document document)
Looks up in the data dictionary the document type name

Parameters:
document - the document to find a document type name for
Returns:
the document type name

buildRoleQualifiers

protected Map<String,String> buildRoleQualifiers(AccountingLine accountingLine)
Builds a map of role qualifiers, each containing the chart and account of the given accounting line

Parameters:
accountingLine - the accounting line to build role qualifiers for
Returns:
the Map of role qualifiers


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.