Class SimpleTemplaterAction

    • Constructor Detail

      • SimpleTemplaterAction

        public SimpleTemplaterAction()
    • Method Detail

      • execute

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

        protected java.util.Map<java.lang.String,​java.lang.Object> getParameters()
                                                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setModel

        public void setModel​(java.lang.String modelName)
        Specified by:
        setModel in interface IModelAction
      • getFieldsTable

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

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

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

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

        public java.lang.String getTemplate()
      • setTemplate

        public void setTemplate​(java.lang.String template)
      • setDepth

        public void setDepth​(java.lang.String depth)
      • getDepth

        public java.lang.String getDepth()
      • getEntityParameters

        protected static java.util.Map<java.lang.String,​java.lang.String> getEntityParameters​(java.lang.Object entity)
                                                                                             throws java.lang.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:
        java.lang.Exception
      • getEntityParameters

        protected java.util.Map<java.lang.String,​java.lang.String> getEntityParameters​(java.lang.Object entity,
                                                                                             int maxDepth)
                                                                                      throws java.lang.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:
        java.lang.Exception
      • getEntityParameters

        protected java.util.Map<java.lang.String,​java.lang.String> getEntityParameters​(java.lang.Object entity,
                                                                                             java.lang.String parentName,
                                                                                             int maxDepth)
                                                                                      throws java.lang.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:
        java.lang.Exception
      • getClassParameters

        protected java.util.Map<java.lang.String,​java.lang.String> getClassParameters​(java.lang.Class<?> aClass,
                                                                                            int maxDepth)
                                                                                     throws java.lang.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:
        java.lang.Exception
      • getCollectionParametersList

        protected static java.util.Vector<java.util.Map<java.lang.String,​java.lang.String>> getCollectionParametersList​(java.util.Collection<?> collection)
                                                                                                                       throws java.lang.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:
        java.lang.Exception
      • getCollectionParametersList

        protected static java.util.Vector<java.util.Map<java.lang.String,​java.lang.String>> getCollectionParametersList​(java.util.Collection<?> collection,
                                                                                                                              int maxDepth)
                                                                                                                       throws java.lang.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:
        java.lang.Exception