Package org.openxava.actions
Class SimpleTemplaterAction
java.lang.Object
org.openxava.actions.BaseAction
org.openxava.actions.ViewBaseAction
org.openxava.actions.TabBaseAction
org.openxava.actions.SimpleTemplaterAction
- All Implemented Interfaces:
IAction,IChangeModeAction,IModelAction,IModuleContextAction,IRequestAction
- Direct Known Subclasses:
SimpleHTMLReportAction
- Author:
- Laurent Wibaux
-
Field Summary
FieldsFields inherited from interface org.openxava.actions.IChangeModeAction
DETAIL, LIST, PREVIOUS_MODE, SPLIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()getClassParameters(Class<?> aClass, int maxDepth) Get a map of [name, ""] for the passed classgetCollectionParametersList(Collection<?> collection) Get a list of maps of [name, value] for each one of the objects in the passed collectiongetCollectionParametersList(Collection<?> collection, int maxDepth) Get a list of maps of [name, value] for each one of the objects in the passed collectiongetCollectionTable(Class<?> collectionEntityClass, String collectionName) getCollectionTable(Class<?> collectionEntityClass, String collectionName, int maxDepth) getDepth()getEntityParameters(Object entity) Get a map of [name, value] for the passed objectgetEntityParameters(Object entity, int maxDepth) Get a map of [name, value] for the passed objectgetEntityParameters(Object entity, String parentName, int maxDepth) Get a map of [name, value] for the passed objectgetFieldsTable(Object entity, int depth) getValuesTable(Object entity, int depth) voidvoidvoidsetTemplate(String template) Methods inherited from class org.openxava.actions.TabBaseAction
getCollection, getRow, getSelected, getSelectedKeys, getTab, setCollection, setRow, setViewObjectMethods inherited from class org.openxava.actions.ViewBaseAction
changeThisPropertyByViewValue, closeDialog, getModelName, getPreviousView, getPreviousViews, getView, resetDescriptionsCache, returnToPreviousView, setControllers, setPreviousViews, setView, showDialog, showDialog, showNewView, showView, validateViewValuesMethods inherited from class org.openxava.actions.BaseAction
addActions, addError, addErrors, addInfo, addMessage, addMessages, addWarning, clearActions, commit, executeAction, executeAfter, executeBefore, getContext, getEnvironment, getErrors, getLocale, getManager, getMessages, getNextMode, getQualifiedActionIfAvailable, getRequest, removeActions, returnToPreviousControllers, rollback, setContext, setDefaultControllers, setEnvironment, setErrors, setMessages, setNextMode, setRequestMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openxava.actions.IAction
getErrors, getMessages, setEnvironment, setErrors, setMessages
-
Field Details
-
COLLECTION
- See Also:
-
MAX_DEPTH
protected static final int MAX_DEPTH- See Also:
-
-
Constructor Details
-
SimpleTemplaterAction
public SimpleTemplaterAction()
-
-
Method Details
-
execute
-
getParameters
- Throws:
Exception
-
setModel
- Specified by:
setModelin interfaceIModelAction
-
getFieldsTable
- Throws:
Exception
-
getValuesTable
- 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
-
setTemplate
-
setDepth
-
getDepth
-
getEntityParameters
Get a map of [name, value] for the passed object- Parameters:
entity- - the Object to parsemaxDepth- - the maximum depth while parsing the ManyToOne fields- Returns:
- the map of field names and values
- Throws:
Exception
-
getEntityParameters
Get a map of [name, value] for the passed object- Parameters:
entity- - the Object to parsemaxDepth- - 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 parseparentName- - the prefix to put in front of every namemaxDepth- - the maximum depth while parsing the ManyToOne fields- Returns:
- the map of field names and values
- Throws:
Exception
-
getClassParameters
Get a map of [name, ""] for the passed class- Parameters:
class- - the Class to parsemaxDepth- - 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 parsemaxDepth- - the maximum depth while parsing the ManyToOne fields- Returns:
- the list of maps
- Throws:
Exception
-