Package org.strecks.navigate

Examples of org.strecks.navigate.NavigationHandlerFactory


  private SpringViewNavigationHandler getAndTestHandler(Class clazz)
  {
    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


      throw new ApplicationConfigurationException("Method " + containingMethod.getName() + "() in class "
          + containingMethod.getDeclaringClass().getName() + " must return object of type "
          + ModelAndView.class.getName());
    }

    NavigationHandlerFactory factoryInstance = new IdentityNavigationHandlerFactory(springViewNavigationHandler);
    return new NavigationHandlerInfo(factoryInstance, containingMethod);
  }
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

    NavigateForward navigate = (NavigateForward) annotation;
    Class factory = navigate.handler();

    if (NavigationHandlerFactory.class.isAssignableFrom(factory))
    {
      NavigationHandlerFactory factoryInstance = ReflectHelper.createInstance(factory,
          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
    {
      throw new ApplicationConfigurationException(actionClass.getName() + ", method "
View Full Code Here

TOP

Related Classes of org.strecks.navigate.NavigationHandlerFactory

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.