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

java.lang.Object
  extended by org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizerBase
      extended by org.kuali.kfs.fp.document.authorization.FinancialProcessingAccountingLineAuthorizer
          extended by org.kuali.kfs.fp.document.authorization.DistributionOfIncomeAndExpenseAccountingLineAuthorizer
All Implemented Interfaces:
AccountingLineAuthorizer

public class DistributionOfIncomeAndExpenseAccountingLineAuthorizer
extends FinancialProcessingAccountingLineAuthorizer

Authorizer which deals with financial processing document issues, specifically sales tax lines on documents This class utilizes the new accountingLine model.


Constructor Summary
DistributionOfIncomeAndExpenseAccountingLineAuthorizer()
           
 
Method Summary
 boolean determineEditPermissionOnField(AccountingDocument accountingDocument, AccountingLine accountingLine, String accountingLineCollectionProperty, String fieldName, boolean editablePage)
          This method determines if the current accounting line is editable based upon if electronic claims exists on the DI document.
 boolean determineEditPermissionOnLine(AccountingDocument accountingDocument, AccountingLine accountingLine, String accountingLineCollectionProperty, boolean currentUserIsDocumentInitiator, boolean pageIsEditable)
          There's no edit permission on lines in the source group on documents claiming electronic payments
protected  boolean hasElectronicPaymentClaims(AccountingDocument accountingDocument)
          Determines if the DI document has electronic payment claims associated with it
 boolean renderNewLine(AccountingDocument accountingDocument, String accountingGroupProperty)
          Don't render a new line if this is the source group and there's electronic payment claims
 
Methods inherited from class org.kuali.kfs.fp.document.authorization.FinancialProcessingAccountingLineAuthorizer
getUnviewableBlocks, salesTaxUnviewable
 
Methods inherited from class org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizerBase
approvedForUnqualifiedEditing, getActionInfixForExtantAccountingLine, getActionInfixForNewAccountingLine, getActionLabel, getActionMap, getActions, getAddAction, getAddMethod, getBalanceInquiryAction, getBalanceInquiryMethod, getDeleteAction, getDeleteLineMethod, getFieldName, getKFSImagePath, getKimHappyPropertyNameForField, getRiceImagePath, hasEditPermissionOnAccountingLine, hasEditPermissionOnField, isErrorMapContainingErrorsOnLine, isGroupEditable, replaceCollectionElementsWithPlurals, stripDocumentPrefixFromName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributionOfIncomeAndExpenseAccountingLineAuthorizer

public DistributionOfIncomeAndExpenseAccountingLineAuthorizer()
Method Detail

determineEditPermissionOnField

public boolean determineEditPermissionOnField(AccountingDocument accountingDocument,
                                              AccountingLine accountingLine,
                                              String accountingLineCollectionProperty,
                                              String fieldName,
                                              boolean editablePage)
This method determines if the current accounting line is editable based upon if electronic claims exists on the DI document.

Overrides:
determineEditPermissionOnField in class AccountingLineAuthorizerBase
Parameters:
accountingDocument - the accounting document the line to test is on
accountingLine - the accounting line to test
accountingLineCollectionProperty - the property that the accounting line lives in
fieldName - the name of the field we are testing
editablePage - whether the parent page of this field is editable
Returns:
true if the field can be edited (subject to subsequence KIM check); false otherwise
See Also:
org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizerBase#determineFieldModifyability(org.kuali.kfs.sys.document.AccountingDocument, org.kuali.kfs.sys.businessobject.AccountingLine, org.kuali.kfs.sys.document.web.AccountingLineViewField, java.util.Map)

renderNewLine

public boolean renderNewLine(AccountingDocument accountingDocument,
                             String accountingGroupProperty)
Don't render a new line if this is the source group and there's electronic payment claims

Specified by:
renderNewLine in interface AccountingLineAuthorizer
Overrides:
renderNewLine in class AccountingLineAuthorizerBase
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
See Also:
AccountingLineAuthorizerBase.renderNewLine(org.kuali.kfs.sys.document.AccountingDocument, java.lang.String)

determineEditPermissionOnLine

public boolean determineEditPermissionOnLine(AccountingDocument accountingDocument,
                                             AccountingLine accountingLine,
                                             String accountingLineCollectionProperty,
                                             boolean currentUserIsDocumentInitiator,
                                             boolean pageIsEditable)
There's no edit permission on lines in the source group on documents claiming electronic payments

Overrides:
determineEditPermissionOnLine in class AccountingLineAuthorizerBase
Parameters:
accountingDocument - the accounting document the line is or wants to be associated with
accountingLine - the accounting line itself
accountingLineCollectionProperty - the collection the accounting line is or would be part of
currentUserIsDocumentInitiator - is the current user the initiator of the document?
Returns:
true if the line as a whole can be edited, false otherwise
See Also:
org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizerBase#determineEditPermissionOnLine(org.kuali.kfs.sys.document.AccountingDocument, org.kuali.kfs.sys.businessobject.AccountingLine, java.lang.String)

hasElectronicPaymentClaims

protected boolean hasElectronicPaymentClaims(AccountingDocument accountingDocument)
Determines if the DI document has electronic payment claims associated with it

Parameters:
accountingDocument - a DI document
Returns:
true if there are electronic payment claims, false otherwise


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