Package jodd.madvoc.component

Examples of jodd.madvoc.component.ActionMethodParser


    ActionsManager actionsManager = webapp.getComponent(ActionsManager.class);
    actionsManager.register(BooAction.class, "foo2");
    actionsManager.registerPathAlias("/boo.foo2.xxx", "/aliased");

    ResultMapper resultMapper = webapp.getComponent(ResultMapper.class);
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);

    ActionConfig cfg = parse(actionMethodParser, "tst.BooAction#foo2");
    String path = cfg.getActionPath();

    String resultPath = resultMapper.resolveResultPathString(path, null);
View Full Code Here


  @Test
  public void testDefaultMethods() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);

    ActionConfig cfg = parse(actionMethodParser, "tst.BooAction#foo");
    assertEquals("/boo.foo.html", cfg.actionPath);

    cfg = parse(actionMethodParser, "tst.BooAction#view");
View Full Code Here

  @Test
  public void testMethod() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);

    ActionConfig cfg = parse(actionMethodParser, "tst.BooAction#foo");
    assertNotNull(cfg);
    assertEquals(BooAction.class, cfg.actionClass);
    assertEquals("/boo.foo.html", cfg.actionPath);
View Full Code Here

  @Test
  public void testMethodWithPackage() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);
    MadvocConfig madvocConfig = webapp.getComponent(MadvocConfig.class);
    madvocConfig.getRootPackages().addRootPackageOf(this.getClass());

    ActionConfig cfg = parse(actionMethodParser, "tst.BooAction#foo");
    assertNotNull(cfg);
View Full Code Here

  @Test
  public void testClasses() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);

    ActionConfig cfg = parse(actionMethodParser, "tst.Boo1Action#foo");
    assertNotNull(cfg);
    assertEquals(Boo1Action.class, cfg.actionClass);
    assertEquals("/boo1.foo.html", cfg.actionPath);
View Full Code Here

  @Test
  public void testClassesWithPackage() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);
    MadvocConfig madvocConfig = webapp.getComponent(MadvocConfig.class);
    madvocConfig.getRootPackages().addRootPackageOf(this.getClass());

    ActionConfig cfg = parse(actionMethodParser, "tst.Boo1Action#foo");
    assertNotNull(cfg);
View Full Code Here

  @Test
  public void testClassesWithoutPackage() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);
    MadvocConfig madvocConfig = webapp.getComponent(MadvocConfig.class);
    madvocConfig.getRootPackages().addRootPackageOf(this.getClass());

    ActionConfig cfg = parse(actionMethodParser, "tst.Boo3Action#foo");
    assertNotNull(cfg);
View Full Code Here

  @Test
  public void testPackage() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);
    MadvocConfig madvocConfig = webapp.getComponent(MadvocConfig.class);
    madvocConfig.getRootPackages().addRootPackageOf(this.getClass());

    ActionConfig cfg = parse(actionMethodParser, "tst2.Boo4Action#foo");
    assertNotNull(cfg);
View Full Code Here

  @Test
  public void testNoPackage() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);
    MadvocConfig madvocConfig = webapp.getComponent(MadvocConfig.class);
    madvocConfig.getRootPackages().addRootPackageOf(this.getClass());

    ActionConfig cfg = parse(actionMethodParser, "tst2.Boo5Action#foo");
    assertNotNull(cfg);
View Full Code Here

  @Test
  public void testEndSlashClassName() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionMethodParser actionMethodParser = webapp.getComponent(ActionMethodParser.class);
    MadvocConfig madvocConfig = webapp.getComponent(MadvocConfig.class);
    madvocConfig.getRootPackages().addRootPackageOf(this.getClass());

    ActionConfig cfg = parse(actionMethodParser, "tst2.ReAction#hello");
    assertNotNull(cfg);
View Full Code Here

TOP

Related Classes of jodd.madvoc.component.ActionMethodParser

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.