Package org.apache.jetspeed.portlets

Examples of org.apache.jetspeed.portlets.PortletInfo


                    Iterator portlets = searchEngine.search(searchString.toString()).getResults().iterator();
                    while (portlets.hasNext())
                    {
                        PortletDefinition portlet =
                            getPortletFromParsedObject((ParsedObject)portlets.next());
                        PortletInfo portletInfo = filterPortlet(portlet, locale, request);
                        if (portletInfo != null)
                        {
                            cat.addPortlet(portletInfo);
                        }                   
                    }               
View Full Code Here


            if (filter == null)
                portlet = (PortletDefinition)portlets.next();
            else
                portlet = getPortletFromParsedObject((ParsedObject)portlets.next());
           
            PortletInfo portletInfo = filterPortlet(portlet, locale, request);
            if (portletInfo != null)
            {
                list.add(portletInfo);
            }
        }           
View Full Code Here

      RenderRequest request) {
    List list = new ArrayList();
    int sPortletCnt = 0;
    Iterator iterator;
    String usrPortletName = null;
    PortletInfo tmpPortletInfo = null;
    String portletName;
    try
    {
      Map usrPortlet = getUserPortlet(getPage(request));
      sPortletCnt = sysPortlets.size();
      for (int si = 0; si < sPortletCnt; si++) {
        tmpPortletInfo = (PortletInfo)((PortletInfo)sysPortlets.get(si)).clone();
        portletName = tmpPortletInfo.getName();
        iterator = usrPortlet.keySet().iterator();
        while (iterator.hasNext()) {
          usrPortletName = (String) iterator.next();
          if (usrPortletName.equalsIgnoreCase(portletName)) {
            tmpPortletInfo.setCount(((Integer)usrPortlet.get(usrPortletName)).intValue());
          }
        }
        list.add(tmpPortletInfo);
        tmpPortletInfo = null;
      }
View Full Code Here

            }
            else
            {
                image = DEFAULT_IMAGES[rand.nextInt(DEFAULT_IMAGES.length)];
            }
            return new PortletInfo(uniqueName, cleanup(portlet.getDisplayNameText(locale)), cleanup(portlet.getDescriptionText(locale)), image);
        }
        return null;
    }
View Full Code Here

        return false;
    }

    public int compare(Object obj1, Object obj2)
    {
        PortletInfo portlet1 = (PortletInfo)obj1;
        PortletInfo portlet2 = (PortletInfo)obj2;
        String name1 = portlet1.getDisplayName();
        String name2 = portlet2.getDisplayName();
        name1 = (name1 == null) ? "unknown" : name1;
        name2 = (name2 == null) ? "unknown" : name2;
        return name1.compareTo(name2);
    }
View Full Code Here

                    Iterator portlets = searchEngine.search(searchString.toString()).getResults().iterator();
                    while (portlets.hasNext())
                    {
                        PortletDefinitionComposite portlet =
                            getPortletFromParsedObject((ParsedObject)portlets.next());
                        PortletInfo portletInfo = filterPortlet(portlet, locale);
                        if (portletInfo != null)
                        {
                            cat.addPortlet(portletInfo);
                        }                   
                    }               
View Full Code Here

            if (filter == null)
                portlet = (PortletDefinitionComposite)portlets.next();
            else
                portlet = getPortletFromParsedObject((ParsedObject)portlets.next());
           
            PortletInfo portletInfo = filterPortlet(portlet, locale);
            if (portletInfo != null)
            {
                list.add(portletInfo);
            }
        }           
View Full Code Here

      RenderRequest request) {
    List list = new ArrayList();
    int sPortletCnt = 0;
    Iterator iterator;
    String usrPortletName = null;
    PortletInfo tmpPortletInfo = null;
    String portletName;
    try {
      Map usrPortlet = getUserPortlet(getPage(request));
      sPortletCnt = sysPortlets.size();
      for (int si = 0; si < sPortletCnt; si++) {
        tmpPortletInfo = (PortletInfo)((PortletInfo)sysPortlets.get(si)).clone();
        portletName = tmpPortletInfo.getName();
        iterator = usrPortlet.keySet().iterator();
        while (iterator.hasNext()) {
          usrPortletName = (String) iterator.next();
          if (usrPortletName.equalsIgnoreCase(portletName)) {
            tmpPortletInfo.setCount(((Integer)usrPortlet.get(usrPortletName)).intValue());
          }
        }
        list.add(tmpPortletInfo);
        tmpPortletInfo = null;
      }
View Full Code Here

            }
            else
            {
                image = DEFAULT_IMAGES[rand.nextInt(DEFAULT_IMAGES.length)];
            }
            return new PortletInfo(uniqueName, cleanup(portlet.getDisplayNameText(locale)), cleanup(portlet.getDescriptionText(locale)), image);
        }
        return null;
    }
View Full Code Here

        return false;
    }

    public int compare(Object obj1, Object obj2)
    {
        PortletInfo portlet1 = (PortletInfo)obj1;
        PortletInfo portlet2 = (PortletInfo)obj2;
        String name1 = portlet1.getDisplayName();
        String name2 = portlet2.getDisplayName();
        name1 = (name1 == null) ? "unknown" : name1;
        name2 = (name2 == null) ? "unknown" : name2;
        return name1.compareTo(name2);
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.portlets.PortletInfo

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.