org.kuali.kfs.sys.document.web
Interface AccountingLineRenderingContext

All Known Implementing Classes:
RenderableAccountingLineContainer

public interface AccountingLineRenderingContext

A contract for classes which wish to provide information about an accounting line which is being rendered


Method Summary
 boolean allowDelete()
          Determines whether this line should be allowed to be deleted
 boolean fieldsCanRenderDynamicLabels()
          Tells callers if dynamic field labels should even be rendered
 boolean fieldsShouldRenderHelp()
          Tells callers if fields should render help or not
 AccountingDocument getAccountingDocument()
           
 AccountingLine getAccountingLine()
           
 String getAccountingLineContainingObjectPropertyName()
           
 String getAccountingLinePropertyPath()
           
 List<AccountingLineViewAction> getActionsForLine()
           
 Integer getCurrentLineCount()
          If this is a new line, returns null; if it is a line in a collection, returns the line number within that collection
 List getErrors()
           
 List<String> getFieldNamesForAccountingLine()
          Returns all the field names for the given accounting line, prefixed by the accounting line property path
 KualiAccountingDocumentFormBase getForm()
           
 String getGroupLabel()
           
 String getTabState(String tabKey)
          Returns the tab state for the given tab key on the current form
 Map getUnconvertedValues()
          Returns a Map of all values from the request which were unconverted to actuall business objects
 void incrementTabIndex()
          Increments the tab index on the form this rendering is associated with
 boolean isEditableLine()
          Determines whether the accounting line is - as a whole line - editable or not
 boolean isFieldModifyable(String fieldName)
          Determines whether a field is modifyable or not
 boolean isNewLine()
          Reports whether the tag to be rendered by this rendering context is "new" - ie, not added yet to the accounting group, but living on the form somewhere - or not
 void makeDeletable()
          Makes the line within this accounting line context deletable
 void populateValuesForFields()
          Forces the population of values for all fields used to render the accounting line
 

Method Detail

getAccountingLine

AccountingLine getAccountingLine()
Returns:
the accounting line that would be rendered by the rendering of the given accounting line context

getAccountingLinePropertyPath

String getAccountingLinePropertyPath()
Returns:
the property path from the form to the accounting line returned by the getAccountingLine() method

getActionsForLine

List<AccountingLineViewAction> getActionsForLine()
Returns:
a List of actions which can be performed on the given line

fieldsShouldRenderHelp

boolean fieldsShouldRenderHelp()
Tells callers if fields should render help or not

Returns:
true if fields should render help, false otherwise

fieldsCanRenderDynamicLabels

boolean fieldsCanRenderDynamicLabels()
Tells callers if dynamic field labels should even be rendered

Returns:
true if dynamic field labels can be labeled, false if they should not be labeled.

isNewLine

boolean isNewLine()
Reports whether the tag to be rendered by this rendering context is "new" - ie, not added yet to the accounting group, but living on the form somewhere - or not

Returns:
true if the line is new, false otherwise

getCurrentLineCount

Integer getCurrentLineCount()
If this is a new line, returns null; if it is a line in a collection, returns the line number within that collection

Returns:
the current line count

getFieldNamesForAccountingLine

List<String> getFieldNamesForAccountingLine()
Returns all the field names for the given accounting line, prefixed by the accounting line property path

Returns:
a list of properly prefixed field names

getUnconvertedValues

Map getUnconvertedValues()
Returns a Map of all values from the request which were unconverted to actuall business objects

Returns:
the Map of unconverted values

populateValuesForFields

void populateValuesForFields()
Forces the population of values for all fields used to render the accounting line


getAccountingDocument

AccountingDocument getAccountingDocument()
Returns:
the accounting document that this line to render is part of (or will be, once it is successfully added)

getTabState

String getTabState(String tabKey)
Returns the tab state for the given tab key on the current form

Parameters:
tabKey - the tab key to get the state of
Returns:
the state (either "OPEN" or "CLOSED")

incrementTabIndex

void incrementTabIndex()
Increments the tab index on the form this rendering is associated with


getGroupLabel

String getGroupLabel()
Returns:
the label of the group this accounting line is part of

getErrors

List getErrors()
Returns:
the list of errors on the form

getForm

KualiAccountingDocumentFormBase getForm()
Returns:
the form that the rendered accounting line will be associated with

getAccountingLineContainingObjectPropertyName

String getAccountingLineContainingObjectPropertyName()
Returns:
the property name of the object that contains the accounting lines

isFieldModifyable

boolean isFieldModifyable(String fieldName)
Determines whether a field is modifyable or not

Parameters:
fieldName - the simple name (that is, the name does not include the collection property) of the field
Returns:
true if the field can be modified, false if the field can only be read

isEditableLine

boolean isEditableLine()
Determines whether the accounting line is - as a whole line - editable or not

Returns:
true if the line - as a whole line - is editable, false if nothing on the line can be edited

allowDelete

boolean allowDelete()
Determines whether this line should be allowed to be deleted

Returns:
true if it should be allowed to be deleted, false otherwise

makeDeletable

void makeDeletable()
Makes the line within this accounting line context deletable



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