Package jodd.madvoc

Examples of jodd.madvoc.ActionConfig$MethodParam


        }
        allScopeData[j][i] = scopeData[j];
      }
    }

    return new ActionConfig(
        actionClass,
        actionClassMethod,
        filters,
        interceptors,
        actionDef,
View Full Code Here


    super(ScopeType.REQUEST, scopeDataResolver);
    silent = true;
  }

  public void inject(ActionRequest actionRequest) {
    ActionConfig config = actionRequest.getActionConfig();
    ActionConfigSet set = config.getActionConfigSet();

    if (set.actionPathMacros == null) {
      // no action path macros at all, just exit
      return;
    }
View Full Code Here

   * </ul>
   * Returns created {@link ActionConfig}.
   * @see #registerAction(jodd.madvoc.ActionConfig)
   */
  protected ActionConfig registerAction(Class actionClass, Method actionMethod, ActionDef actionDef) {
    ActionConfig actionConfig = actionMethodParser.parse(actionClass, actionMethod, actionDef);
    if (actionConfig == null) {
      return null;
    }
    return registerAction(actionConfig);
  }
View Full Code Here

    // 1st try: the map

    ActionConfigSet actionConfigSet = map.get(actionPath);
    if (actionConfigSet != null) {
      ActionConfig actionConfig = actionConfigSet.lookup(method);
      if (actionConfig != null) {
        return actionConfig;
      }
    }
View Full Code Here

   * Lookups value as an alias and, if not found, as a default alias.
   */
  protected String lookupAlias(String alias) {
    String value = actionsManager.lookupPathAlias(alias);
    if (value == null) {
      ActionConfig cfg = actionsManager.lookup(alias);
      if (cfg != null) {
        value = cfg.actionPath;
      }
    }
    return value;
View Full Code Here

      }
    }

    if (actionResult == null) {
      // + still not found, read @Action value
      ActionConfig actionConfig = actionRequest.getActionConfig();

      Class<? extends ActionResult> actionResultClass = actionConfig.getActionResult();
      if (actionResultClass != null) {
        actionResult = lookupAndRegisterIfMissing(actionResultClass);
      }
    }
View Full Code Here

    when(httpSession.getServletContext()).thenReturn(servletContext);

    MadvocController madvocController = new MadvocController();

    Object action = new Object();
    ActionConfig actionConfig = new ActionConfig(
        Action.class,
        ReflectUtil.findMethod(Action.class, "view"),
        null, null,
        new ActionDef(actionPath, "GET"),
        null, false, null, null);

    return new ActionRequest(madvocController, actionConfig.getActionPath(), actionConfig, action, servletRequest, servletResponse);
  }
View Full Code Here

    webapp.registerMadvocComponents();
    ActionsManager actionsManager = webapp.getComponent(ActionsManager.class);

    actionsManager.register(FooAction.class, "one", new ActionDef("/${one}"));

    ActionConfig actionConfig = actionsManager.lookup("/foo", null);
    assertNotNull(actionConfig);

    actionConfig = actionsManager.lookup("/foo/boo", null);
    assertNull(actionConfig);
    actionConfig = actionsManager.lookup("/foo/boo/zoo", null);
View Full Code Here

    ActionsManager actionsManager = webapp.getComponent(ActionsManager.class);

    actionsManager.register(FooAction.class, "one", new ActionDef("/${one}"));
    actionsManager.register(FooAction.class, "two", new ActionDef("/xxx-${two}"));

    ActionConfig actionConfig = actionsManager.lookup("/foo", null);
    assertEquals("one", actionConfig.actionClassMethod.getName());

    actionConfig = actionsManager.lookup("/foo/boo", null);
    assertNull(actionConfig);
View Full Code Here

    actionsManager.register(FooAction.class, "one", new ActionDef("/yyy-${one}"));
    actionsManager.register(FooAction.class, "two", new ActionDef("/xxx-${two}"));

    assertEquals(2, actionsManager.getActionsCount());

    ActionConfig actionConfig = actionsManager.lookup("/foo", null);
    assertNull(actionConfig);

    actionConfig = actionsManager.lookup("/yyy-111", null);
    assertEquals("one", actionConfig.actionClassMethod.getName());
View Full Code Here

TOP

Related Classes of jodd.madvoc.ActionConfig$MethodParam

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.