Class AbstractFieldsMetadataClassSerializer

java.lang.Object
fr.opensagres.xdocreport.template.formatter.AbstractFieldsMetadataClassSerializer
All Implemented Interfaces:
fr.opensagres.xdocreport.core.discovery.IBaseDiscovery, IFieldsMetadataClassSerializer

public abstract class AbstractFieldsMetadataClassSerializer extends Object implements IFieldsMetadataClassSerializer
Abstract class for Fields metadata serializer.
  • Constructor Details

    • AbstractFieldsMetadataClassSerializer

      public AbstractFieldsMetadataClassSerializer(String id, String description)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface fr.opensagres.xdocreport.core.discovery.IBaseDiscovery
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface fr.opensagres.xdocreport.core.discovery.IBaseDiscovery
    • setFilter

      public void setFilter(IPropertyDescriptorFilter filter)
    • load

      public void load(FieldsMetadata fieldsMetadata, String key, Class<?> clazz) throws fr.opensagres.xdocreport.core.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:
      fr.opensagres.xdocreport.core.XDocReportException
    • load

      public void load(FieldsMetadata fieldsMetadata, String key, Class<?> clazz, boolean listType) throws fr.opensagres.xdocreport.core.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:
      fr.opensagres.xdocreport.core.XDocReportException
    • getFieldName

      protected abstract String getFieldName(String key, String getterName)