Package org.openxava.controller
Class ModuleManager
- java.lang.Object
-
- org.openxava.controller.ModuleManager
-
- All Implemented Interfaces:
java.io.Serializable
public class ModuleManager extends java.lang.Object implements java.io.Serializable
- Author:
- Javier Paniza
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ModuleManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
actionApplies(MetaAction action)
void
addMetaAction(MetaAction action)
void
closeDialog()
static void
commit()
Commit the current JPA manager and Hibernate session, if they exist.void
execute(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
void
executeAction(java.lang.String qualifiedActionName, Messages errors, Messages messages, java.lang.String propertyValues, javax.servlet.http.HttpServletRequest request)
void
executeAction(java.lang.String qualifiedActionName, Messages errors, Messages messages, javax.servlet.http.HttpServletRequest request)
void
executeAction(IAction action, Messages errors, Messages messages, javax.servlet.http.HttpServletRequest request)
void
executeAfterEachRequestActions(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
void
executeBeforeEachRequestActions(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
void
executeBeforeLoadPage(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
void
executeOnEachRequestActions(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
void
formUploadNextTime()
java.util.Iterator
getAllMetaActionsIterator()
An iterator overgetMetaActions()
andgetMetaActionsMode()
.java.lang.String
getApplicationName()
java.lang.String
getDefaultActionQualifiedName()
MetaAction
getDefaultMetaAction()
int
getDialogLevel()
java.lang.String
getEnctype()
Environment
getEnvironment()
java.lang.String
getFormAction(javax.servlet.http.HttpServletRequest request)
HTML action bind to the current form.java.lang.String
getGoListAction()
MetaAction
getLastExecutedMetaAction()
java.util.Collection<MetaAction>
getMetaActions()
java.util.Collection
getMetaActionsMode()
java.util.Collection
getMetaActionsOnInit()
java.util.Collection<MetaControllerElement>
getMetaControllerElements()
MetaModule
getMetaModule()
java.lang.String
getModelName()
java.lang.String
getModeName()
java.lang.String
getModuleDescription()
java.lang.String
getModuleName()
java.lang.String
getModuleURL()
java.lang.String
getNextModule()
java.lang.String
getPermanlinkAction()
java.util.Stack<java.lang.String>
getPreviousModules()
static java.lang.String
getProduct()
java.util.Collection
getRowActionsNames()
javax.servlet.http.HttpSession
getSession()
java.util.Collection<MetaAction>
getSubcontrollerMetaActions(java.lang.String controllerName)
java.util.Collection<MetaSubcontroller>
getSubcontrollers()
java.lang.String
getTabName()
static java.lang.String
getVersion()
java.lang.String
getViewURL()
java.lang.String
getXavaViewName()
boolean
hasInitForwardActions()
boolean
hasProcessRequest(javax.servlet.http.HttpServletRequest request)
void
hideButtons()
Hides the top button bar and the buttons on bottom.void
initModule(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
boolean
isActionAvailable(MetaAction metaAction, Messages errors, Messages messages, java.lang.String propertyValues, javax.servlet.http.HttpServletRequest request)
boolean
isActionsChanged()
Is actions list change since the last action execution ?.boolean
isBottomButtonsVisible()
boolean
isButtonBarVisible()
boolean
isCoreViaAJAX(javax.servlet.http.HttpServletRequest request)
If true the first load of the core of the page on enter in a module is done via AJAX.boolean
isDetailMode()
boolean
isDetailModeOnly()
boolean
isExecutingAction()
boolean
isFormUpload()
boolean
isHideDialog()
boolean
isListMode()
boolean
isReloadAllUINeeded()
boolean
isReloadViewNeeded()
boolean
isResetFormPostNeeded()
boolean
isShowDialog()
boolean
isSplitMode()
Deprecated.boolean
isXavaView(javax.servlet.http.HttpServletRequest request)
void
log(javax.servlet.http.HttpServletRequest request, java.lang.String message)
void
memorizeControllers()
void
parseMultipartRequest(javax.servlet.http.HttpServletRequest request)
void
preInitModule(javax.servlet.http.HttpServletRequest request)
void
removeMetaAction(MetaAction action)
void
reset()
void
resetPersistence()
Init JPA in order to process the current request.void
restorePreviousControllers()
void
setActionsChanged(boolean actionsChanged)
void
setApplicationName(java.lang.String newName)
void
setControllers(java.lang.String[] nextControllers)
void
setControllersNames(java.lang.String[] names)
void
setModuleDescription(java.lang.String moduleDescription)
void
setModuleName(java.lang.String newModule)
void
setModuleURL(javax.servlet.http.HttpServletRequest request)
void
setNextModule(java.lang.String nextModule)
void
setPreviousModules(java.util.Stack<java.lang.String> previousModules)
static void
setRefiner(java.lang.Object newRefiner)
static void
setReseter(java.lang.Object newReseter)
void
setResetFormPostNeeded(boolean resetFormPostNeeded)
void
setSession(javax.servlet.http.HttpSession session)
void
showButtons()
Shows the top button bar and the buttons on bottom if they are hidden.void
showDialog()
-
-
-
Method Detail
-
getProduct
public static final java.lang.String getProduct()
-
getVersion
public static final java.lang.String getVersion()
-
getFormAction
public java.lang.String getFormAction(javax.servlet.http.HttpServletRequest request)
HTML action bind to the current form.- Returns:
-
addMetaAction
public void addMetaAction(MetaAction action)
-
removeMetaAction
public void removeMetaAction(MetaAction action)
-
getRowActionsNames
public java.util.Collection getRowActionsNames()
-
getSubcontrollerMetaActions
public java.util.Collection<MetaAction> getSubcontrollerMetaActions(java.lang.String controllerName)
- Since:
- 5.5.1
-
getMetaControllerElements
public java.util.Collection<MetaControllerElement> getMetaControllerElements()
-
getSubcontrollers
public java.util.Collection<MetaSubcontroller> getSubcontrollers()
-
getMetaActions
public java.util.Collection<MetaAction> getMetaActions()
-
getMetaActionsOnInit
public java.util.Collection getMetaActionsOnInit()
-
getMetaActionsMode
public java.util.Collection getMetaActionsMode()
-
getAllMetaActionsIterator
public java.util.Iterator getAllMetaActionsIterator()
An iterator overgetMetaActions()
andgetMetaActionsMode()
.
-
getGoListAction
public java.lang.String getGoListAction()
- Since:
- 6.1.2
-
hasProcessRequest
public boolean hasProcessRequest(javax.servlet.http.HttpServletRequest request)
-
execute
public void execute(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
-
log
public void log(javax.servlet.http.HttpServletRequest request, java.lang.String message)
-
isExecutingAction
public boolean isExecutingAction()
- Since:
- 5.9
-
executeAction
public void executeAction(java.lang.String qualifiedActionName, Messages errors, Messages messages, javax.servlet.http.HttpServletRequest request)
- Since:
- 5.7
-
executeAction
public void executeAction(java.lang.String qualifiedActionName, Messages errors, Messages messages, java.lang.String propertyValues, javax.servlet.http.HttpServletRequest request)
- Since:
- 6.2
-
executeAction
public void executeAction(IAction action, Messages errors, Messages messages, javax.servlet.http.HttpServletRequest request)
-
isActionAvailable
public boolean isActionAvailable(MetaAction metaAction, Messages errors, Messages messages, java.lang.String propertyValues, javax.servlet.http.HttpServletRequest request)
- Since:
- 5.9
-
setControllers
public void setControllers(java.lang.String[] nextControllers)
- Since:
- 4.2.2
-
resetPersistence
public void resetPersistence()
Init JPA in order to process the current request.
-
commit
public static void commit()
Commit the current JPA manager and Hibernate session, if they exist. Never fails.If fails it does a rollback and put a message in log, but it does not throw an exception. This method is intended to be used after rendering the UI content, not for commit in your own logic. If you want commit from your logic use BaseAction.commit(), XPersistence.commit() or XHibernate.commit().
-
parseMultipartRequest
public void parseMultipartRequest(javax.servlet.http.HttpServletRequest request) throws org.apache.commons.fileupload.FileUploadException
- Throws:
org.apache.commons.fileupload.FileUploadException
-
formUploadNextTime
public void formUploadNextTime()
-
getEnvironment
public Environment getEnvironment() throws XavaException
- Throws:
XavaException
-
setControllersNames
public void setControllersNames(java.lang.String[] names)
-
restorePreviousControllers
public void restorePreviousControllers() throws XavaException
- Throws:
XavaException
-
memorizeControllers
public void memorizeControllers() throws XavaException
- Throws:
XavaException
-
getSession
public javax.servlet.http.HttpSession getSession()
-
setSession
public void setSession(javax.servlet.http.HttpSession session)
-
getViewURL
public java.lang.String getViewURL()
-
getApplicationName
public java.lang.String getApplicationName()
-
setApplicationName
public void setApplicationName(java.lang.String newName) throws XavaException
- Throws:
XavaException
-
getModuleName
public java.lang.String getModuleName()
-
setModuleName
public void setModuleName(java.lang.String newModule) throws XavaException
- Throws:
XavaException
-
getMetaModule
public MetaModule getMetaModule() throws ElementNotFoundException, XavaException
-
getModuleDescription
public java.lang.String getModuleDescription()
-
setModuleDescription
public void setModuleDescription(java.lang.String moduleDescription)
-
getModelName
public java.lang.String getModelName() throws XavaException
- Throws:
XavaException
-
getTabName
public java.lang.String getTabName() throws XavaException
- Throws:
XavaException
-
isListMode
public boolean isListMode()
-
isSplitMode
@Deprecated public boolean isSplitMode()
Deprecated.
-
isDetailMode
public boolean isDetailMode()
- Since:
- 4m6
-
isDetailModeOnly
public boolean isDetailModeOnly()
- Since:
- 6.0
-
getModeName
public java.lang.String getModeName()
-
getDefaultActionQualifiedName
public java.lang.String getDefaultActionQualifiedName()
-
getDefaultMetaAction
public MetaAction getDefaultMetaAction()
- Returns:
- null if not current default action.
- Since:
- 5.4.1
-
isXavaView
public boolean isXavaView(javax.servlet.http.HttpServletRequest request) throws XavaException
- Throws:
XavaException
-
getXavaViewName
public java.lang.String getXavaViewName() throws XavaException
- Throws:
XavaException
-
preInitModule
public void preInitModule(javax.servlet.http.HttpServletRequest request)
-
initModule
public void initModule(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
-
executeBeforeEachRequestActions
public void executeBeforeEachRequestActions(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
-
executeBeforeLoadPage
public void executeBeforeLoadPage(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
-
hasInitForwardActions
public boolean hasInitForwardActions()
-
executeOnEachRequestActions
public void executeOnEachRequestActions(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
-
executeAfterEachRequestActions
public void executeAfterEachRequestActions(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages)
-
getEnctype
public java.lang.String getEnctype()
-
isButtonBarVisible
public boolean isButtonBarVisible()
-
isCoreViaAJAX
public boolean isCoreViaAJAX(javax.servlet.http.HttpServletRequest request)
If true the first load of the core of the page on enter in a module is done via AJAX.
It takes the value from xava.coreViaAJAX of the servlet session, so if you want it return false, write this code:session.setAttribute("xava.coreViaAJAX", false);
Put it to false when you need several modules in the same page.
-
isBottomButtonsVisible
public boolean isBottomButtonsVisible()
- Since:
- 5.8
-
showButtons
public void showButtons()
Shows the top button bar and the buttons on bottom if they are hidden.- Since:
- 5.8
-
hideButtons
public void hideButtons()
Hides the top button bar and the buttons on bottom.- Since:
- 5.8
-
isFormUpload
public boolean isFormUpload()
-
getNextModule
public java.lang.String getNextModule()
-
setNextModule
public void setNextModule(java.lang.String nextModule)
-
actionApplies
public boolean actionApplies(MetaAction action)
-
isReloadAllUINeeded
public boolean isReloadAllUINeeded()
-
isActionsChanged
public boolean isActionsChanged()
Is actions list change since the last action execution ?.
-
setActionsChanged
public void setActionsChanged(boolean actionsChanged)
- Since:
- 5.7
-
isReloadViewNeeded
public boolean isReloadViewNeeded()
-
getPreviousModules
public java.util.Stack<java.lang.String> getPreviousModules()
-
setPreviousModules
public void setPreviousModules(java.util.Stack<java.lang.String> previousModules)
-
reset
public void reset()
-
isShowDialog
public boolean isShowDialog()
-
isHideDialog
public boolean isHideDialog()
-
showDialog
public void showDialog()
-
closeDialog
public void closeDialog()
-
setRefiner
public static void setRefiner(java.lang.Object newRefiner)
-
setReseter
public static void setReseter(java.lang.Object newReseter)
- Since:
- 5.2
-
getPermanlinkAction
public java.lang.String getPermanlinkAction()
- Since:
- 5.7
-
getLastExecutedMetaAction
public MetaAction getLastExecutedMetaAction()
-
getDialogLevel
public int getDialogLevel()
-
setResetFormPostNeeded
public void setResetFormPostNeeded(boolean resetFormPostNeeded)
-
isResetFormPostNeeded
public boolean isResetFormPostNeeded()
-
getModuleURL
public java.lang.String getModuleURL()
- Since:
- 5.9
-
setModuleURL
public void setModuleURL(javax.servlet.http.HttpServletRequest request)
- Since:
- 5.9
-
-