javax.portlet.GenericPortlet Java Examples
The following examples show how to use
javax.portlet.GenericPortlet.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CDIPrototyping.java From portals-pluto with Apache License 2.0 | 6 votes |
@Test public void beanMgrTest() throws Exception { assertNotNull(bm); Set<Bean<?>> beans = bm.getBeans(TestPortlet1.class); Bean<?> bean = bm.resolve(beans); assertNotNull(bean); CreationalContext<?> coco = bm.createCreationalContext(bean); assertNotNull(coco); Object obj = bm.getReference(bean, TestPortlet1.class, coco); assertNotNull(obj); assertTrue(obj instanceof GenericPortlet); assertTrue(obj instanceof Portlet); assertTrue(obj instanceof HeaderPortlet); assertTrue(obj instanceof EventPortlet); assertTrue(obj instanceof ResourceServingPortlet); Object obj2 = bm.getReference(bean, TestPortlet1.class, coco); assertNotNull(obj2); assertFalse(obj.equals(obj2)); assertFalse(obj == obj2); }
Example #2
Source File: CDIPrototyping.java From portals-pluto with Apache License 2.0 | 6 votes |
@Test public void appScopedTest() throws Exception { assertNotNull(bm); Set<Bean<?>> beans = bm.getBeans(TestPortlet1AppScoped.class); Bean<?> bean = bm.resolve(beans); assertNotNull(bean); CreationalContext<?> coco = bm.createCreationalContext(bean); assertNotNull(coco); Object obj = bm.getReference(bean, TestPortlet1AppScoped.class, coco); assertNotNull(obj); assertTrue(obj instanceof GenericPortlet); assertTrue(obj instanceof Portlet); assertTrue(obj instanceof HeaderPortlet); assertTrue(obj instanceof EventPortlet); assertTrue(obj instanceof ResourceServingPortlet); Object obj2 = bm.getReference(bean, TestPortlet1AppScoped.class, coco); assertNotNull(obj2); assertTrue(obj.equals(obj2)); assertTrue(obj == obj2); }
Example #3
Source File: CDIPrototyping.java From portals-pluto with Apache License 2.0 | 5 votes |
@Test public void appScopedTest2Coco() throws Exception { assertNotNull(bm); Set<Bean<?>> beans = bm.getBeans(TestPortlet1AppScoped.class); Bean<?> bean = bm.resolve(beans); assertNotNull(bean); CreationalContext<?> coco1 = bm.createCreationalContext(bean); assertNotNull(coco1); Object obj = bm.getReference(bean, TestPortlet1AppScoped.class, coco1); assertNotNull(obj); assertTrue(obj instanceof GenericPortlet); assertTrue(obj instanceof Portlet); assertTrue(obj instanceof HeaderPortlet); assertTrue(obj instanceof EventPortlet); assertTrue(obj instanceof ResourceServingPortlet); CreationalContext<?> coco2 = bm.createCreationalContext(bean); assertNotNull(coco2); Object obj2 = bm.getReference(bean, TestPortlet1AppScoped.class, coco2); assertNotNull(obj2); assertTrue(obj.equals(obj2)); assertTrue(obj == obj2); }
Example #4
Source File: CDIPrototyping.java From portals-pluto with Apache License 2.0 | 5 votes |
@Test public void appScopedTest2Coco2Bean() throws Exception { assertNotNull(bm); Set<Bean<?>> beans1 = bm.getBeans(TestPortlet1AppScoped.class); Bean<?> bean1 = bm.resolve(beans1); assertNotNull(bean1); CreationalContext<?> coco1 = bm.createCreationalContext(bean1); assertNotNull(coco1); Object obj = bm.getReference(bean1, TestPortlet1AppScoped.class, coco1); assertNotNull(obj); assertTrue(obj instanceof GenericPortlet); assertTrue(obj instanceof Portlet); assertTrue(obj instanceof HeaderPortlet); assertTrue(obj instanceof EventPortlet); assertTrue(obj instanceof ResourceServingPortlet); Set<Bean<?>> beans2 = bm.getBeans(TestPortlet1AppScoped.class); Bean<?> bean2 = bm.resolve(beans2); assertNotNull(bean2); CreationalContext<?> coco2 = bm.createCreationalContext(bean2); assertNotNull(coco2); Object obj2 = bm.getReference(bean2, TestPortlet1AppScoped.class, coco2); assertNotNull(obj2); assertTrue(obj.equals(obj2)); assertTrue(obj == obj2); assertEquals(bean1, bean2); assertNotEquals(coco1, coco2); }