org.kuali.kfs.module.ar.document.authorization
Class CustomerInvoiceDocumentSourceLinesAuthorizer

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.module.ar.document.authorization.CustomerInvoiceDocumentSourceLinesAuthorizer
All Implemented Interfaces:
AccountingLineAuthorizer

public class CustomerInvoiceDocumentSourceLinesAuthorizer
extends FinancialProcessingAccountingLineAuthorizer


Constructor Summary
CustomerInvoiceDocumentSourceLinesAuthorizer()
           
 
Method Summary
 boolean determineEditPermissionOnField(AccountingDocument accountingDocument, AccountingLine accountingLine, String accountingLineCollectionProperty, String fieldName, boolean editablePage)
          Overridden to make: 1.
protected  String getAccountNumberPropertyName()
           
protected  Map<String,AccountingLineViewAction> getActionMap(AccountingLineRenderingContext accountingLineRenderingContext, String accountingLinePropertyName, Integer accountingLineIndex, String groupTitle)
          collection the actions that are allowed for the given accounting line
protected  String getAmountPropertyName()
           
protected  String getChartPropertyName()
           
protected  String getItemDescriptionPropertyName()
           
 Set<String> getUnviewableBlocks(AccountingDocument accountingDocument, AccountingLine accountingLine, boolean newLine, org.kuali.rice.kim.bo.Person currentUser)
          Returns a new empty HashSet
 
Methods inherited from class org.kuali.kfs.fp.document.authorization.FinancialProcessingAccountingLineAuthorizer
salesTaxUnviewable
 
Methods inherited from class org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizerBase
approvedForUnqualifiedEditing, determineEditPermissionOnLine, getActionInfixForExtantAccountingLine, getActionInfixForNewAccountingLine, getActionLabel, getActions, getAddAction, getAddMethod, getBalanceInquiryAction, getBalanceInquiryMethod, getDeleteAction, getDeleteLineMethod, getFieldName, getKFSImagePath, getKimHappyPropertyNameForField, getRiceImagePath, hasEditPermissionOnAccountingLine, hasEditPermissionOnField, isErrorMapContainingErrorsOnLine, isGroupEditable, renderNewLine, replaceCollectionElementsWithPlurals, stripDocumentPrefixFromName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomerInvoiceDocumentSourceLinesAuthorizer

public CustomerInvoiceDocumentSourceLinesAuthorizer()
Method Detail

getActionMap

protected Map<String,AccountingLineViewAction> getActionMap(AccountingLineRenderingContext accountingLineRenderingContext,
                                                            String accountingLinePropertyName,
                                                            Integer accountingLineIndex,
                                                            String groupTitle)
Description copied from class: AccountingLineAuthorizerBase
collection the actions that are allowed for the given accounting line

Overrides:
getActionMap in class AccountingLineAuthorizerBase
accountingLinePropertyName - the property name of the given account line, typically, the form name
accountingLineIndex - the index of the given accounting line in its accounting line group
groupTitle - the title of the accounting line group
Returns:
the actions that are allowed for the given accounting line
See Also:
org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizerBase#getActionMap(org.kuali.kfs.sys.businessobject.AccountingLine, java.lang.String, java.lang.Integer, java.lang.String)

getUnviewableBlocks

public Set<String> getUnviewableBlocks(AccountingDocument accountingDocument,
                                       AccountingLine accountingLine,
                                       boolean newLine,
                                       org.kuali.rice.kim.bo.Person currentUser)
Description copied from class: AccountingLineAuthorizerBase
Returns a new empty HashSet

Specified by:
getUnviewableBlocks in interface AccountingLineAuthorizer
Overrides:
getUnviewableBlocks in class FinancialProcessingAccountingLineAuthorizer
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
See Also:
AccountingLineAuthorizerBase.getUnviewableBlocks(org.kuali.kfs.sys.document.AccountingDocument, org.kuali.kfs.sys.businessobject.AccountingLine, boolean, org.kuali.rice.kim.bo.Person)

determineEditPermissionOnField

public boolean determineEditPermissionOnField(AccountingDocument accountingDocument,
                                              AccountingLine accountingLine,
                                              String accountingLineCollectionProperty,
                                              String fieldName,
                                              boolean editablePage)
Overridden to make: 1. chart and account number read only for discount lines 2. invoice item description and amount editable for recurring invoices

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)

getChartPropertyName

protected String getChartPropertyName()
Returns:
the property name of the chart field, which will be set to read only for discount lines

getAccountNumberPropertyName

protected String getAccountNumberPropertyName()
Returns:
the property name of the account number field, which will be set to read only for discount lines

getItemDescriptionPropertyName

protected String getItemDescriptionPropertyName()
Returns:
the property name of the invoice item description field, which will be set editable for recurring invoices

getAmountPropertyName

protected String getAmountPropertyName()
Returns:
the property name of the amount field, which will be set editable for recurring invoices


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