Class BaseAction

java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.BaseAction
org.apache.struts.actions.DispatchAction
ru.bgcrm.struts.action.BaseAction
Direct Known Subclasses:
ActionBalance, ActionLogAction, AppAction, BackupAction, BaseAction, BaseAction, BoardAction, BoardAction, ChannelAction, CleanupAction, ConfigAction, ConfigAction, CredentialAction, CustomAction, CustomerAction, CustomerAction, CustomerAction, DatabaseAction, DirectoryAction, DirectoryAddressAction, DispatchAction, DispatchAction, DocumentAction, DynamicAction, EMailAction, EmptyAction, FileAction, GitAction, GroupLoadAction, HelpDeskAction, InvoiceAction, LinkAction, LockAction, LogAction, LoginAction, MessageAction, MessageAction, MessageCallAction, NewsAction, ParameterAction, PhoneAction, PoolAction, ProcessAction, ProcessAction, ProcessAction, ProcessQueueAction, ProfileAction, ProfileAction, ReportAction, ReportActionBase, RunAction, SearchAction, SearchAction, SubscriptionAction, TaskAction, TestAction, TestAction, UserAction, UserAction, UserAction, WorkAction

public class BaseAction extends org.apache.struts.actions.DispatchAction
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final String
     
    protected Localizer
     
    protected final Log
     
    static final com.fasterxml.jackson.databind.ObjectMapper
     
    protected static final String
     
    static final String
     
    static final String
     
    static final String
     
    protected final 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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    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, String name)
     
    protected boolean
    getAccess(String accessList, String accessItemKey, int value)
     
    protected org.apache.struts.action.ActionForward
    html(Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form)
    Deprecated.
    protected org.apache.struts.action.ActionForward
    html(Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form, String name)
    Deprecated.
    protected org.apache.struts.action.ActionForward
    html(Connection con, DynActionForm form, String path)
    JSP forward file path.
    protected org.apache.struts.action.ActionForward
    html(Connection con, DynActionForm form, Map<String,String> mapping)
    JSP forward file path calculated using getForwardJspPath(DynActionForm, Map) function.
    protected org.apache.struts.action.ActionForward
    html(ConnectionSet conSet, org.apache.struts.action.ActionMapping mapping, DynActionForm form)
    Deprecated.
    protected org.apache.struts.action.ActionForward
    html(ConnectionSet conSet, org.apache.struts.action.ActionMapping mapping, DynActionForm form, String name)
    Deprecated.
    protected org.apache.struts.action.ActionForward
    html(ConnectionSet conSet, DynActionForm form, String path)
    JSP forward file path.
    protected org.apache.struts.action.ActionForward
    Sends response result in JSON format.
    protected org.apache.struts.action.ActionForward
    Sends response result in JSON format.
    protected org.apache.struts.action.ActionForward
    Deprecated.
    protected org.apache.struts.action.ActionForward
    processJsonForward(Connection con, DynActionForm form, javax.servlet.http.HttpServletResponse response)
    Deprecated.
    protected org.apache.struts.action.ActionForward
    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(Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form, String htmlForwardName)
    Deprecated.
    protected org.apache.struts.action.ActionForward
    processUserTypedForward(Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form, javax.servlet.http.HttpServletResponse response, String htmlForwardName)
    Deprecated.
    protected org.apache.struts.action.ActionForward
    processUserTypedForward(ConnectionSet conSet, org.apache.struts.action.ActionMapping mapping, DynActionForm form, 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, String htmlForwardName)
    Deprecated.
    protected void
    restoreRequestParams(Connection con, DynActionForm form, boolean get, boolean set, String... params)
    Saves and restores HTTP request parameters.
    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)
    Standard Struts method, shouldn't be used.
    protected org.apache.struts.action.ActionForward
    unspecified(org.apache.struts.action.ActionMapping mapping, DynActionForm form, 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, 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)
    Deprecated.
    org.apache.struts.action.ActionForward
    Default action method if no parameter 'action' passed.
    org.apache.struts.action.ActionForward
    Default action method if no parameter 'action' passed.
    protected void
    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 Details

  • Constructor Details

    • BaseAction

      protected BaseAction()
  • Method Details

    • 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 Exception
      Standard Struts method, shouldn't be used.
      Overrides:
      unspecified in class org.apache.struts.actions.DispatchAction
      Throws:
      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, Connection con) throws Exception
      Deprecated.
      Throws:
      Exception
    • unspecified

      @Deprecated protected org.apache.struts.action.ActionForward unspecified(org.apache.struts.action.ActionMapping mapping, DynActionForm form, Connection con) throws Exception
      Deprecated.
      Throws:
      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 Exception
      Deprecated.
      Throws:
      Exception
    • unspecified

      @Deprecated protected org.apache.struts.action.ActionForward unspecified(org.apache.struts.action.ActionMapping mapping, DynActionForm form, ConnectionSet conSet) throws Exception
      Deprecated.
      Throws:
      Exception
    • unspecified

      public org.apache.struts.action.ActionForward unspecified(DynActionForm form, ConnectionSet conSet) throws Exception
      Default action method if no parameter 'action' passed. Overwrite and implement.
      Parameters:
      form -
      conSet -
      Returns:
      Throws:
      Exception
    • unspecified

      public org.apache.struts.action.ActionForward unspecified(DynActionForm form, Connection con) throws Exception
      Default action method if no parameter 'action' passed. Overwrite and implement.
      Parameters:
      form -
      con -
      Returns:
      Throws:
      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, String name) throws Exception
      Overrides:
      dispatchMethod in class org.apache.struts.actions.DispatchAction
      Throws:
      Exception
    • html

      protected org.apache.struts.action.ActionForward html(Connection con, DynActionForm form, Map<String,String> mapping)
      JSP forward file path calculated using getForwardJspPath(DynActionForm, Map) function.
      Parameters:
      con -
      form -
      mapping -
      Returns:
    • html

      protected org.apache.struts.action.ActionForward html(Connection con, DynActionForm form, String path)
      JSP forward file path.
      Parameters:
      con -
      form - must be 'null' for open interface.
      path - JSP path.
      Returns:
    • html

      protected org.apache.struts.action.ActionForward html(ConnectionSet conSet, DynActionForm form, String path)
      JSP forward file path.
      Parameters:
      conSet -
      form -
      path - JSP path.
      Returns:
    • html

      @Deprecated protected org.apache.struts.action.ActionForward html(Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form)
      Deprecated.
      Use html(Connection, DynActionForm, String). Returns Struts forward with name=form.getAction().
      Parameters:
      con -
      mapping -
      form -
      Returns:
    • html

      @Deprecated protected org.apache.struts.action.ActionForward html(Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form, String name)
      Deprecated.
      Use html(Connection, DynActionForm, String). Returns Struts forward by name.
      Parameters:
      con -
      mapping -
      form -
      name - forward's name.
      Returns:
    • html

      @Deprecated protected org.apache.struts.action.ActionForward html(ConnectionSet conSet, org.apache.struts.action.ActionMapping mapping, DynActionForm form)
      Deprecated.
      Use html(ConnectionSet, DynActionForm, String). Returns Struts forward with name=form.getAction().
      Parameters:
      conSet -
      mapping -
      form -
      Returns:
    • html

      @Deprecated protected org.apache.struts.action.ActionForward html(ConnectionSet conSet, org.apache.struts.action.ActionMapping mapping, DynActionForm form, String name)
      Deprecated.
      Use html(ConnectionSet, DynActionForm, String). Returns Struts forward by name.
      Parameters:
      conSet -
      mapping -
      form -
      name - forward's name.
      Returns:
    • processUserTypedForward

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

      @Deprecated protected org.apache.struts.action.ActionForward processUserTypedForward(Connection con, org.apache.struts.action.ActionMapping mapping, DynActionForm form, 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, String htmlForwardName)
      Deprecated.
    • processUserTypedForward

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

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

      protected org.apache.struts.action.ActionForward json(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(Connection con, DynActionForm form)
      Deprecated.
    • processJsonForward

      @Deprecated protected org.apache.struts.action.ActionForward processJsonForward(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(String accessList, String accessItemKey, int value)
    • checkModified

      protected void checkModified(LastModify lastModify, DynActionForm form) throws BGException
      Throws:
      BGException
    • restoreRequestParams

      protected void restoreRequestParams(Connection con, DynActionForm form, boolean get, boolean set, String... params) throws BGException
      Saves and restores HTTP request parameters. As storage used User.getPersonalizationMap(), key is 'param.' + digest from DynActionForm.getAreaId().
      Parameters:
      con -
      form - there params are taken and restored, also contains 'areaId' param.
      get - restore
      set - saves
      params - parameter names
      Throws:
      BGException
    • updatePersonalization

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