Created
May 28, 2013 10:58
-
-
Save xhawk/5661969 to your computer and use it in GitHub Desktop.
List all the portlets in company 10180
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.liferay.portal.model.*; | |
import com.liferay.portal.kernel.plugin.*; | |
import com.liferay.portal.service.*; | |
import com.liferay.portal.util.*; | |
List portlets = PortletLocalServiceUtil.getPortlets(10180, false, false); | |
//portlets = ListUtil.sort(portlets, new PortletTitleComparator(application, locale)); | |
int total = portlets.size(); | |
for (int i = 0; i < total; i++) { | |
Portlet portlet = portlets.get(i); | |
PluginPackage pluginPackage = portlet.getPluginPackage(); | |
PluginSetting pluginSetting = PluginSettingLocalServiceUtil.getPluginSetting(10180, portlet.getPortletId(), Plugin.TYPE_PORTLET); | |
// Name and description | |
StringBuilder sb = new StringBuilder(); | |
String displayName = portlet.getDisplayName(); | |
//String title = PortalUtil.getPortletTitle(portlet, application, locale); | |
System.out.println(displayName + " | " + portlet.getPortletId()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment