Package org.openxava.controller
Class ModuleManager
java.lang.Object
org.openxava.controller.ModuleManager
- All Implemented Interfaces:
Serializable
- Author:
- Javier Paniza
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanactionApplies(MetaAction action) voidaddMetaAction(MetaAction action) voidstatic voidcommit()Commit the current JPA manager and Hibernate session, if they exist.voidvoidexecuteAction(String qualifiedActionName, Messages errors, Messages messages, String propertyValues, javax.servlet.http.HttpServletRequest request) voidexecuteAction(String qualifiedActionName, Messages errors, Messages messages, javax.servlet.http.HttpServletRequest request) voidexecuteAction(IAction action, Messages errors, Messages messages, javax.servlet.http.HttpServletRequest request) voidexecuteAfterEachRequestActions(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages) voidexecuteBeforeEachRequestActions(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages) voidexecuteBeforeLoadPage(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages) voidexecuteOnEachRequestActions(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages) voidAn iterator overgetMetaActions()andgetMetaActionsMode().intGets the dialog title based on the view title, last executed action and model name.getFormAction(javax.servlet.http.HttpServletRequest request) HTML action bind to the current form.static final Stringjavax.servlet.http.HttpSessiongetSubcontrollerMetaActions(String controllerName) static final StringbooleanbooleanhasProcessRequest(javax.servlet.http.HttpServletRequest request) voidHides the top button bar and the buttons on bottom.voidinitModule(javax.servlet.http.HttpServletRequest request, Messages errors, Messages messages) booleanisActionAvailable(MetaAction metaAction, Messages errors, Messages messages, String propertyValues, javax.servlet.http.HttpServletRequest request) booleanIs actions list change since the last action execution ?.booleanbooleanbooleanisCoreViaAJAX(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.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanDeprecated.booleanisXavaView(javax.servlet.http.HttpServletRequest request) voidstatic MessagesManages the exception using the same logic when executing an action and it fails.voidvoidparseMultipartRequest(javax.servlet.http.HttpServletRequest request) voidpreInitModule(javax.servlet.http.HttpServletRequest request) voidregisterAction(String qualifiedActionName) voidremoveMetaAction(MetaAction action) voidreset()voidInit JPA in order to process the current request.static voidresetPersistence(javax.servlet.http.HttpSession session) Init JPA in order to process the current request.voidvoidsetActionsChanged(boolean actionsChanged) voidsetApplicationName(String newName) voidsetControllers(String[] nextControllers) voidsetControllersNames(String[] names) voidsetModuleDescription(String moduleDescription) voidsetModuleName(String newModule) voidsetModuleURL(javax.servlet.http.HttpServletRequest request) voidsetNextModule(String nextModule) voidsetPreviousModules(Stack<String> previousModules) static voidsetRefiner(Object newRefiner) static voidsetReseter(Object newReseter) voidsetResetFormPostNeeded(boolean resetFormPostNeeded) voidsetSession(javax.servlet.http.HttpSession session) voidShows the top button bar and the buttons on bottom if they are hidden.void
-
Constructor Details
-
ModuleManager
public ModuleManager()
-
-
Method Details
-
getProduct
-
getVersion
-
getFormAction
HTML action bind to the current form.- Returns:
-
addMetaAction
-
removeMetaAction
-
registerAction
- Since:
- 7.6.3
-
getRowActionsNames
-
getSubcontrollerMetaActions
- Since:
- 5.5.1
-
getMetaControllerElements
-
getSubcontrollers
-
getMetaActions
-
getMetaActionsOnInit
-
getMetaActionsMode
-
getAllMetaActionsIterator
An iterator overgetMetaActions()andgetMetaActionsMode(). -
getGoListAction
- Since:
- 6.1.2
-
hasProcessRequest
public boolean hasProcessRequest(javax.servlet.http.HttpServletRequest request) -
execute
-
log
-
isExecutingAction
public boolean isExecutingAction()- Since:
- 5.9
-
executeAction
public void executeAction(String qualifiedActionName, Messages errors, Messages messages, javax.servlet.http.HttpServletRequest request) - Since:
- 5.7
-
executeAction
public void executeAction(String qualifiedActionName, Messages errors, Messages messages, String propertyValues, javax.servlet.http.HttpServletRequest request) - Since:
- 6.2
-
executeAction
-
isActionAvailable
public boolean isActionAvailable(MetaAction metaAction, Messages errors, Messages messages, String propertyValues, javax.servlet.http.HttpServletRequest request) - Since:
- 5.9
-
setControllers
- Since:
- 4.2.2
-
manageException
Manages the exception using the same logic when executing an action and it fails.It includes the rollback if needed and log the error.
- Parameters:
ex- The exception to manage.- Returns:
- The errors extracted and curated from the exception and its causes.
- Since:
- 7.6
-
resetPersistence
public void resetPersistence()Init JPA in order to process the current request. -
resetPersistence
public static void resetPersistence(javax.servlet.http.HttpSession session) Init JPA in order to process the current request. Static version that accepts the session as parameter.- Since:
- 7.7
-
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
- Throws:
XavaException
-
setControllersNames
-
restorePreviousControllers
- Throws:
XavaException
-
memorizeControllers
- Throws:
XavaException
-
getSession
public javax.servlet.http.HttpSession getSession() -
setSession
public void setSession(javax.servlet.http.HttpSession session) -
getViewURL
-
getApplicationName
-
setApplicationName
- Throws:
XavaException
-
getModuleName
-
setModuleName
- Throws:
XavaException
-
getMetaModule
-
getModuleDescription
-
setModuleDescription
-
getModelName
- Throws:
XavaException
-
getTabName
- Throws:
XavaException
-
isListMode
public boolean isListMode() -
isSplitMode
Deprecated. -
isDetailMode
public boolean isDetailMode()- Since:
- 4m6
-
isDetailModeOnly
public boolean isDetailModeOnly()- Since:
- 6.0
-
getModeName
-
getDefaultActionQualifiedName
-
getDefaultMetaAction
- Returns:
- null if not current default action.
- Since:
- 5.4.1
-
isXavaView
- Throws:
XavaException
-
getXavaViewName
- Throws:
XavaException
-
preInitModule
public void preInitModule(javax.servlet.http.HttpServletRequest request) -
initModule
-
executeBeforeEachRequestActions
-
executeBeforeLoadPage
-
hasInitForwardActions
public boolean hasInitForwardActions() -
executeOnEachRequestActions
-
executeAfterEachRequestActions
-
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
-
setNextModule
-
actionApplies
-
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
-
setPreviousModules
-
reset
public void reset() -
isShowDialog
public boolean isShowDialog() -
isHideDialog
public boolean isHideDialog() -
showDialog
public void showDialog() -
closeDialog
public void closeDialog() -
setRefiner
-
setReseter
- Since:
- 5.2
-
getPermanlinkAction
- Since:
- 5.7
-
getLastExecutedMetaAction
-
getDialogLevel
public int getDialogLevel() -
setResetFormPostNeeded
public void setResetFormPostNeeded(boolean resetFormPostNeeded) -
isResetFormPostNeeded
public boolean isResetFormPostNeeded() -
getModuleURL
- Since:
- 5.9
-
setModuleURL
public void setModuleURL(javax.servlet.http.HttpServletRequest request) - Since:
- 5.9
-
getDialogTitle
Gets the dialog title based on the view title, last executed action and model name.- Returns:
- The dialog title to be displayed
- Since:
- 7.5
-