クラス 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 theCodeList
s which are to be set to the attribute ofHttpServletRequest
protected Collection<CodeList>
Returns the list of codelists which are to be set to attribute ofHttpServletRequest
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 ofHttpServletRequest
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 ofHttpServletRequest
.クラスから継承されたメソッド 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 ofHttpServletRequest
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 theCodeList
s which are to be set to the attribute ofHttpServletRequest
Among the Beans which implement
CodeList
interface, extract the Codelist IDs(Bean IDs) which match
with the regular expression specified incodeListIdPattern
.- 定義:
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
Sets Pattern (regular expression) of Codelist IDs (Bean IDs) of codelists which are target to be set to attribute ofHttpServletRequest
.Default behavior is to include all beans
- パラメータ:
codeListIdPattern
- Pattern
-
getCodeLists
Returns the list of codelists which are to be set to attribute ofHttpServletRequest
- 戻り値:
- list of codelists
-