1 5 6 package org.exoplatform.services.portletcontainer.impl.utils; 7 8 9 import java.util.List ; 10 import org.exoplatform.services.portletcontainer.pci.model.Description; 11 import org.exoplatform.services.portletcontainer.pci.model.Portlet; 12 17 public class PortletUtil { 18 19 static public String getPortletTitle(Portlet portlet) { 20 return portlet.getPortletInfo().getTitle() ; 21 } 22 23 static public String getDescription(Portlet portlet, String lang) { 24 lang = lang.toLowerCase() ; 25 List list = portlet.getDescription() ; 26 for (int i = 0; i < list.size(); i++) { 27 Description desc = (Description) list.get(i) ; 28 if (lang.equals(desc.getLang().toLowerCase())) { 29 return desc.getDescription() ; 30 } 31 } 32 return null ; 33 } 34 } 35 | Popular Tags |