本文整理汇总了Java中org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver.getViewConfigDescriptor方法的典型用法代码示例。如果您正苦于以下问题:Java ViewConfigResolver.getViewConfigDescriptor方法的具体用法?Java ViewConfigResolver.getViewConfigDescriptor怎么用?Java ViewConfigResolver.getViewConfigDescriptor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver
的用法示例。
在下文中一共展示了ViewConfigResolver.getViewConfigDescriptor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSimpleViewConfigWithExplicitPageMetaData
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testSimpleViewConfigWithExplicitPageMetaData()
{
this.viewConfigExtension.addPageDefinition(SimplePageConfig002.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(SimplePageConfig002.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertEquals("/simplePageConfig002.xhtml", viewConfigDescriptor.getViewId());
Assert.assertEquals(SimplePageConfig002.class, viewConfigDescriptor.getConfigClass());
Assert.assertNotNull(viewConfigDescriptor.getMetaData());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData().size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(View.class).size());
}
示例2: testSimpleViewConfigWithOptionalPageMetaData
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testSimpleViewConfigWithOptionalPageMetaData()
{
this.viewConfigExtension.addPageDefinition(SimplePageConfig001.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(SimplePageConfig001.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertEquals("/simplePageConfig001.xhtml", viewConfigDescriptor.getViewId());
Assert.assertEquals(SimplePageConfig001.class, viewConfigDescriptor.getConfigClass());
Assert.assertNotNull(viewConfigDescriptor.getMetaData());
//@View gets added autom. if it isn't provided in-/directly
Assert.assertEquals(1, viewConfigDescriptor.getMetaData().size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(View.class).size());
}
示例3: testSimpleViewConfigWithViewControllerCallback
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testSimpleViewConfigWithViewControllerCallback()
{
this.viewConfigExtension.addPageDefinition(SimplePageConfig.class);
this.viewConfigExtension.addIndirectlyInheritedMetaData(PageBean003.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(SimplePageConfig.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertNotNull(viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, InitView.class));
Assert.assertNotNull(viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PreViewAction.class));
Assert.assertNotNull(viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PreRenderView.class));
Assert.assertNull(viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PostRenderView.class));
Assert.assertEquals(PageBean003.class, viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, InitView.class).getCallbackMethods().keySet().iterator().next());
Assert.assertEquals("callbackMethod1", ((List<Method>) viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, InitView.class).getCallbackMethods().values().iterator().next()).iterator().next().getName());
Assert.assertEquals(PageBean003.class, viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PreViewAction.class).getCallbackMethods().keySet().iterator().next());
Assert.assertEquals("callbackMethod1", ((List<Method>) viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PreViewAction.class).getCallbackMethods().values().iterator().next()).iterator().next().getName());
Assert.assertEquals(PageBean003.class, viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PreRenderView.class).getCallbackMethods().keySet().iterator().next());
Assert.assertEquals("callbackMethod2", ((List<Method>) viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PreRenderView.class).getCallbackMethods().values().iterator().next()).iterator().next().getName());
}
示例4: testViewConfigWithStereotypeMetaData
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testViewConfigWithStereotypeMetaData()
{
this.viewConfigExtension.addPageDefinition(Pages.Home.class);
this.viewConfigExtension.addPageDefinition(Pages.Public.Index.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Home.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertNotNull(viewConfigDescriptor.getMetaData());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData().size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(View.class).size());
Assert.assertEquals(View.NavigationMode.REDIRECT, viewConfigDescriptor.getMetaData(View.class).iterator().next().navigation());
Assert.assertEquals(View.ViewParameterMode.INCLUDE, viewConfigDescriptor.getMetaData(View.class).iterator().next().viewParams());
viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Public.Index.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertNotNull(viewConfigDescriptor.getMetaData());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData().size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(View.class).size());
Assert.assertEquals(View.NavigationMode.REDIRECT, viewConfigDescriptor.getMetaData(View.class).iterator().next().navigation());
Assert.assertEquals(View.ViewParameterMode.EXCLUDE, viewConfigDescriptor.getMetaData(View.class).iterator().next().viewParams());
}
示例5: testSimpleViewConfigWithCustomMetaData
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testSimpleViewConfigWithCustomMetaData()
{
this.viewConfigExtension.addPageDefinition(SimplePageConfig.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(SimplePageConfig.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertNotNull(viewConfigDescriptor.getMetaData());
Assert.assertEquals(2, viewConfigDescriptor.getMetaData().size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(View.class).size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(TestEntryPoint.class).size());
}
示例6: testViewConfigWithStereotypeMetaData
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testViewConfigWithStereotypeMetaData()
{
this.viewConfigExtension.addPageDefinition(Pages.Home.class);
this.viewConfigExtension.addPageDefinition(Pages.Public.Index.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Home.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertNotNull(viewConfigDescriptor.getMetaData());
Assert.assertEquals(2, viewConfigDescriptor.getMetaData().size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(View.class).size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(MyView.class).size());
Assert.assertEquals(View.NavigationMode.REDIRECT, viewConfigDescriptor.getMetaData(View.class).iterator().next().navigation());
Assert.assertEquals(View.ViewParameterMode.INCLUDE, viewConfigDescriptor.getMetaData(View.class).iterator().next().viewParams());
Assert.assertEquals("landing page", viewConfigDescriptor.getMetaData(MyView.class).iterator().next().description());
viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Public.Index.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertNotNull(viewConfigDescriptor.getMetaData());
Assert.assertEquals(2, viewConfigDescriptor.getMetaData().size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(View.class).size());
Assert.assertEquals(1, viewConfigDescriptor.getMetaData(MyView.class).size());
Assert.assertEquals(View.NavigationMode.REDIRECT, viewConfigDescriptor.getMetaData(View.class).iterator().next().navigation());
Assert.assertEquals(View.ViewParameterMode.EXCLUDE, viewConfigDescriptor.getMetaData(View.class).iterator().next().viewParams());
Assert.assertEquals("public content", viewConfigDescriptor.getMetaData(MyView.class).iterator().next().description());
}
示例7: testViewConfigCustomViewConfigPreProcessor
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testViewConfigCustomViewConfigPreProcessor()
{
this.viewConfigExtension.addPageDefinition(Pages.Public.Index.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Public.Index.class);
//changed by TestConfigPreProcessor
Assert.assertEquals("/test/view.custom", viewConfigDescriptor.getViewId());
Assert.assertEquals(View.ViewParameterMode.DEFAULT, viewConfigDescriptor.getMetaData(View.class).iterator().next().viewParams());
}
示例8: testViewConfigWithRandomOrder
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testViewConfigWithRandomOrder()
{
this.viewConfigExtension.addPageDefinition(Pages.Index.class);
this.viewConfigExtension.addPageDefinition(Pages.class); //simulates random processing-order
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Index.class);
Assert.assertEquals("/pages/index.xhtml", viewConfigDescriptor.getViewId());
Assert.assertEquals(View.ViewParameterMode.EXCLUDE, viewConfigDescriptor.getMetaData(View.class).iterator().next().viewParams());
}
示例9: testNamesWizard5
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testNamesWizard5()
{
this.viewConfigExtension.addPageDefinition(Pages.Wizard5.Step1.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor;
viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard5.Step1.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertEquals("/pages/wizard5/step1.xhtml", viewConfigDescriptor.getViewId());
}
示例10: testSimpleViewConfigWithViewControllerCallback
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testSimpleViewConfigWithViewControllerCallback()
{
this.viewConfigExtension.addPageDefinition(SimplePageConfig.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(SimplePageConfig.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertNotNull(viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PostRenderView.class));
Assert.assertEquals(PageBean002.class, viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PostRenderView.class).getCallbackMethods().keySet().iterator().next());
Assert.assertEquals("postRenderViewCallbackMethod", ((List<Method>) viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PostRenderView.class).getCallbackMethods().values().iterator().next()).iterator().next().getName());
}
示例11: testNamesWizard7
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testNamesWizard7()
{
this.viewConfigExtension.addPageDefinition(Pages.Wizard7.Step1.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor;
viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard7.Step1.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertEquals("/pages/wizard7/step1.xhtml", viewConfigDescriptor.getViewId());
}
示例12: testNamesWizard8
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testNamesWizard8()
{
this.viewConfigExtension.addPageDefinition(Pages.Wizard8.Step1.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor;
viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard8.Step1.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertEquals("/pages/w8/step1.xhtml", viewConfigDescriptor.getViewId());
}
示例13: testNamesWizard9
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testNamesWizard9()
{
this.viewConfigExtension.addPageDefinition(Pages.Wizard9.Step1.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor;
viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard9.Step1.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertEquals("/w9/step1.xhtml", viewConfigDescriptor.getViewId());
}
示例14: testNamesWizard10
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testNamesWizard10()
{
this.viewConfigExtension.addPageDefinition(Pages.Wizard10.Step1.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor;
viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard10.Step1.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertEquals("/pages/w10a/step1.xhtml", viewConfigDescriptor.getViewId());
}
示例15: testSimpleViewConfigWithViewControllerCallback
import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; //导入方法依赖的package包/类
@Test
public void testSimpleViewConfigWithViewControllerCallback()
{
this.viewConfigExtension.addPageDefinition(SimplePageConfig.class);
ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
ViewConfigDescriptor viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(SimplePageConfig.class);
Assert.assertNotNull(viewConfigDescriptor);
Assert.assertNotNull(viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PreRenderView.class));
Assert.assertEquals(PageBean001.class, viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PreRenderView.class).getCallbackMethods().keySet().iterator().next());
Assert.assertEquals("preRenderViewCallbackMethod", ((List<Method>) viewConfigDescriptor.getCallbackDescriptor(ViewControllerRef.class, PreRenderView.class).getCallbackMethods().values().iterator().next()).iterator().next().getName());
}