Class BaseAction

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String FORWARD_DEFAULT  
      protected Localizer l  
      protected Log log  
      static com.fasterxml.jackson.databind.ObjectMapper mapper  
      protected Setup setup  
      • Fields inherited from class org.apache.struts.actions.DispatchAction

        clazz, methods, types
      • Fields inherited from class org.apache.struts.actions.BaseAction

        messages
      • Fields inherited from class org.apache.struts.action.Action

        servlet
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseAction()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void checkModifyed​(LastModify lastModify, DynActionForm form)  
      protected org.apache.struts.action.ActionForward data​(java.sql.Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form)
      Returns Struts forward with name=form.getAction().
      protected org.apache.struts.action.ActionForward data​(java.sql.Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form, java.lang.String name)
      Returns Struts forward by name.
      protected org.apache.struts.action.ActionForward data​(ConnectionSet conSet, org.apache.struts.action.ActionMapping mapping, DynActionForm form)
      Returns Struts forward with name=form.getAction().
      protected org.apache.struts.action.ActionForward data​(ConnectionSet conSet, org.apache.struts.action.ActionMapping mapping, DynActionForm form, java.lang.String name)
      Returns Struts forward by name.
      protected org.apache.struts.action.ActionForward dispatchMethod​(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm actionForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String name)  
      protected boolean getAccess​(java.lang.String accessList, java.lang.String accessItemKey, int value)  
      protected org.apache.struts.action.ActionForward processJsonForward​(java.sql.Connection con, DynActionForm form)
      Deprecated.
      protected org.apache.struts.action.ActionForward processJsonForward​(java.sql.Connection con, DynActionForm form, javax.servlet.http.HttpServletResponse response)
      Deprecated.
      protected org.apache.struts.action.ActionForward processJsonForward​(ConnectionSet conSet, DynActionForm form)
      Deprecated.
      protected org.apache.struts.action.ActionForward processJsonForward​(ConnectionSet conSet, DynActionForm form, javax.servlet.http.HttpServletResponse response)
      Deprecated.
      protected org.apache.struts.action.ActionForward processUserTypedForward​(java.sql.Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form, java.lang.String htmlForwardName)
      Deprecated.
      protected org.apache.struts.action.ActionForward processUserTypedForward​(java.sql.Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form, javax.servlet.http.HttpServletResponse response, java.lang.String htmlForwardName)
      Deprecated.
      protected org.apache.struts.action.ActionForward processUserTypedForward​(ConnectionSet conSet, org.apache.struts.action.ActionMapping mapping, DynActionForm form, java.lang.String htmlForwardName)
      Deprecated.
      protected org.apache.struts.action.ActionForward processUserTypedForward​(ConnectionSet conSet, org.apache.struts.action.ActionMapping mapping, DynActionForm form, javax.servlet.http.HttpServletResponse response, java.lang.String htmlForwardName)
      Deprecated.
      protected void restoreRequestParams​(java.sql.Connection con, DynActionForm form, boolean get, boolean set, java.lang.String... params)
      Выставляет параметры запроса из сохранённых значений в случае, если они не переданы явно.
      protected org.apache.struts.action.ActionForward status​(java.sql.Connection con, DynActionForm form)
      Sends response result in JSON format.
      protected org.apache.struts.action.ActionForward status​(ConnectionSet conSet, DynActionForm form)
      Sends response result in JSON format.
      protected org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Метод сделан, чтобы не переопределяли его, переопределять нужно с коннекшеном.
      protected org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping, DynActionForm form, java.sql.Connection con)
      Акшен метод по-умолчанию, именованные делать по образцу.
      protected org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping, DynActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.sql.Connection con)
      Deprecated.
      protected org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping, DynActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ConnectionSet conSet)
      Deprecated.
      protected org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping, DynActionForm form, ConnectionSet conSet)
      Акшен метод по-умолчанию, именованные делать по образцу.
      protected void updatePersonalization​(DynActionForm form, java.sql.Connection con, java.util.function.Consumer<Preferences> setFunction)
      Stores new values in personalization map and update it if changed.
      • Methods inherited from class org.apache.struts.actions.DispatchAction

        cancelled, execute, getMethod, getMethodName, getParameter
      • Methods inherited from class org.apache.struts.action.Action

        addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mapper

        public static final com.fasterxml.jackson.databind.ObjectMapper mapper
      • log

        protected final Log log
      • setup

        protected Setup setup
    • Constructor Detail

      • BaseAction

        protected BaseAction()
    • Method Detail

      • unspecified

        protected final org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping,
                                                                           org.apache.struts.action.ActionForm form,
                                                                           javax.servlet.http.HttpServletRequest request,
                                                                           javax.servlet.http.HttpServletResponse response)
                                                                    throws java.lang.Exception
        Метод сделан, чтобы не переопределяли его, переопределять нужно с коннекшеном.
        Overrides:
        unspecified in class org.apache.struts.actions.DispatchAction
        Throws:
        java.lang.Exception
      • unspecified

        @Deprecated
        protected org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping,
                                                                     DynActionForm form,
                                                                     javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     java.sql.Connection con)
                                                              throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • unspecified

        protected org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping,
                                                                     DynActionForm form,
                                                                     java.sql.Connection con)
                                                              throws java.lang.Exception
        Акшен метод по-умолчанию, именованные делать по образцу.
        Parameters:
        mapping -
        form -
        con -
        Returns:
        Throws:
        java.lang.Exception
      • unspecified

        @Deprecated
        protected org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping,
                                                                     DynActionForm form,
                                                                     javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     ConnectionSet conSet)
                                                              throws java.lang.Exception
        Deprecated.
        Throws:
        java.lang.Exception
      • unspecified

        protected org.apache.struts.action.ActionForward unspecified​(org.apache.struts.action.ActionMapping mapping,
                                                                     DynActionForm form,
                                                                     ConnectionSet conSet)
                                                              throws java.lang.Exception
        Акшен метод по-умолчанию, именованные делать по образцу.
        Parameters:
        mapping -
        form -
        conSet -
        Returns:
        Throws:
        java.lang.Exception
      • dispatchMethod

        protected org.apache.struts.action.ActionForward dispatchMethod​(org.apache.struts.action.ActionMapping mapping,
                                                                        org.apache.struts.action.ActionForm actionForm,
                                                                        javax.servlet.http.HttpServletRequest request,
                                                                        javax.servlet.http.HttpServletResponse response,
                                                                        java.lang.String name)
                                                                 throws java.lang.Exception
        Overrides:
        dispatchMethod in class org.apache.struts.actions.DispatchAction
        Throws:
        java.lang.Exception
      • data

        protected org.apache.struts.action.ActionForward data​(java.sql.Connection con,
                                                              org.apache.struts.action.ActionMapping mapping,
                                                              DynActionForm form)
        Returns Struts forward with name=form.getAction().
        Parameters:
        con -
        mapping -
        form -
        Returns:
      • data

        protected org.apache.struts.action.ActionForward data​(java.sql.Connection con,
                                                              org.apache.struts.action.ActionMapping mapping,
                                                              DynActionForm form,
                                                              java.lang.String name)
        Returns Struts forward by name.
        Parameters:
        con -
        mapping -
        form -
        name - forward's name.
        Returns:
      • data

        protected org.apache.struts.action.ActionForward data​(ConnectionSet conSet,
                                                              org.apache.struts.action.ActionMapping mapping,
                                                              DynActionForm form)
        Returns Struts forward with name=form.getAction().
        Parameters:
        conSet -
        mapping -
        form -
        Returns:
      • data

        protected org.apache.struts.action.ActionForward data​(ConnectionSet conSet,
                                                              org.apache.struts.action.ActionMapping mapping,
                                                              DynActionForm form,
                                                              java.lang.String name)
        Returns Struts forward by name.
        Parameters:
        con -
        mapping -
        form -
        name - forward's name.
        Returns:
      • processUserTypedForward

        @Deprecated
        protected org.apache.struts.action.ActionForward processUserTypedForward​(java.sql.Connection con,
                                                                                 org.apache.struts.action.ActionMapping mapping,
                                                                                 DynActionForm form,
                                                                                 javax.servlet.http.HttpServletResponse response,
                                                                                 java.lang.String htmlForwardName)
        Deprecated.
      • processUserTypedForward

        @Deprecated
        protected org.apache.struts.action.ActionForward processUserTypedForward​(java.sql.Connection con,
                                                                                 org.apache.struts.action.ActionMapping mapping,
                                                                                 DynActionForm form,
                                                                                 java.lang.String htmlForwardName)
        Deprecated.
      • processUserTypedForward

        @Deprecated
        protected org.apache.struts.action.ActionForward processUserTypedForward​(ConnectionSet conSet,
                                                                                 org.apache.struts.action.ActionMapping mapping,
                                                                                 DynActionForm form,
                                                                                 javax.servlet.http.HttpServletResponse response,
                                                                                 java.lang.String htmlForwardName)
        Deprecated.
      • processUserTypedForward

        @Deprecated
        protected org.apache.struts.action.ActionForward processUserTypedForward​(ConnectionSet conSet,
                                                                                 org.apache.struts.action.ActionMapping mapping,
                                                                                 DynActionForm form,
                                                                                 java.lang.String htmlForwardName)
        Deprecated.
      • status

        protected org.apache.struts.action.ActionForward status​(java.sql.Connection con,
                                                                DynActionForm form)
        Sends response result in JSON format.
        Parameters:
        con -
        form -
        Returns:
      • status

        protected org.apache.struts.action.ActionForward status​(ConnectionSet conSet,
                                                                DynActionForm form)
        Sends response result in JSON format.
        Parameters:
        conSet -
        form -
        Returns:
      • processJsonForward

        @Deprecated
        protected org.apache.struts.action.ActionForward processJsonForward​(ConnectionSet conSet,
                                                                            DynActionForm form)
        Deprecated.
      • processJsonForward

        @Deprecated
        protected org.apache.struts.action.ActionForward processJsonForward​(java.sql.Connection con,
                                                                            DynActionForm form)
        Deprecated.
      • processJsonForward

        @Deprecated
        protected org.apache.struts.action.ActionForward processJsonForward​(java.sql.Connection con,
                                                                            DynActionForm form,
                                                                            javax.servlet.http.HttpServletResponse response)
        Deprecated.
      • processJsonForward

        @Deprecated
        protected org.apache.struts.action.ActionForward processJsonForward​(ConnectionSet conSet,
                                                                            DynActionForm form,
                                                                            javax.servlet.http.HttpServletResponse response)
        Deprecated.
      • getAccess

        protected boolean getAccess​(java.lang.String accessList,
                                    java.lang.String accessItemKey,
                                    int value)
      • restoreRequestParams

        protected void restoreRequestParams​(java.sql.Connection con,
                                            DynActionForm form,
                                            boolean get,
                                            boolean set,
                                            java.lang.String... params)
                                     throws BGException
        Выставляет параметры запроса из сохранённых значений в случае, если они не переданы явно.
        Parameters:
        con -
        form -
        get - восстанавливать
        set - сохранять
        params -
        Throws:
        BGException
      • updatePersonalization

        protected void updatePersonalization​(DynActionForm form,
                                             java.sql.Connection con,
                                             java.util.function.Consumer<Preferences> setFunction)
                                      throws java.lang.Exception
        Stores new values in personalization map and update it if changed.
        Parameters:
        form -
        con -
        setFunction -
        Throws:
        java.lang.Exception