Class SimpleTemplaterAction

All Implemented Interfaces:
IAction, IChangeModeAction, IModelAction, IModuleContextAction, IRequestAction
Direct Known Subclasses:
SimpleHTMLReportAction

public class SimpleTemplaterAction extends TabBaseAction implements IModelAction
Author:
Laurent Wibaux
  • Field Details

  • Constructor Details

    • SimpleTemplaterAction

      public SimpleTemplaterAction()
  • Method Details

    • execute

      public void execute() throws Exception
      Specified by:
      execute in interface IAction
      Throws:
      Exception
    • getParameters

      protected Map<String,Object> getParameters() throws Exception
      Throws:
      Exception
    • setModel

      public void setModel(String modelName)
      Specified by:
      setModel in interface IModelAction
    • getFieldsTable

      public String getFieldsTable(Object entity, int depth) throws Exception
      Throws:
      Exception
    • getValuesTable

      public String getValuesTable(Object entity, int depth) throws Exception
      Throws:
      Exception
    • getCollectionTable

      public String getCollectionTable(Class<?> collectionEntityClass, String collectionName) throws Exception
      Throws:
      Exception
    • getCollectionTable

      public String getCollectionTable(Class<?> collectionEntityClass, String collectionName, int maxDepth) throws Exception
      Throws:
      Exception
    • getTemplate

      public String getTemplate()
    • setTemplate

      public void setTemplate(String template)
    • setDepth

      public void setDepth(String depth)
    • getDepth

      public String getDepth()
    • getEntityParameters

      protected static Map<String,String> getEntityParameters(Object entity) throws Exception
      Get a map of [name, value] for the passed object
      Parameters:
      entity - - the Object to parse
      maxDepth - - the maximum depth while parsing the ManyToOne fields
      Returns:
      the map of field names and values
      Throws:
      Exception
    • getEntityParameters

      protected Map<String,String> getEntityParameters(Object entity, int maxDepth) throws Exception
      Get a map of [name, value] for the passed object
      Parameters:
      entity - - the Object to parse
      maxDepth - - the maximum depth while parsing the ManyToOne fields
      Returns:
      the map of field names and values
      Throws:
      Exception
    • getEntityParameters

      protected Map<String,String> getEntityParameters(Object entity, String parentName, int maxDepth) throws Exception
      Get a map of [name, value] for the passed object
      Parameters:
      entity - - the Object to parse
      parentName - - the prefix to put in front of every name
      maxDepth - - the maximum depth while parsing the ManyToOne fields
      Returns:
      the map of field names and values
      Throws:
      Exception
    • getClassParameters

      protected Map<String,String> getClassParameters(Class<?> aClass, int maxDepth) throws Exception
      Get a map of [name, ""] for the passed class
      Parameters:
      class - - the Class to parse
      maxDepth - - the maximum depth while parsing the ManyToOne fields
      Returns:
      the map of field names and values
      Throws:
      Exception
    • getCollectionParametersList

      protected static Vector<Map<String,String>> getCollectionParametersList(Collection<?> collection) throws Exception
      Get a list of maps of [name, value] for each one of the objects in the passed collection
      Parameters:
      collection - - the Collection to parse
      Returns:
      the list of maps
      Throws:
      Exception
    • getCollectionParametersList

      protected static Vector<Map<String,String>> getCollectionParametersList(Collection<?> collection, int maxDepth) throws Exception
      Get a list of maps of [name, value] for each one of the objects in the passed collection
      Parameters:
      collection - - the Collection to parse
      maxDepth - - the maximum depth while parsing the ManyToOne fields
      Returns:
      the list of maps
      Throws:
      Exception