org.kuali.kfs.sys.document.authorization
Interface AccountingLineAuthorizer

All Known Implementing Classes:
AccountingLineAuthorizerBase, AdvanceDepositAccountingLineAuthorizer, AssetPaymentAccountingLineAuthorizer, BudgetAdjustmentAccountingLineAuthorizer, CustomerInvoiceDocumentSourceLinesAuthorizer, DisbursementVoucherAccountingLineAuthorizer, DistributionOfIncomeAndExpenseAccountingLineAuthorizer, FinancialProcessingAccountingLineAuthorizer, LaborExpenseTransferAccountingLineAuthorizer, ProcurementCardAccountingLineAuthorizer, PurapAccountingLineAuthorizer, PurchaseOrderAccountingLineAuthorizer, RequisitionAccountingLineAuthorizer, SecAccountingLineAuthorizer

public interface AccountingLineAuthorizer

Methods used to determine certain permissions associated with an accounting line.


Method Summary
 List<AccountingLineViewAction> getActions(AccountingDocument accountingDocument, AccountingLineRenderingContext accountingLineRenderingContext, String accountingLinePropertyName, Integer lineIndex, org.kuali.rice.kim.bo.Person currentUser, String groupTitle)
          Determines what actions are available to act upon the given accounting line
 Set<String> getUnviewableBlocks(AccountingDocument accountingDocument, AccountingLine accountingLine, boolean newLine, org.kuali.rice.kim.bo.Person currentUser)
          Determines which, if any, blocks whose children elements should not in any fashion be rendered
 boolean hasEditPermissionOnAccountingLine(AccountingDocument accountingDocument, AccountingLine accountingLine, String accountingLineCollectionProperty, org.kuali.rice.kim.bo.Person currentUser, boolean pageIsEditable)
          determine whether the current user has permission to edit the given accounting line as a whole
 boolean hasEditPermissionOnField(AccountingDocument accountingDocument, AccountingLine accountingLine, String accountingLineCollectionProperty, String fieldName, boolean editableLine, boolean editablePage, org.kuali.rice.kim.bo.Person currentUser)
          determine whether the current user has permission to edit the given field in the given accounting line
 boolean isGroupEditable(AccountingDocument accountingDocument, List<? extends AccountingLineRenderingContext> accountingLineRenderingContexts, org.kuali.rice.kim.bo.Person currentUser)
          Determines if any entire group is rendered as editable, which means that a new line will appear
 boolean renderNewLine(AccountingDocument accountingDocument, String accountingGroupProperty)
          Determines if new lines should be rendered for the given accounting line group (identified by its property name)
 

Method Detail

getUnviewableBlocks

Set<String> getUnviewableBlocks(AccountingDocument accountingDocument,
                                AccountingLine accountingLine,
                                boolean newLine,
                                org.kuali.rice.kim.bo.Person currentUser)
Determines which, if any, blocks whose children elements should not in any fashion be rendered

Parameters:
accountingDocument - the accounting document the line to authorize is owned by
accountingLine - the accounting line that is being authorized against
newLine - whether the line is a new line or not
Returns:
a Set of the names of blocks that should not being in any way rendered

getActions

List<AccountingLineViewAction> getActions(AccountingDocument accountingDocument,
                                          AccountingLineRenderingContext accountingLineRenderingContext,
                                          String accountingLinePropertyName,
                                          Integer lineIndex,
                                          org.kuali.rice.kim.bo.Person currentUser,
                                          String groupTitle)
Determines what actions are available to act upon the given accounting line

Parameters:
accountingDocument - the accounting document the line to authorize is owned by
accountingLineRenderingContext - a renderable context wrapping the accounting line that is being authorized against
accountingLinePropertyName - the name of the property that represents the accounting line
lineIndex - value, as Integer, of the index of the given accounting line within the group's collection of accounting lines; if null, then it is assumed that this is a new line
groupTitle - title of the group from the data dictionary
Returns:
a List of the Actions that are available for this line

renderNewLine

boolean renderNewLine(AccountingDocument accountingDocument,
                      String accountingGroupProperty)
Determines if new lines should be rendered for the given accounting line group (identified by its property name)

Parameters:
accountingDocument - the document that has accounting lines being authorized
accountingGroupProperty - the property of this accounting group
Returns:
true if new lines should be displayed, false otherwise

isGroupEditable

boolean isGroupEditable(AccountingDocument accountingDocument,
                        List<? extends AccountingLineRenderingContext> accountingLineRenderingContexts,
                        org.kuali.rice.kim.bo.Person currentUser)
Determines if any entire group is rendered as editable, which means that a new line will appear

Parameters:
accountingDocument - the accounting document which the collection of line are on
accountingLineRenderingContexts - the accounting lines of the group, wrapped in AccountingLineRenderingContext implementations
currentUser - the current user
Returns:
true if the group can be edited, false otherwise

hasEditPermissionOnField

boolean hasEditPermissionOnField(AccountingDocument accountingDocument,
                                 AccountingLine accountingLine,
                                 String accountingLineCollectionProperty,
                                 String fieldName,
                                 boolean editableLine,
                                 boolean editablePage,
                                 org.kuali.rice.kim.bo.Person currentUser)
determine whether the current user has permission to edit the given field in the given accounting line

Parameters:
accountingDocument - the given accounting document
accountingLine - the given accounting line in the document
accountingLineCollectionProperty - the property of the collection the given accounting line is in
fieldName - the name of a field in the given accounting line
editableLine - whether the parent line of this field is editable
editablePage - whether the parent page of this field is editable
currentUser - the current user
Returns:
true if the the current user has permission to edit the given field in the given accounting line; otherwsie, false

hasEditPermissionOnAccountingLine

boolean hasEditPermissionOnAccountingLine(AccountingDocument accountingDocument,
                                          AccountingLine accountingLine,
                                          String accountingLineCollectionProperty,
                                          org.kuali.rice.kim.bo.Person currentUser,
                                          boolean pageIsEditable)
determine whether the current user has permission to edit the given accounting line as a whole

Parameters:
accountingDocument - the given accounting document
accountingLine - the given accounting line in the document
accountingLineCollectionProperty - the property of the group that holds these accounting lines
currentUser - the current user
pageIsEditable - whether the current page is editable by the current user or not
Returns:
true if the the current user has permission to edit the given accounting line; otherwsie, false


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