@Test public void getController_shouldGetAControllerFromTheSpecifiedProvider() throws Exception { Assert.assertNotNull(factory.getController(new FragmentRequest("somemodule", "somefragment"))); Assert.assertNull(factory.getController(new FragmentRequest("somemodule", "otherfragment"))); Assert.assertNull(factory.getController(new FragmentRequest("othermodule", "somefragment"))); }
public Object getController(String providerName, String fragmentName) { FragmentRequest request = new FragmentRequest(providerName, fragmentName); return getController(request); }
FragmentFactory { public Object getController(String providerName, String fragmentName) { FragmentRequest request = new FragmentRequest(providerName, fragmentName); return getController(request); } }
FragmentFactory { public Object getController(String providerName, String fragmentName) { FragmentRequest request = new FragmentRequest(providerName, fragmentName); return getController(request); } FragmentFactory(); }
FragmentFactory { public Object getController(String providerName, String fragmentName) { FragmentRequest request = new FragmentRequest(providerName, fragmentName); return getController(request); } FragmentFactory(); String process(FragmentContext context); Object getController(String providerName, String fragmentName); boolean isDevelopmentMode(); void setDevelopmentMode(boolean developmentMode); Map<String, FragmentControllerProvider> getControllerProviders(); void setControllerProviders(Map<String, FragmentControllerProvider> newControllerProviders); void setAdditionalControllerProviders(Map<String, FragmentControllerProvider> additional); void addControllerProvider(String key, FragmentControllerProvider provider); Map<String, FragmentViewProvider> getViewProviders(); void setViewProviders(Map<String, FragmentViewProvider> newViewProviders); void setAdditionalViewProviders(Map<String, FragmentViewProvider> additional); void addViewProvider(String key, FragmentViewProvider provider); Object invokeFragmentAction(String providerName, String fragmentName, String action, HttpServletRequest httpRequest, HttpServletResponse httpServletResponse); boolean fragmentExists(String providerName, String fragmentName); T convert(Object obs, Class<T> toType); Map<String, T> getSpringBeansOfType(Class<T> ofType); MessageSource getMessageSource(); ExtensionManager getExtensionManager(); ConversionService getConversionService(); FormatterService getFormatterService(); ServletContext getServletContext(); List<FragmentModelConfigurator> getModelConfigurators(); void setModelConfigurators(List<FragmentModelConfigurator> modelConfigurators); void setPossibleFragmentControllerArgumentProviders(List<PossibleFragmentControllerArgumentProvider> possibleFragmentControllerArgumentProviders); void setPossibleFragmentActionArgumentProviders(List<PossibleFragmentActionArgumentProvider> possibleFragmentActionArgumentProviders); void setSessionFactory(SessionFactory sessionFactory); List<FragmentRequestMapper> getRequestMappers(); void setRequestMappers(List<FragmentRequestMapper> requestMappers); }
FragmentFactory { public Object getController(String providerName, String fragmentName) { FragmentRequest request = new FragmentRequest(providerName, fragmentName); return getController(request); } FragmentFactory(); String process(FragmentContext context); Object getController(String providerName, String fragmentName); boolean isDevelopmentMode(); void setDevelopmentMode(boolean developmentMode); Map<String, FragmentControllerProvider> getControllerProviders(); void setControllerProviders(Map<String, FragmentControllerProvider> newControllerProviders); void setAdditionalControllerProviders(Map<String, FragmentControllerProvider> additional); void addControllerProvider(String key, FragmentControllerProvider provider); Map<String, FragmentViewProvider> getViewProviders(); void setViewProviders(Map<String, FragmentViewProvider> newViewProviders); void setAdditionalViewProviders(Map<String, FragmentViewProvider> additional); void addViewProvider(String key, FragmentViewProvider provider); Object invokeFragmentAction(String providerName, String fragmentName, String action, HttpServletRequest httpRequest, HttpServletResponse httpServletResponse); boolean fragmentExists(String providerName, String fragmentName); T convert(Object obs, Class<T> toType); Map<String, T> getSpringBeansOfType(Class<T> ofType); MessageSource getMessageSource(); ExtensionManager getExtensionManager(); ConversionService getConversionService(); FormatterService getFormatterService(); ServletContext getServletContext(); List<FragmentModelConfigurator> getModelConfigurators(); void setModelConfigurators(List<FragmentModelConfigurator> modelConfigurators); void setPossibleFragmentControllerArgumentProviders(List<PossibleFragmentControllerArgumentProvider> possibleFragmentControllerArgumentProviders); void setPossibleFragmentActionArgumentProviders(List<PossibleFragmentActionArgumentProvider> possibleFragmentActionArgumentProviders); void setSessionFactory(SessionFactory sessionFactory); List<FragmentRequestMapper> getRequestMappers(); void setRequestMappers(List<FragmentRequestMapper> requestMappers);  }