Docmosis API 4.5.0

com.docmosis.template.population.render
Class FieldDetails

java.lang.Object
  extended bycom.docmosis.template.population.render.FieldDetails

public class FieldDetails
extends Object

This object provides all the information about a field to be rendered.


Constructor Summary
FieldDetails(String fieldName, String fieldValue, String rendererName, int rowNum, Class valueClass, Object valueObject, Class containerClass, Object containerObject, String id, String[] params, DataProvider[] dataProviderLineage)
           
 
Method Summary
 Class getContainerClass()
          Get the class of the container Java object providing the data (if from reflection).
 Object getContainerObject()
          Get the actual Java object that was queried to obtain the valueObject.
 DataProvider[] getDataProviderLineage()
          Get the lineage of DataProviders starting with the data provider that contains the current value, then the parent DataProvider, then the grand parent etc.
 String getFieldName()
          Get the name of the field.
 String getFieldValue()
          Get the value to be displayed.
 String getId()
          Get the id for this field if one was specified in the template.
 String getRendererName()
          Get the name of the renderer.
 String[] getRendererParams()
          Get any parameters specified for a renderer.
 int getRowNum()
          Get the row number if in a repeating table.
 Class getValueClass()
          Get the class of the value (if the value was obtained from reflection).
 Object getValueObject()
          Get the value in its original form (if the value was obtained from reflection).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldDetails

public FieldDetails(String fieldName,
                    String fieldValue,
                    String rendererName,
                    int rowNum,
                    Class valueClass,
                    Object valueObject,
                    Class containerClass,
                    Object containerObject,
                    String id,
                    String[] params,
                    DataProvider[] dataProviderLineage)
Method Detail

getContainerClass

public Class getContainerClass()
Get the class of the container Java object providing the data (if from reflection). This is the class which has the getter method to provide the data. Null will be returned if the data is not being provided by reflection.

Returns:
the class of the containing object or null

getContainerObject

public Object getContainerObject()
Get the actual Java object that was queried to obtain the valueObject. This is the "parent" of the value we are looking at in terms of a containment hierarchy. Null will be returned if the data is not being provided by reflection.

Returns:
the containing object or null if not applicable

getFieldName

public String getFieldName()
Get the name of the field. This will match precisely the name in the template.

Returns:
the name of the field.

getFieldValue

public String getFieldValue()
Get the value to be displayed. This will be the string representation of the field after any DataFormatters have been applied.

Returns:
the value of the field as a formatted string

getRendererName

public String getRendererName()
Get the name of the renderer.


getRowNum

public int getRowNum()
Get the row number if in a repeating table. If this field is not within a repeating table row, -1 is returned.

Returns:
the row number starting at 1 or -1 if not in a repeating table row.

getValueClass

public Class getValueClass()
Get the class of the value (if the value was obtained from reflection). If the value was not obtained from reflection, null is returned.

Returns:
the class of the value or null.

getValueObject

public Object getValueObject()
Get the value in its original form (if the value was obtained from reflection). This value was transformed into a String (possibly using a DataFormatter) to translate it into the value returned by getFieldValue(). If the value was not obtained from reflection, null is returned.

Returns:
the value or null

getId

public String getId()
Get the id for this field if one was specified in the template. The id is not used internally for any processing, it is merely passed through to the renderer. This allows the same field with the same renderer to be used in different parts of the template and distinguished by the renderer for any reason.

Returns:
the id or null if none specified in the template

getRendererParams

public String[] getRendererParams()
Get any parameters specified for a renderer. The parameters are listed in the same order as they appear in the template.

Returns:
null if there are no paramaters.

getDataProviderLineage

public DataProvider[] getDataProviderLineage()
Get the lineage of DataProviders starting with the data provider that contains the current value, then the parent DataProvider, then the grand parent etc.

Returns:
at least one data provider, and each subsequent parent.

Docmosis API 4.5.0

Copyright © 2014 Docmosis Pty Ltd. All Rights Reserved.