Package org.apache.jetspeed.om.registry

Examples of org.apache.jetspeed.om.registry.PortletEntry.listCategories()


        Iterator pItr = portlets.iterator();
        while (pItr.hasNext())
        {
            PortletEntry entry = (PortletEntry) pItr.next();

            Iterator cItr = entry.listCategories();
            while (cItr.hasNext())
            {
                BaseCategory cat = (BaseCategory) cItr.next();
                catMap.put(cat.getName(), cat);
            }
View Full Code Here


                {
                    logger.error(this.getClass().getName() + ": Portlet " + portletName + " of type ref has no parent.  This portlet will not work properly.");
                }
                else
                {
                    Collection parentCategories = iteratorToCollection(parentEntry.listCategories());
                    context.put("parent_categories", parentCategories);
                   
                    Collection parentMediaTypes = iteratorToCollection(parentEntry.listMediaTypes());
                    context.put("parent_mediatypes", parentMediaTypes);
                }
View Full Code Here

        //TODO:  do the lookup once, minor speed improvment
        //      validate parent entry exists
        PortletEntry parentEntry = (PortletEntry)Registry.getEntry(Registry.PORTLET, JSR168_PORTLET);
       
        //TODO:  speed improvement 2, only get categories once
        Iterator categoryIterator = parentEntry.listCategories();
       
        PortletEntry entry = (PortletEntry) Registry.createEntry(Registry.PORTLET);
        entry.setParent(JSR168_PORTLET);
        entry.setType(JS1_REFERENCE_TYPE);
       
View Full Code Here

                        JetspeedSecurity.PERMISSION_VIEW)
                    && ((!entry.isHidden())
                        && (!entry.getType().equals(PortletEntry.TYPE_ABSTRACT))
                        && entry.hasMediaType(mediaType)))
                {
                    Iterator cItr = entry.listCategories();
                    while (cItr.hasNext())
                    {
                        BaseCategory cat = (BaseCategory) cItr.next();
                        catMap.put(cat.getName(), cat);
                    }
View Full Code Here

                    }
                }
            }
            else
            {
                Iterator cItr = entry.listCategories();
                while (cItr.hasNext())
                {
                    BaseCategory cat = (BaseCategory) cItr.next();
                    catMap.put(cat.getName(), cat);
                }
View Full Code Here

                // categories
                PortletEntry feeder = (PortletEntry) portlets.elementAt(3);
                assertNotNull(feeder);
                assertTrue(feeder.getName().equals("Feeder"));
                assertTrue(feeder.getType().equals("ref"));
                Iterator fi = feeder.listCategories();
                Category cat = (Category) fi.next();
                assertTrue(cat.getName().equals("news.world.politics"));
                assertTrue(cat.getGroup().equals("news"));
                assertTrue(feeder.hasCategory("news.world.politics", "news"));
                feeder.addCategory("news.us.economy");
View Full Code Here

                                         JetspeedSecurity.PERMISSION_VIEW)
                    && ((!entry.isHidden())
                    && (!entry.getType().equals(PortletEntry.TYPE_ABSTRACT))
                    && entry.hasMediaType(mediaType)))
                {
                    Iterator cItr = entry.listCategories();
                    while (cItr.hasNext())
                    {
                        BaseCategory cat = (BaseCategory) cItr.next();
                        catMap.put(cat.getName(), cat);
                    }           
View Full Code Here

                    }           
                }
            }
            else
            {
                Iterator cItr = entry.listCategories();
                while (cItr.hasNext())
                {
                    BaseCategory cat = (BaseCategory) cItr.next();
                    catMap.put(cat.getName(), cat);
                }           
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.