Class 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 Detail

      • ModuleManager

        public ModuleManager()
    • 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 over getMetaActions() and getMetaActionsMode().

      • 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()
      • setControllersNames

        public void setControllersNames​(java.lang.String[] names)
      • 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()
      • getModuleName

        public java.lang.String getModuleName()
      • getModuleDescription

        public java.lang.String getModuleDescription()
      • setModuleDescription

        public void setModuleDescription​(java.lang.String moduleDescription)
      • 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
      • 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