Package org.strecks.navigate

Examples of org.strecks.navigate.NavigationHandler


  }

  @Test
  public void testString()
  {
    NavigationHandler navigationHandler = factory.getNavigationHandler("beanClass", String.class);
    assert navigationHandler instanceof MappingNavigationHandler;
  }
View Full Code Here


  }

  @Test
  public void testActionForward()
  {
    NavigationHandler navigationHandler = factory.getNavigationHandler("beanClass", ActionForward.class);
    assert navigationHandler instanceof ActionForwardNavigationHandler;
  }
View Full Code Here

  }

  @Test
  public void testPageClass()
  {
    NavigationHandler navigationHandler = factory.getNavigationHandler("beanClass", Page.class);
    assert navigationHandler instanceof PageNavigationHandler;
  }
View Full Code Here

  }

  @Test
  public void testViewAdapter()
  {
    NavigationHandler navigationHandler = factory.getNavigationHandler("beanClass", ViewAdapter.class);
    assert navigationHandler instanceof ViewAdapterNavigationHandler;
  }
View Full Code Here

  public void testGetNavigationHandler() throws SecurityException, NoSuchMethodException
  {
    NavigationHandlerInfo info = new NavigationHandlerInfo(new DefaultNavigationHandlerFactory(),
        ActionWithNavigate.class.getMethod("nextPage"));

    NavigationHandler navigationHandler = navigationReader.getNavigationHandler(ActionWithNavigate.class, info);
    assert navigationHandler instanceof PageNavigationHandler;
  }
View Full Code Here

    navigationReader.readAnnotations(clazz);
    NavigationHolder navigationHolder = navigationReader.getNavigationHolder();
    NavigationHandlerFactory factory = navigationHolder.getFactory();
    assert factory instanceof IdentityNavigationHandlerFactory;
   
    NavigationHandler navigationHandler = factory.getNavigationHandler(null,null);
    assert navigationHandler instanceof SpringViewNavigationHandler;
   
    SpringViewNavigationHandler h = (SpringViewNavigationHandler) navigationHandler;
    return h;
  }
View Full Code Here

    NavigationHandlerInfo navigationInfo = readNavigationHandlerFactory(actionBeanClass);

    if (navigationInfo != null)
    {
      NavigationHandler navigationHandler = getNavigationHandler(actionBeanClass, navigationInfo);

      checkTypes(navigationHandler.getClass(), navigationInfo.getMethod());

      navigationHolder = new NavigationHolder(navigationHandler, navigationInfo.getFactory(), navigationInfo
          .getMethod());

      return true;
View Full Code Here

  NavigationHandler getNavigationHandler(Class actionClass, NavigationHandlerInfo info)
  {
    NavigationHandlerFactory factory = info.getFactory();
    Class type = info.getMethod().getReturnType();

    NavigationHandler navigationHandler = factory.getNavigationHandler(actionClass.getName(), type);

    // make sure that navigationHandler is not null
    Assert.notNull(navigationHandler);
    return navigationHandler;
  }
View Full Code Here

          NavigationHandlerFactory.class);
      return new NavigationHandlerInfo(factoryInstance, containingMethod);
    }
    else if (NavigationHandler.class.isAssignableFrom(factory))
    {
      NavigationHandler handler = ReflectHelper.createInstance(factory, NavigationHandler.class);
      NavigationHandlerFactory factoryInstance = new IdentityNavigationHandlerFactory(handler);
      return new NavigationHandlerInfo(factoryInstance, containingMethod);
    }
    else
    {
View Full Code Here

TOP

Related Classes of org.strecks.navigate.NavigationHandler

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.