List of usage examples for com.liferay.portal.kernel.util ListUtil fromMapValues
public static <E> List<E> fromMapValues(Map<?, ? extends E> map)
From source file:com.liferay.calendarimporter.source.ImportSourceFactory.java
License:Open Source License
public static List<ImportSource> getImportSources() { return ListUtil.fromMapValues(_importSources); }
From source file:com.liferay.content.targeting.util.ReportSearchContainerIterator.java
License:Open Source License
protected List<Report> getResults() { return ListUtil.fromMapValues(_reportsRegistry.getReports(_className)); }
From source file:com.liferay.dynamic.data.mapping.util.DDMDisplayRegistry.java
License:Open Source License
private List<DDMDisplay> _getDDMDisplays() { return ListUtil.fromMapValues(_ddmDisplays); }
From source file:com.liferay.marketplace.app.manager.web.internal.util.AppDisplayFactoryUtil.java
License:Open Source License
protected static List<AppDisplay> createPortalAppDisplays(BundlesMap bundlesMap, String category) { Map<String, AppDisplay> appDisplaysMap = new HashMap<>(); Collection<Bundle> bundles = bundlesMap.values(); for (Bundle bundle : bundles) { Dictionary<String, String> headers = bundle.getHeaders(); if (Validator.isNotNull(category)) { String[] categories = StringUtil.split(headers.get(BundleConstants.LIFERAY_RELENG_CATEGORY)); if (!ArrayUtil.contains(categories, category)) { continue; }//from ww w. jav a 2s . co m } String appTitle = GetterUtil.getString(headers.get(BundleConstants.LIFERAY_RELENG_APP_TITLE)); AppDisplay appDisplay = appDisplaysMap.get(appTitle); if (appDisplay == null) { String appDescription = GetterUtil .getString(headers.get(BundleConstants.LIFERAY_RELENG_APP_DESCRIPTION)); Version appVersion = bundle.getVersion(); appDisplay = new SimpleAppDisplay(appTitle, appDescription, appVersion); appDisplaysMap.put(appTitle, appDisplay); } appDisplay.addBundle(bundle); } return ListUtil.fromMapValues(appDisplaysMap); }
From source file:com.liferay.marketplace.app.manager.web.internal.util.ModuleGroupDisplayFactoryUtil.java
License:Open Source License
public static List<ModuleGroupDisplay> getModuleGroupDisplays(AppDisplay appDisplay) { List<Bundle> bundles = appDisplay.getBundles(); Map<String, ModuleGroupDisplay> moduleGroupDisplaysMap = new HashMap<>(); for (Bundle bundle : bundles) { Dictionary<String, String> headers = bundle.getHeaders(); String moduleGroupTitle = headers.get(BundleConstants.LIFERAY_RELENG_MODULE_GROUP_TITLE); if (moduleGroupTitle == null) { moduleGroupTitle = ModuleGroupDisplay.MODULE_GROUP_TITLE_INDEPENDENT_MODULES; }/* w w w. j a v a 2 s . c o m*/ ModuleGroupDisplay moduleGroupDisplay = moduleGroupDisplaysMap.get(moduleGroupTitle); if (moduleGroupDisplay == null) { String moduleGroupDescription = headers .get(BundleConstants.LIFERAY_RELENG_MODULE_GROUP_DESCRIPTION); Version moduleGroupVersion = bundle.getVersion(); moduleGroupDisplay = new SimpleModuleGroupDisplay(appDisplay, moduleGroupTitle, moduleGroupDescription, moduleGroupVersion); moduleGroupDisplaysMap.put(moduleGroupTitle, moduleGroupDisplay); } moduleGroupDisplay.addBundle(bundle); } return ListUtil.fromMapValues(moduleGroupDisplaysMap); }
From source file:com.liferay.portlet.wiki.service.impl.WikiPageLocalServiceImpl.java
License:Open Source License
public List<WikiPage> getOutgoingLinks(long nodeId, String title) throws PortalException, SystemException { WikiPage page = getPage(nodeId, title); Map<String, WikiPage> pages = new LinkedHashMap<String, WikiPage>(); Map<String, Boolean> links = WikiCacheUtil.getOutgoingLinks(page); for (Map.Entry<String, Boolean> entry : links.entrySet()) { String curTitle = entry.getKey(); Boolean exists = entry.getValue(); if (exists) { WikiPage curPage = getPage(nodeId, curTitle); if (!pages.containsKey(curPage.getTitle())) { pages.put(curPage.getTitle(), curPage); }/*from ww w. j a va2 s.c o m*/ } else { WikiPageImpl newPage = new WikiPageImpl(); newPage.setNew(true); newPage.setNodeId(nodeId); newPage.setTitle(curTitle); if (!pages.containsKey(curTitle)) { pages.put(curTitle, newPage); } } } return ListUtil.fromMapValues(pages); }
From source file:com.liferay.shipping.impl.model.ShippingExtensionRegistryImpl.java
License:Open Source License
@Override public List<ShippingExtension> getShippingExtensions() { return ListUtil.fromMapValues(_shippingExtensions); }
From source file:com.liferay.site.navigation.type.SiteNavigationMenuItemTypeRegistry.java
License:Open Source License
public List<SiteNavigationMenuItemType> getSiteNavigationMenuItemTypes() { return ListUtil.fromMapValues(_siteNavigationMenuItemTypes); }
From source file:com.liferay.taglib.aui.InputTag.java
License:Open Source License
protected void updateFormValidators() { if (_validators == null) { return;//from w w w .java 2 s . com } HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); Map<String, List<ValidatorTag>> validatorTagsMap = (Map<String, List<ValidatorTag>>) request .getAttribute("aui:form:validatorTagsMap"); List<ValidatorTag> validatorTags = ListUtil.fromMapValues(_validators); validatorTagsMap.put(_inputName, validatorTags); }
From source file:com.liferay.wiki.service.impl.WikiPageLocalServiceImpl.java
License:Open Source License
@Override public List<WikiPage> getOutgoingLinks(long nodeId, String title) throws PortalException { WikiPage page = getPage(nodeId, title); Map<String, WikiPage> pages = new LinkedHashMap<>(); Map<String, Boolean> links = wikiCacheHelper.getOutgoingLinks(page, wikiEngineRenderer); for (Map.Entry<String, Boolean> entry : links.entrySet()) { String curTitle = entry.getKey(); Boolean exists = entry.getValue(); if (exists) { WikiPage curPage = getPage(nodeId, curTitle); if (!pages.containsKey(curPage.getTitle())) { pages.put(curPage.getTitle(), curPage); }/*from ww w.ja va 2 s.c om*/ } else { WikiPageImpl newPage = new WikiPageImpl(); newPage.setNew(true); newPage.setNodeId(nodeId); newPage.setTitle(curTitle); if (!pages.containsKey(curTitle)) { pages.put(curTitle, newPage); } } } return ListUtil.fromMapValues(pages); }