org.kuali.kfs.sys.document.service.impl
Class AccountingLineRenderingServiceImpl

java.lang.Object
  extended by org.kuali.kfs.sys.document.service.impl.AccountingLineRenderingServiceImpl
All Implemented Interfaces:
AccountingLineRenderingService

public class AccountingLineRenderingServiceImpl
extends Object
implements AccountingLineRenderingService

The default implementation of the AccountingLineRenderingService


Field Summary
protected  String KUALI_FORM_NAME
           
 
Constructor Summary
AccountingLineRenderingServiceImpl()
           
 
Method Summary
protected  List<AccountingLineTableRow> createBlankTableRows(int count)
          This method creates a List of blank table rows, based on the requested count
 AccountingLineViewFieldDefinition createGenericAccountingLineViewFieldDefinition(org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition currentDefinition)
          Begins to create an AccountingLineViewFieldDefinition, based on the information held within the given MaintainableFieldDefinition
 KualiAccountingDocumentFormBase findForm(javax.servlet.jsp.PageContext pageContext)
          Looks in likely places to find the form that is used by the page context for rendering an accounting document
 AccountingLineAuthorizationTransformer getAccountingLineAuthorizationTransformer()
          Gets the accountingLineAuthorizationTransformer attribute.
 org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
          Gets the dataDictionaryService attribute.
protected  FinancialSystemTransactionalDocumentAuthorizerBase getDocumentAuthorizer(AccountingDocument document)
          Creates an accounting document authorizer for the given accounting document
protected  org.kuali.rice.kns.service.DocumentHelperService getDocumentHelperService()
           
 FieldRenderer getFieldRendererForField(org.kuali.rice.kns.web.ui.Field field, AccountingLine accountingLineToRender)
          Based on the control type of the field, returns a proper field renderer
 List<AccountingLineFieldRenderingTransformation> getFieldTransformations()
          Gets the fieldTransformations attribute.
protected  int getMaxRowCount(List<TableJoining> elements)
          Gets the maximum number of rows needed by any child element
 List<AccountingLineTableTransformation> getPostTablificationTransformations()
          Gets the postTablificationTransformations attribute.
protected  FinancialSystemTransactionalDocumentPresentationController getPresentationController(AccountingDocument document)
           
 List<AccountingLineRenderingTransformation> getPreTablificationTransformations()
          Gets the preTablificationTransformations attribute.
protected  void performAuthorizationTransformations(List<TableJoining> elements, AccountingLineGroupDefinition accountingLineGroupDefinition, AccountingDocument accountingDocument, AccountingLine accountingLine, boolean newLine, String accountingLinePropertyName)
          Performs the authorization transformations
protected  void performFieldTransformations(List<TableJoining> elements, AccountingDocument accountingDocument, AccountingLine accountingLine, Map unconvertedValues)
          Performs field transformations for pre-rendering
 void performPostTablificationTransformations(List<AccountingLineTableRow> rows, AccountingLineGroupDefinition groupDefinition, AccountingDocument document, AccountingLine accountingLine, boolean newLine)
          Performs any transformations that should happen after tablification
 void performPreTablificationTransformations(List<TableJoining> elements, AccountingLineGroupDefinition groupDefinition, AccountingDocument accountingDocument, AccountingLine accountingLine, boolean newLine, Map unconvertedValues, String accountingLinePropertyName)
          Performs any known transformations against the List of AccountingLineViewRenderableElements
 void setAccountingLineAuthorizationTransformer(AccountingLineAuthorizationTransformer accountingLineAuthorizationTransformer)
          Sets the accountingLineAuthorizationTransformer attribute value.
 void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
          Sets the dataDictionaryService attribute value.
 void setFieldTransformations(List<AccountingLineFieldRenderingTransformation> fieldTransformations)
          Sets the fieldTransformations attribute value.
 void setPostTablificationTransformations(List<AccountingLineTableTransformation> postTablificationTransformations)
          Sets the postTablificationTransformations attribute value.
 void setPreTablificationTransformations(List<AccountingLineRenderingTransformation> preTablificationTransformations)
          Sets the preTablificationTransformations attribute value.
 List<AccountingLineTableRow> tablify(List<TableJoining> elements)
          Simplify the tree so that it is made up of only table elements and fields
protected  void tablifyElements(List<TableJoining> elements, List<AccountingLineTableRow> rows)
          Requests each of the given elements to join the table
protected  boolean usesDateValidation(String propertyName, Object businessObject)
          Determines if this method uses a date validation pattern, in which case, a date picker should be rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KUALI_FORM_NAME

protected final String KUALI_FORM_NAME
See Also:
Constant Field Values
Constructor Detail

AccountingLineRenderingServiceImpl

public AccountingLineRenderingServiceImpl()
Method Detail

performPreTablificationTransformations

public void performPreTablificationTransformations(List<TableJoining> elements,
                                                   AccountingLineGroupDefinition groupDefinition,
                                                   AccountingDocument accountingDocument,
                                                   AccountingLine accountingLine,
                                                   boolean newLine,
                                                   Map unconvertedValues,
                                                   String accountingLinePropertyName)
Description copied from interface: AccountingLineRenderingService
Performs any known transformations against the List of AccountingLineViewRenderableElements

Specified by:
performPreTablificationTransformations in interface AccountingLineRenderingService
Parameters:
elements - the List of elements to transform
accountingDocument - the Accounting Document we're rendering lines from
accountingLine - the line we're rendering
newLine - true if what is being rendered is the new line in the form; false otherwise
unconvertedValues - any unconverted values stored in the form
accountingLinePropertyName - the property path to this accounting line
See Also:
AccountingLineRenderingService.performPreTablificationTransformations(java.util.List, org.kuali.kfs.sys.document.datadictionary.AccountingLineGroupDefinition, org.kuali.kfs.sys.document.AccountingDocument, org.kuali.kfs.sys.businessobject.AccountingLine, boolean, java.util.Map, java.lang.String)

performPostTablificationTransformations

public void performPostTablificationTransformations(List<AccountingLineTableRow> rows,
                                                    AccountingLineGroupDefinition groupDefinition,
                                                    AccountingDocument document,
                                                    AccountingLine accountingLine,
                                                    boolean newLine)
Description copied from interface: AccountingLineRenderingService
Performs any transformations that should happen after tablification

Specified by:
performPostTablificationTransformations in interface AccountingLineRenderingService
Parameters:
rows - the tablified rows
groupDefinition - the data dictionary definition of the group to render
document - the Accounting Document we're rendering lines from
accountingLine - the line we're rendering the line which is being rendered
newLine - true if what is being rendered is the new line in the form; false otherwise
See Also:
AccountingLineRenderingService.performPostTablificationTransformations(java.util.List, org.kuali.kfs.sys.document.datadictionary.AccountingLineGroupDefinition, org.kuali.kfs.sys.document.AccountingDocument, org.kuali.kfs.sys.businessobject.AccountingLine, boolean)

performAuthorizationTransformations

protected void performAuthorizationTransformations(List<TableJoining> elements,
                                                   AccountingLineGroupDefinition accountingLineGroupDefinition,
                                                   AccountingDocument accountingDocument,
                                                   AccountingLine accountingLine,
                                                   boolean newLine,
                                                   String accountingLinePropertyName)
Performs the authorization transformations

Parameters:
elements - the layout elements which we are authorizing
accountingLineGroupDefinition - the data dictionary definition of the accounting line group
accountingDocument - the accounting line document we're rendering accounting lines for
accountingLine - the accounting line we're rendering
newLine - true if the accounting line is not yet on the form yet, false otherwise

performFieldTransformations

protected void performFieldTransformations(List<TableJoining> elements,
                                           AccountingDocument accountingDocument,
                                           AccountingLine accountingLine,
                                           Map unconvertedValues)
Performs field transformations for pre-rendering

Parameters:
elements - the layout elements that hold fields to transform
accountingDocument - the accounting document with the line we are rendering
accountingLine - the accounting line we are rendering
unconvertedValues - any unconverted values

getDocumentAuthorizer

protected FinancialSystemTransactionalDocumentAuthorizerBase getDocumentAuthorizer(AccountingDocument document)
Creates an accounting document authorizer for the given accounting document

Parameters:
document - the document to get an authorizer for
Returns:
an authorizer for the document

getPresentationController

protected FinancialSystemTransactionalDocumentPresentationController getPresentationController(AccountingDocument document)
Parameters:
document - the document to get the presentation controller for
Returns:
the proper presentation controller

tablify

public List<AccountingLineTableRow> tablify(List<TableJoining> elements)
Simplify the tree so that it is made up of only table elements and fields

Specified by:
tablify in interface AccountingLineRenderingService
Parameters:
elements - renderable elements to find table form for
Returns:
a list of table rows that can be rendered
See Also:
AccountingLineRenderingService.tablify(java.util.List)

getMaxRowCount

protected int getMaxRowCount(List<TableJoining> elements)
Gets the maximum number of rows needed by any child element

Parameters:
elements - the elements to turn into table rows
Returns:
the maximum number of rows requested

createBlankTableRows

protected List<AccountingLineTableRow> createBlankTableRows(int count)
This method creates a List of blank table rows, based on the requested count

Parameters:
count - the count of table rows
Returns:
a List of table rows ready for population

tablifyElements

protected void tablifyElements(List<TableJoining> elements,
                               List<AccountingLineTableRow> rows)
Requests each of the given elements to join the table

Parameters:
elements - the elements to join to the table
rows - the table rows to join to

getFieldRendererForField

public FieldRenderer getFieldRendererForField(org.kuali.rice.kns.web.ui.Field field,
                                              AccountingLine accountingLineToRender)
Description copied from interface: AccountingLineRenderingService
Based on the control type of the field, returns a proper field renderer

Specified by:
getFieldRendererForField in interface AccountingLineRenderingService
Returns:
the field renderer which will properly display this field
See Also:
AccountingLineRenderingService.getFieldRendererForField(org.kuali.rice.kns.web.ui.Field, org.kuali.kfs.sys.businessobject.AccountingLine)

usesDateValidation

protected boolean usesDateValidation(String propertyName,
                                     Object businessObject)
Determines if this method uses a date validation pattern, in which case, a date picker should be rendered

Parameters:
propertyName - the property of the field being checked from the command line
accountingLineToRender - the accounting line which is being rendered
Returns:
true if the property does use date validation, false otherwise

createGenericAccountingLineViewFieldDefinition

public AccountingLineViewFieldDefinition createGenericAccountingLineViewFieldDefinition(org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition currentDefinition)
Description copied from interface: AccountingLineRenderingService
Begins to create an AccountingLineViewFieldDefinition, based on the information held within the given MaintainableFieldDefinition

Specified by:
createGenericAccountingLineViewFieldDefinition in interface AccountingLineRenderingService
Parameters:
currentDefinition - the field definition to create a generic accounting line view field version of
Returns:
a basic AccountingLineViewFieldDefinition
See Also:
AccountingLineRenderingService.createGenericAccountingLineViewFieldDefinition(org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition)

getFieldTransformations

public List<AccountingLineFieldRenderingTransformation> getFieldTransformations()
Gets the fieldTransformations attribute.

Returns:
Returns the fieldTransformations.

setFieldTransformations

public void setFieldTransformations(List<AccountingLineFieldRenderingTransformation> fieldTransformations)
Sets the fieldTransformations attribute value.

Parameters:
fieldTransformations - The fieldTransformations to set.

getAccountingLineAuthorizationTransformer

public AccountingLineAuthorizationTransformer getAccountingLineAuthorizationTransformer()
Gets the accountingLineAuthorizationTransformer attribute.

Returns:
Returns the accountingLineAuthorizationTransformer.

setAccountingLineAuthorizationTransformer

public void setAccountingLineAuthorizationTransformer(AccountingLineAuthorizationTransformer accountingLineAuthorizationTransformer)
Sets the accountingLineAuthorizationTransformer attribute value.

Parameters:
accountingLineAuthorizationTransformer - The accountingLineAuthorizationTransformer to set.

getDataDictionaryService

public org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
Gets the dataDictionaryService attribute.

Returns:
Returns the dataDictionaryService.

setDataDictionaryService

public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Sets the dataDictionaryService attribute value.

Parameters:
dataDictionaryService - The dataDictionaryService to set.

getPostTablificationTransformations

public List<AccountingLineTableTransformation> getPostTablificationTransformations()
Gets the postTablificationTransformations attribute.

Returns:
Returns the postTablificationTransformations.

setPostTablificationTransformations

public void setPostTablificationTransformations(List<AccountingLineTableTransformation> postTablificationTransformations)
Sets the postTablificationTransformations attribute value.

Parameters:
postTablificationTransformations - The postTablificationTransformations to set.

getPreTablificationTransformations

public List<AccountingLineRenderingTransformation> getPreTablificationTransformations()
Gets the preTablificationTransformations attribute.

Returns:
Returns the preTablificationTransformations.

setPreTablificationTransformations

public void setPreTablificationTransformations(List<AccountingLineRenderingTransformation> preTablificationTransformations)
Sets the preTablificationTransformations attribute value.

Parameters:
preTablificationTransformations - The preTablificationTransformations to set.

findForm

public KualiAccountingDocumentFormBase findForm(javax.servlet.jsp.PageContext pageContext)
Description copied from interface: AccountingLineRenderingService
Looks in likely places to find the form that is used by the page context for rendering an accounting document

Specified by:
findForm in interface AccountingLineRenderingService
Parameters:
pageContext - the pageContext to find the form in
Returns:
the form for the page being rendered
See Also:
AccountingLineRenderingService.findForm(javax.servlet.jsp.PageContext)

getDocumentHelperService

protected org.kuali.rice.kns.service.DocumentHelperService getDocumentHelperService()


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