|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.sys.document.authorization.AccountingLineAuthorizerBase
org.kuali.kfs.module.purap.document.authorization.PurapAccountingLineAuthorizer
public class PurapAccountingLineAuthorizer
Authorizer which deals with financial processing document issues, specifically sales tax lines on documents This class utilizes the new accountingLine model.
Constructor Summary | |
---|---|
PurapAccountingLineAuthorizer()
|
Method Summary | |
---|---|
protected boolean |
allowAccountingLinesAreEditable(AccountingDocument accountingDocument,
AccountingLine accountingLine)
This method checks whether the accounting lines are editable for a specific item type. |
protected boolean |
approvedForUnqualifiedEditing(AccountingDocument accountingDocument,
AccountingLine accountingLine,
String accountingLineCollectionProperty,
boolean currentUserIsDocumentInitiator)
Determines if the given line is editable, no matter what a KIM check would say about line editability. |
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 |
boolean |
determineEditPermissionOnLine(AccountingDocument accountingDocument,
AccountingLine accountingLine,
String accountingLineCollectionProperty,
boolean currentUserIsDocumentInitiator,
boolean pageIsEditable)
A hook to decide, pre-KIM check, if there's an edit permission on the given accounting line |
protected PurApItem |
findTheItemForAccountingLine(AccountingDocument accountingDocument,
AccountingLine accountingLine)
Find the item to which an accounting line belongs. |
protected String |
getAddMethod(AccountingLine accountingLine,
String accountingLineProperty)
Overrides the method in AccountingLineAuthorizerBase so that the add button would have the line item number in addition to the rest of the insertxxxx String for methodToCall when the user clicks on the add button. |
protected String |
getBalanceInquiryMethod(AccountingLine accountingLine,
String accountingLineProperty,
Integer accountingLineIndex)
Overrides the method in AccountingLineAuthorizerBase so that the balance inquiry button would have both the line item number and the accounting line number for methodToCall when the user clicks on the balance inquiry button. |
protected String |
getDeleteLineMethod(AccountingLine accountingLine,
String accountingLineProperty,
Integer accountingLineIndex)
Overrides the method in AccountingLineAuthorizerBase so that the delete button would have both the line item number and the accounting line number for methodToCall when the user clicks on the delete button. |
Set<String> |
getUnviewableBlocks(AccountingDocument accountingDocument,
AccountingLine accountingLine,
boolean newLine,
org.kuali.rice.kim.bo.Person currentUser)
Returns a new empty HashSet |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PurapAccountingLineAuthorizer()
Method Detail |
---|
protected String getAddMethod(AccountingLine accountingLine, String accountingLineProperty)
getAddMethod
in class AccountingLineAuthorizerBase
accountingLine
- accountingLineProperty
-
protected String getDeleteLineMethod(AccountingLine accountingLine, String accountingLineProperty, Integer accountingLineIndex)
getDeleteLineMethod
in class AccountingLineAuthorizerBase
accountingLine
- the accounting line an action is being checked foraccountingLineIndex
- the index of the given accounting line within the the group being rendered
AccountingLineAuthorizerBase.getDeleteLineMethod(org.kuali.kfs.sys.businessobject.AccountingLine, java.lang.String, java.lang.Integer)
protected String getBalanceInquiryMethod(AccountingLine accountingLine, String accountingLineProperty, Integer accountingLineIndex)
getBalanceInquiryMethod
in class AccountingLineAuthorizerBase
accountingLine
- the accounting line an action is being checked foraccountingLineIndex
- the index of the given accounting line within the the group being rendered
AccountingLineAuthorizerBase.getBalanceInquiryMethod(org.kuali.kfs.sys.businessobject.AccountingLine, java.lang.String, java.lang.Integer)
public Set<String> getUnviewableBlocks(AccountingDocument accountingDocument, AccountingLine accountingLine, boolean newLine, org.kuali.rice.kim.bo.Person currentUser)
AccountingLineAuthorizerBase
getUnviewableBlocks
in interface AccountingLineAuthorizer
getUnviewableBlocks
in class AccountingLineAuthorizerBase
accountingDocument
- the accounting document the line to authorize is owned byaccountingLine
- the accounting line that is being authorized againstnewLine
- whether the line is a new line or not
AccountingLineAuthorizerBase.getUnviewableBlocks(org.kuali.kfs.sys.document.AccountingDocument, org.kuali.kfs.sys.businessobject.AccountingLine, boolean, org.kuali.rice.kim.bo.Person)
public boolean isGroupEditable(AccountingDocument accountingDocument, List<? extends AccountingLineRenderingContext> accountingLineRenderingContexts, org.kuali.rice.kim.bo.Person currentUser)
AccountingLineAuthorizer
isGroupEditable
in interface AccountingLineAuthorizer
isGroupEditable
in class AccountingLineAuthorizerBase
accountingDocument
- the accounting document which the collection of line are onaccountingLineRenderingContexts
- the accounting lines of the group, wrapped in AccountingLineRenderingContext implementationscurrentUser
- the current user
org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizer#isGroupEditable(org.kuali.kfs.sys.document.AccountingDocument,
java.lang.String, org.kuali.rice.kim.bo.Person)
public boolean determineEditPermissionOnField(AccountingDocument accountingDocument, AccountingLine accountingLine, String accountingLineCollectionProperty, String fieldName, boolean editablePage)
AccountingLineAuthorizerBase
determineEditPermissionOnField
in class AccountingLineAuthorizerBase
accountingDocument
- the accounting document the line to test is onaccountingLine
- the accounting line to testaccountingLineCollectionProperty
- the property that the accounting line lives infieldName
- the name of the field we are testingeditablePage
- whether the parent page of this field is editable
public boolean determineEditPermissionOnLine(AccountingDocument accountingDocument, AccountingLine accountingLine, String accountingLineCollectionProperty, boolean currentUserIsDocumentInitiator, boolean pageIsEditable)
AccountingLineAuthorizerBase
determineEditPermissionOnLine
in class AccountingLineAuthorizerBase
accountingDocument
- the accounting document the line is or wants to be associated withaccountingLine
- the accounting line itselfaccountingLineCollectionProperty
- the collection the accounting line is or would be part ofcurrentUserIsDocumentInitiator
- is the current user the initiator of the document?
protected boolean allowAccountingLinesAreEditable(AccountingDocument accountingDocument, AccountingLine accountingLine)
protected PurApItem findTheItemForAccountingLine(AccountingDocument accountingDocument, AccountingLine accountingLine)
accountingDocument
- the document holding both the accounting line and the item to which the
accounting line is attachedaccountingLine
- the accounting line of interest, for which a containing item should be found
protected boolean approvedForUnqualifiedEditing(AccountingDocument accountingDocument, AccountingLine accountingLine, String accountingLineCollectionProperty, boolean currentUserIsDocumentInitiator)
approvedForUnqualifiedEditing
in class AccountingLineAuthorizerBase
accountingDocument
- the accounting document the line is or wants to be associated withaccountingLine
- the accounting line itselfaccountingLineCollectionProperty
- the collection the accounting line is or would be part ofcurrentUserIsDocumentInitiator
- is the current user the initiator of the document?
allowAccountingLinesAreEditable(AccountingDocument, AccountingLine)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |