クラス CodeListInterceptor

java.lang.Object
org.terasoluna.gfw.web.codelist.CodeListInterceptor
すべての実装されたインタフェース:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.servlet.HandlerInterceptor

public class CodeListInterceptor extends Object implements org.springframework.web.servlet.HandlerInterceptor, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Interceptor class for setting codelist in attribute of HttpServletRequest

Default behavior is to set all the implementation beans of CodeList in the attribute of HttpServletRequest
In order to narrow down the target beans, pass the pattern (regular expression) corresponding to codelist ID of target beans
to setCodeListIdPattern(Pattern) method.

Note: Locale resolution is implemented in I18nCodeList.

関連項目:
  • コンストラクタの概要

    コンストラクタ
    コンストラクタ
    説明
     
  • メソッドの概要

    修飾子とタイプ
    メソッド
    説明
    void
    Extracts the CodeLists which are to be set to the attribute of HttpServletRequest
    protected Collection<CodeList>
    Returns the list of codelists which are to be set to attribute of HttpServletRequest
    void
    postHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView)
    Sets codelist to the attribute of HttpServletRequest
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
    Set the ApplicationContext.
    void
    setCodeListIdPattern(Pattern codeListIdPattern)
    Sets Pattern (regular expression) of Codelist IDs (Bean IDs) of codelists which are target to be set to attribute of HttpServletRequest.

    クラスから継承されたメソッド java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    インタフェースから継承されたメソッド org.springframework.web.servlet.HandlerInterceptor

    afterCompletion, preHandle
  • コンストラクタの詳細

    • CodeListInterceptor

      public CodeListInterceptor()
  • メソッドの詳細

    • postHandle

      public void postHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) throws Exception
      Sets codelist to the attribute of HttpServletRequest

      Sets codelist to the attribute of HttpServletRequest after the execution of Controller.

      定義:
      postHandle インタフェース内 org.springframework.web.servlet.HandlerInterceptor
      例外:
      Exception
      導入されたバージョン:
      5.4.2
      関連項目:
      • org.springframework.web.servlet.handler.HandlerInterceptorAdapter#postHandle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, org.springframework.web.servlet.ModelAndView)
    • afterPropertiesSet

      public void afterPropertiesSet()
      Extracts the CodeLists which are to be set to the attribute of HttpServletRequest

      Among the Beans which implement CodeList interface, extract the Codelist IDs(Bean IDs) which match
      with the regular expression specified in codeListIdPattern.

      定義:
      afterPropertiesSet インタフェース内 org.springframework.beans.factory.InitializingBean
      関連項目:
      • InitializingBean.afterPropertiesSet()
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Set the ApplicationContext.
      定義:
      setApplicationContext インタフェース内 org.springframework.context.ApplicationContextAware
      関連項目:
      • ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
    • setCodeListIdPattern

      public void setCodeListIdPattern(Pattern codeListIdPattern)
      Sets Pattern (regular expression) of Codelist IDs (Bean IDs) of codelists which are target to be set to attribute of HttpServletRequest.

      Default behavior is to include all beans

      パラメータ:
      codeListIdPattern - Pattern
    • getCodeLists

      protected Collection<CodeList> getCodeLists()
      Returns the list of codelists which are to be set to attribute of HttpServletRequest
      戻り値:
      list of codelists