org.kuali.kfs.module.ld.document.authorization
Class LaborExpenseTransferAccountingLineAuthorizer

java.lang.Object
  extended by org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizerBase
      extended by org.kuali.kfs.module.ld.document.authorization.LaborExpenseTransferAccountingLineAuthorizer
All Implemented Interfaces:
AccountingLineAuthorizer

public class LaborExpenseTransferAccountingLineAuthorizer
extends AccountingLineAuthorizerBase

Data dictionary definition that includes metadata for an accounting document about one of its groups of accounting lines (typically source vs. target, but this should open things up).


Constructor Summary
LaborExpenseTransferAccountingLineAuthorizer()
           
 
Method Summary
 boolean determineEditPermissionOnField(AccountingDocument accountingDocument, AccountingLine accountingLine, String accountingLineCollectionProperty, String fieldName, boolean editablePage)
          Allows the overriding of whether a field on an accounting line is editable or not
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  AccountingLineViewAction getCopyAction(AccountingLine accountingLine, String accountingLinePropertyName, Integer accountingLineIndex, String groupTitle)
          construct the copy action for the given accounting line, typically, a new accounting line
protected  String getCopyLineMethod(AccountingLine accountingLine, String accountingLineProperty, Integer accountingLineIndex)
          Builds the action method name of the method that deletes accounting lines for this group
 
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, getUnviewableBlocks, 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

LaborExpenseTransferAccountingLineAuthorizer

public LaborExpenseTransferAccountingLineAuthorizer()
Method Detail

determineEditPermissionOnField

public boolean determineEditPermissionOnField(AccountingDocument accountingDocument,
                                              AccountingLine accountingLine,
                                              String accountingLineCollectionProperty,
                                              String fieldName,
                                              boolean editablePage)
Description copied from class: AccountingLineAuthorizerBase
Allows the overriding of whether a field on an accounting line is editable or not

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#determineEditPermissionOnField(org.kuali.kfs.sys.document.AccountingDocument, org.kuali.kfs.sys.businessobject.AccountingLine, java.lang.String, java.lang.String)

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)

getCopyAction

protected AccountingLineViewAction getCopyAction(AccountingLine accountingLine,
                                                 String accountingLinePropertyName,
                                                 Integer accountingLineIndex,
                                                 String groupTitle)
construct the copy action for the given accounting line, typically, a new accounting line

Parameters:
accountingLine - the given accounting line
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 copy action for the given accounting line

getCopyLineMethod

protected String getCopyLineMethod(AccountingLine accountingLine,
                                   String accountingLineProperty,
                                   Integer accountingLineIndex)
Builds the action method name of the method that deletes accounting lines for this group

Parameters:
accountingLine - the accounting line an action is being checked for
accountingLinePropertyName - the property name of the accounting line
accountingLineIndex - the index of the given accounting line within the the group being rendered
Returns:
the action method name of the method that deletes accounting lines for this group


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