Search in sources :

Example 1 with CoupleKey

use of org.jessma.util.CoupleKey in project JessMA by ldcsaa.

the class GuiceInjectFilter method doFilter.

@Override
public String doFilter(ActionExecutor executor) throws Exception {
    Action action = executor.getAction();
    Method method = executor.getEntryMethod();
    CoupleKey<Class<?>, Method> key = new CoupleKey<Class<?>, Method>(action.getClass(), method);
    checkGuiceMap(executor, action, key);
    tryInject(action, key);
    return executor.invoke();
}
Also used : Action(org.jessma.mvc.Action) Method(java.lang.reflect.Method) CoupleKey(org.jessma.util.CoupleKey)

Example 2 with CoupleKey

use of org.jessma.util.CoupleKey in project JessMA by ldcsaa.

the class SpringInjectFilter method doFilter.

@Override
public String doFilter(ActionExecutor executor) throws Exception {
    Action action = executor.getAction();
    Method method = executor.getEntryMethod();
    CoupleKey<Class<?>, Method> key = new CoupleKey<Class<?>, Method>(action.getClass(), method);
    checkSpringMap(executor, action, key);
    tryInject(action, key);
    return executor.invoke();
}
Also used : Action(org.jessma.mvc.Action) Method(java.lang.reflect.Method) CoupleKey(org.jessma.util.CoupleKey)

Example 3 with CoupleKey

use of org.jessma.util.CoupleKey in project JessMA by ldcsaa.

the class SpringInjectFilter method init.

@Override
public void init() {
    servletContext = HttpHelper.getServletContext();
    springMap = new HashMap<CoupleKey<Class<?>, Method>, SpringAttr[]>();
    context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
    if (context == null) {
        listener = new ContextLoaderListener();
        listener.contextInitialized(new ServletContextEvent(servletContext));
        context = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
    }
}
Also used : ContextLoaderListener(org.springframework.web.context.ContextLoaderListener) CoupleKey(org.jessma.util.CoupleKey) ServletContextEvent(javax.servlet.ServletContextEvent)

Example 4 with CoupleKey

use of org.jessma.util.CoupleKey in project JessMA by ldcsaa.

the class DaoInjectFilter method doFilter.

@Override
public String doFilter(ActionExecutor executor) throws Exception {
    Action action = executor.getAction();
    Method method = executor.getEntryMethod();
    CoupleKey<Class<?>, Method> key = new CoupleKey<Class<?>, Method>(action.getClass(), method);
    checkDaoMap(executor, action, key);
    tryInject(action, key);
    return executor.invoke();
}
Also used : Action(org.jessma.mvc.Action) Method(java.lang.reflect.Method) CoupleKey(org.jessma.util.CoupleKey)

Aggregations

CoupleKey (org.jessma.util.CoupleKey)4 Method (java.lang.reflect.Method)3 Action (org.jessma.mvc.Action)3 ServletContextEvent (javax.servlet.ServletContextEvent)1 ContextLoaderListener (org.springframework.web.context.ContextLoaderListener)1