fr.opensagres.xdocreport.template.formatter
Class AbstractFieldsMetadataClassSerializer

java.lang.Object
  extended by fr.opensagres.xdocreport.template.formatter.AbstractFieldsMetadataClassSerializer
All Implemented Interfaces:
IBaseDiscovery, IFieldsMetadataClassSerializer
Direct Known Subclasses:
FreemarkerFieldsMetadataClassSerializer, VelocityFieldsMetadataClassSerializer

public abstract class AbstractFieldsMetadataClassSerializer
extends Object
implements IFieldsMetadataClassSerializer

Abstract class for Fields metadata serializer.


Constructor Summary
AbstractFieldsMetadataClassSerializer(String id, String description)
           
 
Method Summary
 String getDescription()
          Returns the description of the discovery.
protected abstract  String getFieldName(String key, String getterName)
           
 String getId()
          Returns the id of the discovery.
 void load(FieldsMetadata fieldsMetadata, String key, Class<?> clazz)
          Load simple fields metadata in the given fieldsMetadata by using the given key and Java Class.
 void load(FieldsMetadata fieldsMetadata, String key, Class<?> clazz, boolean listType)
          Load simple/list fields metadata in the given fieldsMetadata by using the given key and Java Class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFieldsMetadataClassSerializer

public AbstractFieldsMetadataClassSerializer(String id,
                                             String description)
Method Detail

getId

public String getId()
Description copied from interface: IBaseDiscovery
Returns the id of the discovery.

Specified by:
getId in interface IBaseDiscovery
Returns:

getDescription

public String getDescription()
Description copied from interface: IBaseDiscovery
Returns the description of the discovery.

Specified by:
getDescription in interface IBaseDiscovery
Returns:

load

public void load(FieldsMetadata fieldsMetadata,
                 String key,
                 Class<?> clazz)
          throws XDocReportException
Description copied from interface: IFieldsMetadataClassSerializer
Load simple fields metadata in the given fieldsMetadata by using the given key and Java Class.

Specified by:
load in interface IFieldsMetadataClassSerializer
Parameters:
fieldsMetadata - the fieldsMetadata where fields metadata must be added.
key - the key (first token) to use to generate field name.
clazz - the Java class model to use to load fields metadata.
Throws:
XDocReportException

load

public void load(FieldsMetadata fieldsMetadata,
                 String key,
                 Class<?> clazz,
                 boolean listType)
          throws XDocReportException
Description copied from interface: IFieldsMetadataClassSerializer
Load simple/list fields metadata in the given fieldsMetadata by using the given key and Java Class.

Specified by:
load in interface IFieldsMetadataClassSerializer
Parameters:
fieldsMetadata - the fieldsMetadata where fields metadata must be added.
key - the key (first token) to use to generate field name.
clazz - the Java class model to use to load fields metadata.
listType - true if it's a list and false otherwise.
Throws:
XDocReportException

getFieldName

protected abstract String getFieldName(String key,
                                       String getterName)


Copyright © 2013. All rights reserved.