List of usage examples for com.liferay.portal.kernel.util UnicodeProperties getProperty
public String getProperty(String key, String defaultValue)
From source file:com.liferay.calendarimporter.model.impl.ImportEntryImpl.java
License:Open Source License
@Override public String getTypeSettingsProperty(String key, String defaultValue) { UnicodeProperties typeSettingsProperties = getTypeSettingsProperties(); return typeSettingsProperties.getProperty(key, defaultValue); }
From source file:com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.java
License:Open Source License
protected void exportLinkedLayout(PortletDataContext portletDataContext, Layout layout, Element layoutElement) throws Exception { UnicodeProperties typeSettingsProperties = layout.getTypeSettingsProperties(); long linkToLayoutId = GetterUtil .getLong(typeSettingsProperties.getProperty("linkToLayoutId", StringPool.BLANK)); if (linkToLayoutId > 0) { try {/* ww w .j a v a 2 s. c om*/ Layout linkedToLayout = _layoutLocalService.getLayout(portletDataContext.getScopeGroupId(), layout.isPrivateLayout(), linkToLayoutId); StagedModelDataHandlerUtil.exportReferenceStagedModel(portletDataContext, layout, linkedToLayout, PortletDataContext.REFERENCE_TYPE_STRONG); layoutElement.addAttribute("linked-to-layout-uuid", linkedToLayout.getUuid()); } catch (NoSuchLayoutException nsle) { // LPS-52675 if (_log.isDebugEnabled()) { _log.debug(nsle, nsle); } } } }
From source file:com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.java
License:Open Source License
protected void importLinkedLayout(PortletDataContext portletDataContext, Layout layout, Layout importedLayout, Element layoutElement) throws Exception { UnicodeProperties typeSettingsProperties = layout.getTypeSettingsProperties(); long linkToLayoutId = GetterUtil .getLong(typeSettingsProperties.getProperty("linkToLayoutId", StringPool.BLANK)); String linkedToLayoutUuid = layoutElement.attributeValue("linked-to-layout-uuid"); if (Validator.isNull(linkedToLayoutUuid) || (linkToLayoutId <= 0)) { return;/* ww w .ja v a 2 s . co m*/ } _exportImportProcessCallbackRegistry.registerCallback(portletDataContext.getExportImportProcessId(), new ImportLinkedLayoutCallable(portletDataContext.getScopeGroupId(), portletDataContext.isPrivateLayout(), importedLayout.getUuid(), linkedToLayoutUuid)); }