Package org.apache.jetspeed.om.registry

Examples of org.apache.jetspeed.om.registry.MetaInfo


                assertTrue(mapParams.containsKey("itemdisplayed"));
                assertTrue(mapParams.containsKey("HACK"));
                Parameter p = (Parameter) mapParams.get("HACK");
                assertTrue(p.getValue().equals("hacker"));
                Parameter p2 = (Parameter) mapParams.get("showtitle");
                MetaInfo p2m = p2.getMetaInfo();
                assertTrue(p2m.getTitle().equals("Show title description ?"));
                assertTrue(p2.getTitle().equals("Show title description ?"));
                Map pMap = hack.getParameterMap();
                String v15 = (String) pMap.get("itemdisplayed");
                assertTrue(v15.equals("15"));

                // test falling back on meta info

                PortletEntry mp = (PortletEntry) portlets.elementAt(5);
                assertNotNull(mp);
                assertTrue(mp.getName().equals("MetaTest"));
                assertTrue(mp.getType().equals("ref"));
                assertTrue(mp.getParent().equals("AdminScreen"));
                assertTrue(mp.getClassname().equals("org.apache.jetspeed.portal.portlets.TurbineScreenPortlet"));
                String title = mp.getTitle();
                assertNotNull(title);
                assertTrue(title.equals("Turbine Screen in a portlet"));
                assertTrue(mp.getDescription().equals("We put the Admin Screen in a portlet."));
                MetaInfo meta = mp.getMetaInfo();
                assertNotNull(meta);
                assertTrue(mp.getMetaInfo().getTitle().equals("Turbine Screen in a portlet"));
                assertTrue(meta.getDescription().equals("We put the Admin Screen in a portlet."));

                // media type
                Iterator mpi = mp.listMediaTypes();
                assertNotNull(mpi);
                HashMap mpMap = new HashMap();
View Full Code Here


        assertTrue(entry.isCachedOnURL() == false);
        assertEquals(entry.getClassname(), "org.apache.jetspeed.portlets.BigKahunaPortlet");
        assertEquals(entry.getDescription(), "This is the big kahuna meta portlet");
        assertTrue(entry.isHidden() == false);
               
        MetaInfo meta = entry.getMetaInfo();
        assertNotNull(meta);
        assertEquals(meta.getImage(), "/images/image.gif");
        assertEquals(meta.getDescription(), "This is the big kahuna meta portlet");
        assertEquals(meta.getTitle(), "The Kahuna Portlet");
        assertEquals(entry.getName(), "BigKahuna");           
        assertEquals(entry.getParent(), null);
        SecurityReference ref = entry.getSecurityRef();
        assertNotNull(ref);
        assertEquals(ref.getParent(), "admin-only");
View Full Code Here

        assertTrue(entry.isCachedOnURL() == false);
        assertEquals(entry.getClassname(), "org.apache.jetspeed.portlets.BigKahunaPortlet");
        assertEquals(entry.getDescription(), "new description");
        assertTrue(entry.isHidden() == false);
               
        MetaInfo meta = entry.getMetaInfo();
        assertNotNull(meta);
        assertEquals(meta.getImage(), "/images/image.gif");
        assertEquals(meta.getDescription(), "new description");
        assertEquals(meta.getTitle(), "The Kahuna Portlet");
        assertEquals(entry.getName(), "BigKahuna");           
        assertEquals(entry.getParent(), null);
        SecurityReference ref = entry.getSecurityRef();
        assertNotNull(ref);
        assertEquals(ref.getParent(), "admin-only");
View Full Code Here

        assertTrue(entry.isCachedOnURL() == true);
        assertEquals(entry.getClassname(), "org.apache.jetspeed.portlets.BigKahunaPortlet");
        assertEquals(entry.getDescription(), "This is the big kahuna meta portlet");
        assertTrue(entry.isHidden() == false);
               
        MetaInfo meta = entry.getMetaInfo();
        assertNotNull(meta);
        assertEquals(meta.getImage(), "/images/image.gif");
        assertEquals(meta.getDescription(), "This is the big kahuna meta portlet");
        assertEquals(meta.getTitle(), "The Kahuna Portlet");
        assertEquals(entry.getName(), "BigKahunaRef");           
        assertEquals(entry.getParent(), "BigKahuna");
        SecurityReference ref = entry.getSecurityRef();
        assertNotNull(ref);
        assertNull(ref.getParent());
View Full Code Here

                entry.setApplication(false);
                entry.setCachedOnURL(false);
                entry.setClassname("org.apache.jetspeed.portlets.BigKahunaPortlet");
                entry.setDescription("This is the big kahuna portlet");
                entry.setHidden(false);
                MetaInfo meta = new BaseMetaInfo();
                meta.setImage("/images/image.gif");
                meta.setDescription("This is the big kahuna meta portlet");
                meta.setTitle("The Meta Kahuna Portlet");
                entry.setMetaInfo(meta);
                entry.setName("BigKahuna");           
                entry.setParent(null);
                SecurityReference ref = new BaseSecurityReference();
                ref.setParent("admin-only");
                entry.setSecurityRef(ref);
                entry.setTitle("The Kahuna Portlet");
                entry.setType(PortletEntry.TYPE_ABSTRACT);               
                entry.setURL("http://bigkahuna.org");
                   
                // parameters
                entry.addParameter("simple", "simple-value");
               
                CachedParameter param = new BaseCachedParameter();
                param.setDescription("pdescription");
                param.setHidden(false);
                meta = new BaseMetaInfo();
                meta.setDescription("meta desc");
                meta.setImage("meta image");
                meta.setTitle("meta title");
                param.setMetaInfo(meta);
                param.setName("coconut");               
                SecurityReference ref2 = new BaseSecurityReference();
                ref2.setParent("admin-only");               
                param.setSecurityRef(ref2);
                param.setTitle("Coconut");
                param.setType("hmm");
                param.setValue("hawaii");
                entry.addParameter(param);
                param.setCachedOnName(true);
                param.setCachedOnValue(false);

               
                param = new BaseCachedParameter();
                param.setDescription("second pdescription");
                param.setHidden(true);
                meta = new BaseMetaInfo();
                meta.setDescription("second meta desc");
                meta.setImage("second meta image");
                meta.setTitle("second meta title");
                param.setMetaInfo(meta);
                param.setName("second coconut");
                SecurityReference ref3 = new BaseSecurityReference();
                ref3.setParent("second admin-only");               
                param.setSecurityRef(ref3);
View Full Code Here

        pe.setApplication(pde.getApplication());
        pe.setCachedOnURL(pde.getCachedOnUrl());
        pe.setClassname(pde.getClassname());
        pe.setDescription(pde.getDescription());
        pe.setHidden(pde.getHidden());
        MetaInfo meta = new BaseMetaInfo();
        meta.setImage(pde.getImage());
        meta.setDescription(pde.getDescription());
        meta.setTitle(pde.getTitle());
        pe.setMetaInfo(meta);               
        pe.setName(pde.getName());           
        pe.setParent(pde.getParent());
        if(pde.getSecurityRef() != null)
        {
            SecurityReference ref = new BaseSecurityReference();
            ref.setParent(pde.getSecurityRef());
            pe.setSecurityRef(ref);
        }

        pe.setTitle(pde.getTitle());
        pe.setType(pde.getType());
        pe.setURL(pde.getURL());
       
        // parameters
        Iterator params = pde.getPortletParameters().iterator();
        while (params.hasNext())
        {
            PortletParameter pp = (PortletParameter)params.next();
            CachedParameter cp = new BaseCachedParameter(pp.getId());
            cp.setCachedOnName(pp.getCachedOnName());
            cp.setCachedOnValue(pp.getCachedOnValue());
            cp.setDescription(pp.getDescription());
            cp.setHidden(pp.getHidden());
            cp.setName(pp.getName());
            cp.setType(pp.getType());
            cp.setValue(pp.getValue());

           
            cp.setTitle(pp.getTitle());
            if (pp.getDescription() != null || pp.getTitle() != null || pp.getImage() != null)
            {
                MetaInfo meta2 = new BaseMetaInfo();
                meta2.setImage(pp.getImage());
                meta2.setDescription(pp.getDescription());
                meta2.setTitle(pp.getTitle());
                cp.setMetaInfo(meta2);
            }
            if (pp.getSecurityRef() != null)
            {
                SecurityReference ref2 = new BaseSecurityReference();
View Full Code Here

                pp.setPortletId(pde.getId());
                pp.setTitle(cp.getTitle());
                pp.setType(cp.getType());
                pp.setValue(cp.getValue());
               
                MetaInfo meta = cp.getMetaInfo();
                if (meta != null)
                {
                    pp.setImage(meta.getImage());
                    pp.setDescription(meta.getDescription());
                    pp.setTitle(meta.getTitle());
                }
                SecurityReference ref = cp.getSecurityRef();
                if (ref != null)
                {
                    pp.setSecurityRef(ref.getParent());
View Full Code Here

                assertTrue(mapParams.containsKey("itemdisplayed"));
                assertTrue(mapParams.containsKey("HACK"));
                Parameter p = (Parameter) mapParams.get("HACK");
                assertTrue(p.getValue().equals("hacker"));
                Parameter p2 = (Parameter) mapParams.get("showtitle");
                MetaInfo p2m = p2.getMetaInfo();
                assertTrue(p2m.getTitle().equals("Show title description ?"));
                assertTrue(p2.getTitle().equals("Show title description ?"));
                Map pMap = hack.getParameterMap();
                String v15 = (String) pMap.get("itemdisplayed");
                assertTrue(v15.equals("15"));

                // test falling back on meta info

                PortletEntry mp = (PortletEntry) portlets.elementAt(5);
                assertNotNull(mp);
                assertTrue(mp.getName().equals("MetaTest"));
                assertTrue(mp.getType().equals("ref"));
                assertTrue(mp.getParent().equals("AdminScreen"));
                assertTrue(mp.getClassname().equals("org.apache.jetspeed.portal.portlets.TurbineScreenPortlet"));
                String title = mp.getTitle();
                assertNotNull(title);
                assertTrue(title.equals("Turbine Screen in a portlet"));
                assertTrue(mp.getDescription().equals("We put the Admin Screen in a portlet."));
                MetaInfo meta = mp.getMetaInfo();
                assertNotNull(meta);
                assertTrue(mp.getMetaInfo().getTitle().equals("Turbine Screen in a portlet"));
                assertTrue(meta.getDescription().equals("We put the Admin Screen in a portlet."));

                // media type
                Iterator mpi = mp.listMediaTypes();
                assertNotNull(mpi);
                HashMap mpMap = new HashMap();
View Full Code Here

                assertTrue(mapParams.containsKey("itemdisplayed"));
                assertTrue(mapParams.containsKey("HACK"));
                Parameter p = (Parameter) mapParams.get("HACK");
                assertTrue(p.getValue().equals("hacker"));
                Parameter p2 = (Parameter) mapParams.get("showtitle");
                MetaInfo p2m = p2.getMetaInfo();
                assertTrue(p2m.getTitle().equals("Show title description ?"));
                assertTrue(p2.getTitle().equals("Show title description ?"));
                Map pMap = hack.getParameterMap();
                String v15 = (String) pMap.get("itemdisplayed");
                assertTrue(v15.equals("15"));

                // test falling back on meta info

                PortletEntry mp = (PortletEntry) portlets.elementAt(5);
                assertNotNull(mp);
                assertTrue(mp.getName().equals("MetaTest"));
                assertTrue(mp.getType().equals("ref"));
                assertTrue(mp.getParent().equals("AdminScreen"));
                assertTrue(mp.getClassname().equals("org.apache.jetspeed.portal.portlets.TurbineScreenPortlet"));
                String title = mp.getTitle();
                assertNotNull(title);
                assertTrue(title.equals("Turbine Screen in a portlet"));
                assertTrue(mp.getDescription().equals("We put the Admin Screen in a portlet."));
                MetaInfo meta = mp.getMetaInfo();
                assertNotNull(meta);
                assertTrue(mp.getMetaInfo().getTitle().equals("Turbine Screen in a portlet"));
                assertTrue(meta.getDescription().equals("We put the Admin Screen in a portlet."));

                // media type
                Iterator mpi = mp.listMediaTypes();
                assertNotNull(mpi);
                HashMap mpMap = new HashMap();
View Full Code Here

                assertTrue(mapParams.containsKey("itemdisplayed"));
                assertTrue(mapParams.containsKey("HACK"));
                Parameter p = (Parameter) mapParams.get("HACK");
                assertTrue(p.getValue().equals("hacker"));
                Parameter p2 = (Parameter) mapParams.get("showtitle");
                MetaInfo p2m = p2.getMetaInfo();
                assertTrue(p2m.getTitle().equals("Show title description ?"));
                assertTrue(p2.getTitle().equals("Show title description ?"));
                Map pMap = hack.getParameterMap();
                String v15 = (String) pMap.get("itemdisplayed");
                assertTrue(v15.equals("15"));

                // test falling back on meta info

                PortletEntry mp = (PortletEntry) portlets.elementAt(5);
                assertNotNull(mp);
                assertTrue(mp.getName().equals("MetaTest"));
                assertTrue(mp.getType().equals("ref"));
                assertTrue(mp.getParent().equals("AdminScreen"));
                assertTrue(mp.getClassname().equals("org.apache.jetspeed.portal.portlets.TurbineScreenPortlet"));
                String title = mp.getTitle();
                assertNotNull(title);
                assertTrue(title.equals("Turbine Screen in a portlet"));
                assertTrue(mp.getDescription().equals("We put the Admin Screen in a portlet."));
                MetaInfo meta = mp.getMetaInfo();
                assertNotNull(meta);
                assertTrue(mp.getMetaInfo().getTitle().equals("Turbine Screen in a portlet"));
                assertTrue(meta.getDescription().equals("We put the Admin Screen in a portlet."));

                // media type
                Iterator mpi = mp.listMediaTypes();
                assertNotNull(mpi);
                HashMap mpMap = new HashMap();
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.registry.MetaInfo

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.