diff --git a/modules/apps/asset/asset-list-service/src/main/java/com/liferay/asset/list/internal/asset/entry/provider/AssetListAssetEntryProviderImpl.java b/modules/apps/asset/asset-list-service/src/main/java/com/liferay/asset/list/internal/asset/entry/provider/AssetListAssetEntryProviderImpl.java index c368b12d100093..616979eb5aa1e4 100644 --- a/modules/apps/asset/asset-list-service/src/main/java/com/liferay/asset/list/internal/asset/entry/provider/AssetListAssetEntryProviderImpl.java +++ b/modules/apps/asset/asset-list-service/src/main/java/com/liferay/asset/list/internal/asset/entry/provider/AssetListAssetEntryProviderImpl.java @@ -205,9 +205,10 @@ protected AssetEntryQuery getAssetEntryQuery( properties.fastLoad(assetListEntry.getTypeSettings(segmentsEntryId)); - _setCategoriesAndTags( + _setCategoriesAndKeywordsAndTags( assetListEntry, assetEntryQuery, properties, - _getAssetCategoryIds(properties), _getAssetTagNames(properties)); + _getAssetCategoryIds(properties), _getKeywords(properties), + _getAssetTagNames(properties)); long[] groupIds = GetterUtil.getLongValues( StringUtil.split( @@ -369,6 +370,35 @@ private static String[] _getAssetTagNames(UnicodeProperties properties) { return allAssetTagNames; } + private static String[] _getKeywords(UnicodeProperties properties) { + String[] allKeywords = new String[0]; + + for (int i = 0; true; i++) { + String[] queryValues = StringUtil.split( + properties.getProperty("queryValues" + i, null)); + + if (ArrayUtil.isEmpty(queryValues)) { + break; + } + + boolean queryContains = GetterUtil.getBoolean( + properties.getProperty("queryContains" + i, StringPool.BLANK)); + boolean queryAndOperator = GetterUtil.getBoolean( + properties.getProperty( + "queryAndOperator" + i, StringPool.BLANK)); + String queryName = properties.getProperty( + "queryName" + i, StringPool.BLANK); + + if (!Objects.equals(queryName, "keywords") && queryContains && + (queryAndOperator || (queryValues.length == 1))) { + + allKeywords = queryValues; + } + } + + return allKeywords; + } + private long[] _filterAssetCategoryIds(long[] assetCategoryIds) { List assetCategoryIdsList = new ArrayList<>(); @@ -593,16 +623,21 @@ private List _search( return Collections.emptyList(); } - private void _setCategoriesAndTags( + private void _setCategoriesAndKeywordsAndTags( AssetListEntry assetListEntry, AssetEntryQuery assetEntryQuery, UnicodeProperties properties, long[] overrideAllAssetCategoryIds, - String[] overrideAllAssetTagNames) { + String[] overrideAllKeywords, String[] overrideAllAssetTagNames) { long[] allAssetCategoryIds = new long[0]; long[] anyAssetCategoryIds = new long[0]; long[] notAllAssetCategoryIds = new long[0]; long[] notAnyAssetCategoryIds = new long[0]; + String[] allKeywords = new String[0]; + String[] anyKeywords = new String[0]; + String[] notAllKeywords = new String[0]; + String[] notAnyKeywords = new String[0]; + String[] allAssetTagNames = new String[0]; String[] anyAssetTagNames = new String[0]; String[] notAllAssetTagNames = new String[0]; @@ -640,6 +675,20 @@ else if (!queryContains && queryAndOperator) { notAnyAssetCategoryIds = assetCategoryIds; } } + else if (Objects.equals(queryName, "keywords")) { + if (queryContains && queryAndOperator) { + allKeywords = queryValues; + } + else if (queryContains && !queryAndOperator) { + anyKeywords = queryValues; + } + else if (!queryContains && queryAndOperator) { + notAllKeywords = queryValues; + } + else { + notAnyKeywords = queryValues; + } + } else { if (queryContains && queryAndOperator) { allAssetTagNames = queryValues; @@ -664,6 +713,12 @@ else if (!queryContains && queryAndOperator) { assetEntryQuery.setAllCategoryIds(allAssetCategoryIds); + if (overrideAllKeywords != null) { + allKeywords = overrideAllKeywords; + } + + assetEntryQuery.setAllKeywords(allKeywords); + if (overrideAllAssetTagNames != null) { allAssetTagNames = overrideAllAssetTagNames; } @@ -679,6 +734,8 @@ else if (!queryContains && queryAndOperator) { assetEntryQuery.setAnyCategoryIds(anyAssetCategoryIds); + assetEntryQuery.setAnyKeywords(anyKeywords); + long[] anyAssetTagIds = _assetTagLocalService.getTagIds( siteGroupId, anyAssetTagNames); @@ -686,6 +743,8 @@ else if (!queryContains && queryAndOperator) { assetEntryQuery.setNotAllCategoryIds(notAllAssetCategoryIds); + assetEntryQuery.setNotAllKeywords(notAllKeywords); + for (String assetTagName : notAllAssetTagNames) { long[] notAllAssetTagIds = _assetTagLocalService.getTagIds( new long[] {siteGroupId}, assetTagName); @@ -695,6 +754,8 @@ else if (!queryContains && queryAndOperator) { assetEntryQuery.setNotAnyCategoryIds(notAnyAssetCategoryIds); + assetEntryQuery.setNotAnyKeywords(notAnyKeywords); + long[] notAnyAssetTagIds = _assetTagLocalService.getTagIds( siteGroupId, notAnyAssetTagNames); diff --git a/modules/apps/asset/asset-list-web/src/main/java/com/liferay/asset/list/web/internal/display/context/EditAssetListDisplayContext.java b/modules/apps/asset/asset-list-web/src/main/java/com/liferay/asset/list/web/internal/display/context/EditAssetListDisplayContext.java index 9e40f461ec9061..c5c8421fd8453a 100644 --- a/modules/apps/asset/asset-list-web/src/main/java/com/liferay/asset/list/web/internal/display/context/EditAssetListDisplayContext.java +++ b/modules/apps/asset/asset-list-web/src/main/java/com/liferay/asset/list/web/internal/display/context/EditAssetListDisplayContext.java @@ -276,6 +276,30 @@ public JSONArray getAutoFieldRulesJSONArray() { ruleJSONObject.put("selectedItems", selectedItems); } + else if (Objects.equals(queryName, "keywords")) { + queryValues = ParamUtil.getString( + _httpServletRequest, "keywords" + queryLogicIndex, + queryValues); + + String[] keywords = StringUtil.split(queryValues, " "); + + if (ArrayUtil.isEmpty(keywords)) { + continue; + } + + List> selectedItems = new ArrayList<>(); + + for (String keyword : keywords) { + HashMap selectedCategory = new HashMap<>(); + + selectedCategory.put("label", keyword); + selectedCategory.put("value", keyword); + + selectedItems.add(selectedCategory); + } + + ruleJSONObject.put("selectedItems", selectedItems); + } else { queryValues = ParamUtil.getString( _httpServletRequest, "queryCategoryIds" + queryLogicIndex, diff --git a/modules/apps/asset/asset-list-web/src/main/java/com/liferay/asset/list/web/internal/portlet/action/UpdateAssetListEntryDynamicMVCActionCommand.java b/modules/apps/asset/asset-list-web/src/main/java/com/liferay/asset/list/web/internal/portlet/action/UpdateAssetListEntryDynamicMVCActionCommand.java index 44bbb65fd5e1d0..1dbc274ae89515 100644 --- a/modules/apps/asset/asset-list-web/src/main/java/com/liferay/asset/list/web/internal/portlet/action/UpdateAssetListEntryDynamicMVCActionCommand.java +++ b/modules/apps/asset/asset-list-web/src/main/java/com/liferay/asset/list/web/internal/portlet/action/UpdateAssetListEntryDynamicMVCActionCommand.java @@ -116,6 +116,10 @@ protected AssetQueryRule getQueryRule( values = ParamUtil.getStringValues( actionRequest, "queryTagNames" + index); } + else if (name.equals("keywords")) { + values = ParamUtil.getStringValues( + actionRequest, "keywords" + index); + } else { values = ParamUtil.getStringValues( actionRequest, "queryCategoryIds" + index); diff --git a/modules/apps/asset/asset-list-web/src/main/resources/META-INF/resources/js/AutoField.soy b/modules/apps/asset/asset-list-web/src/main/resources/META-INF/resources/js/AutoField.soy index 14f8f0fb7c3273..a9293ecbfb2bb9 100644 --- a/modules/apps/asset/asset-list-web/src/main/resources/META-INF/resources/js/AutoField.soy +++ b/modules/apps/asset/asset-list-web/src/main/resources/META-INF/resources/js/AutoField.soy @@ -137,6 +137,7 @@ > + @@ -152,6 +153,19 @@ {param selectedItems: $rule.selectedItems ?: [] /} {param vocabularyIds: $vocabularyIds /} {/call} + {elseif $rule.type == 'keywords'} +
+ + + +
{else} {call com.liferay.asset.taglib.AssetTagsSelector.render} {param eventName: $namespace + 'selectTag' /} diff --git a/modules/apps/asset/asset-publisher-api/src/main/java/com/liferay/asset/publisher/util/AssetPublisherHelper.java b/modules/apps/asset/asset-publisher-api/src/main/java/com/liferay/asset/publisher/util/AssetPublisherHelper.java index 7b9854e656dda1..86018a2f1fe081 100644 --- a/modules/apps/asset/asset-publisher-api/src/main/java/com/liferay/asset/publisher/util/AssetPublisherHelper.java +++ b/modules/apps/asset/asset-publisher-api/src/main/java/com/liferay/asset/publisher/util/AssetPublisherHelper.java @@ -98,6 +98,12 @@ public AssetEntryQuery getAssetEntryQuery( String[] overrideAllAssetTagNames) throws PortalException; + public AssetEntryQuery getAssetEntryQuery( + PortletPreferences portletPreferences, long groupId, Layout layout, + long[] overrideAllAssetCategoryIds, String[] overrideAllKeywords, + String[] overrideAllAssetTagNames) + throws PortalException; + public List getAssetEntryResults( SearchContainer searchContainer, AssetEntryQuery assetEntryQuery, Layout layout, PortletPreferences portletPreferences, @@ -134,6 +140,8 @@ public long[] getGroupIds( PortletPreferences portletPreferences, long scopeGroupId, Layout layout); + public String[] getKeywords(PortletPreferences portletPreferences); + public String getScopeId(Group group, long scopeGroupId); } \ No newline at end of file diff --git a/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/display/context/AssetPublisherDisplayContext.java b/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/display/context/AssetPublisherDisplayContext.java index 386ea4424d1de9..439c30e8ca1e3b 100644 --- a/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/display/context/AssetPublisherDisplayContext.java +++ b/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/display/context/AssetPublisherDisplayContext.java @@ -246,6 +246,33 @@ public String[] getAllAssetTagNames() { return _allAssetTagNames; } + public String[] getAllKeywords() { + if (_allKeywords != null) { + return _allKeywords; + } + + _allKeywords = new String[0]; + + String keyword = ParamUtil.getString(_httpServletRequest, "keyword"); + + String selectionStyle = getSelectionStyle(); + + if (selectionStyle.equals("dynamic")) { + _allKeywords = _assetPublisherHelper.getKeywords( + _portletPreferences); + } + + if (Validator.isNotNull(keyword) && + !ArrayUtil.contains(_allKeywords, keyword)) { + + _allKeywords = ArrayUtil.append(_allKeywords, keyword); + } + + _allKeywords = ArrayUtil.distinct(_allKeywords, new StringComparator()); + + return _allKeywords; + } + public long getAssetCategoryId() { if (_assetCategoryId != null) { return _assetCategoryId; @@ -335,7 +362,7 @@ assetListEntry, _getSegmentsEntryIds(), _assetEntryQuery = _assetPublisherHelper.getAssetEntryQuery( _portletPreferences, _themeDisplay.getScopeGroupId(), _themeDisplay.getLayout(), getAllAssetCategoryIds(), - getAllAssetTagNames()); + getAllKeywords(), getAllAssetTagNames()); } _assetEntryQuery.setEnablePermissions(isEnablePermissions()); @@ -547,6 +574,30 @@ public JSONArray getAutoFieldRulesJSONArray() { ruleJSONObject.put("selectedItems", selectedItems); } + else if (Objects.equals(queryName, "keywords")) { + queryValues = ParamUtil.getString( + _httpServletRequest, "keywords" + queryLogicIndex, + queryValues); + + String[] keywords = StringUtil.split(queryValues, " "); + + if (ArrayUtil.isEmpty(keywords)) { + continue; + } + + List> selectedItems = new ArrayList<>(); + + for (String keyword : keywords) { + HashMap selectedCategory = new HashMap<>(); + + selectedCategory.put("label", keyword); + selectedCategory.put("value", keyword); + + selectedItems.add(selectedCategory); + } + + ruleJSONObject.put("selectedItems", selectedItems); + } else { queryValues = ParamUtil.getString( _httpServletRequest, "queryCategoryIds" + queryLogicIndex, @@ -1891,6 +1942,7 @@ private long[] _getSegmentsEntryIds() { private Integer _abstractLength; private long[] _allAssetCategoryIds; private String[] _allAssetTagNames; + private String[] _allKeywords; private Boolean _anyAssetType; private Long _assetCategoryId; private final AssetEntryActionRegistry _assetEntryActionRegistry; diff --git a/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/portlet/action/AssetPublisherConfigurationAction.java b/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/portlet/action/AssetPublisherConfigurationAction.java index b134c19d462031..ce18c2ddb90bc9 100644 --- a/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/portlet/action/AssetPublisherConfigurationAction.java +++ b/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/portlet/action/AssetPublisherConfigurationAction.java @@ -463,6 +463,10 @@ protected AssetQueryRule getQueryRule( values = ParamUtil.getStringValues( actionRequest, "queryTagNames" + index); } + else if (name.equals("keywords")) { + values = ParamUtil.getStringValues( + actionRequest, "keywords" + index); + } else { values = ParamUtil.getStringValues( actionRequest, "queryCategoryIds" + index); diff --git a/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/util/AssetPublisherHelperImpl.java b/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/util/AssetPublisherHelperImpl.java index c0954a2a6d6c2e..a90dbc277eb178 100644 --- a/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/util/AssetPublisherHelperImpl.java +++ b/modules/apps/asset/asset-publisher-web/src/main/java/com/liferay/asset/publisher/web/internal/util/AssetPublisherHelperImpl.java @@ -366,13 +366,26 @@ public AssetEntryQuery getAssetEntryQuery( String[] overrideAllAssetTagNames) throws PortalException { + return getAssetEntryQuery( + portletPreferences, groupId, layout, overrideAllAssetCategoryIds, + null, overrideAllAssetTagNames); + } + + @Override + public AssetEntryQuery getAssetEntryQuery( + PortletPreferences portletPreferences, long groupId, Layout layout, + long[] overrideAllAssetCategoryIds, String[] overrideAllKeywords, + String[] overrideAllAssetTagNames) + throws PortalException { + long[] groupIds = getGroupIds(portletPreferences, groupId, layout); AssetEntryQuery assetEntryQuery = new AssetEntryQuery(); - _setCategoriesAndTags( + _setCategoriesAndKeywordsAndTags( assetEntryQuery, portletPreferences, groupIds, - overrideAllAssetCategoryIds, overrideAllAssetTagNames); + overrideAllAssetCategoryIds, overrideAllKeywords, + overrideAllAssetTagNames); assetEntryQuery.setGroupIds(groupIds); @@ -491,8 +504,7 @@ public String[] getAssetTagNames(PortletPreferences portletPreferences) { String queryName = portletPreferences.getValue( "queryName" + i, StringPool.BLANK); - if (!Objects.equals(queryName, "assetCategories") && - queryContains && + if (Objects.equals(queryName, "assetTags") && queryContains && (queryAndOperator || (queryValues.length == 1))) { allAssetTagNames = queryValues; @@ -731,6 +743,37 @@ public long[] getGroupIds( return ArrayUtil.toLongArray(groupIds); } + @Override + public String[] getKeywords(PortletPreferences portletPreferences) { + String[] allKeywords = new String[0]; + + for (int i = 0; true; i++) { + String[] queryValues = portletPreferences.getValues( + "queryValues" + i, null); + + if (ArrayUtil.isEmpty(queryValues)) { + break; + } + + boolean queryContains = GetterUtil.getBoolean( + portletPreferences.getValue( + "queryContains" + i, StringPool.BLANK)); + boolean queryAndOperator = GetterUtil.getBoolean( + portletPreferences.getValue( + "queryAndOperator" + i, StringPool.BLANK)); + String queryName = portletPreferences.getValue( + "queryName" + i, StringPool.BLANK); + + if (Objects.equals(queryName, "keywords") && queryContains && + (queryAndOperator || (queryValues.length == 1))) { + + allKeywords = queryValues; + } + } + + return allKeywords; + } + @Override public String getScopeId(Group group, long scopeGroupId) { String key = null; @@ -1092,16 +1135,21 @@ private void _removeAndStoreSelection( portletPreferences.store(); } - private void _setCategoriesAndTags( + private void _setCategoriesAndKeywordsAndTags( AssetEntryQuery assetEntryQuery, PortletPreferences portletPreferences, long[] scopeGroupIds, long[] overrideAllAssetCategoryIds, - String[] overrideAllAssetTagNames) { + String[] overrideAllKeywords, String[] overrideAllAssetTagNames) { long[] allAssetCategoryIds = new long[0]; long[] anyAssetCategoryIds = new long[0]; long[] notAllAssetCategoryIds = new long[0]; long[] notAnyAssetCategoryIds = new long[0]; + String[] allKeywords = new String[0]; + String[] anyKeywords = new String[0]; + String[] notAllKeywords = new String[0]; + String[] notAnyKeywords = new String[0]; + String[] allAssetTagNames = new String[0]; String[] anyAssetTagNames = new String[0]; String[] notAllAssetTagNames = new String[0]; @@ -1140,6 +1188,20 @@ else if (!queryContains && queryAndOperator) { notAnyAssetCategoryIds = assetCategoryIds; } } + else if (Objects.equals(queryName, "keywords")) { + if (queryContains && queryAndOperator) { + allKeywords = queryValues; + } + else if (queryContains && !queryAndOperator) { + anyKeywords = queryValues; + } + else if (!queryContains && queryAndOperator) { + notAllKeywords = queryValues; + } + else { + notAnyKeywords = queryValues; + } + } else { if (queryContains && queryAndOperator) { allAssetTagNames = queryValues; @@ -1164,6 +1226,12 @@ else if (!queryContains && queryAndOperator) { assetEntryQuery.setAllCategoryIds(allAssetCategoryIds); + if (overrideAllKeywords != null) { + allKeywords = overrideAllKeywords; + } + + assetEntryQuery.setAllKeywords(allKeywords); + if (overrideAllAssetTagNames != null) { allAssetTagNames = overrideAllAssetTagNames; } @@ -1181,6 +1249,8 @@ else if (!queryContains && queryAndOperator) { assetEntryQuery.setAnyCategoryIds(anyAssetCategoryIds); + assetEntryQuery.setAnyKeywords(anyKeywords); + long[] anyAssetTagIds = _assetTagLocalService.getTagIds( siteGroupIds, anyAssetTagNames); @@ -1188,6 +1258,8 @@ else if (!queryContains && queryAndOperator) { assetEntryQuery.setNotAllCategoryIds(notAllAssetCategoryIds); + assetEntryQuery.setNotAllKeywords(notAllKeywords); + for (String assetTagName : notAllAssetTagNames) { long[] notAllAssetTagIds = _assetTagLocalService.getTagIds( siteGroupIds, assetTagName); @@ -1197,6 +1269,8 @@ else if (!queryContains && queryAndOperator) { assetEntryQuery.setNotAnyCategoryIds(notAnyAssetCategoryIds); + assetEntryQuery.setNotAnyKeywords(notAnyKeywords); + long[] notAnyAssetTagIds = _assetTagLocalService.getTagIds( siteGroupIds, notAnyAssetTagNames); diff --git a/modules/apps/asset/asset-publisher-web/src/main/resources/META-INF/resources/js/AutoField.soy b/modules/apps/asset/asset-publisher-web/src/main/resources/META-INF/resources/js/AutoField.soy index f242dfe3c27bbb..c3231e626e09c5 100644 --- a/modules/apps/asset/asset-publisher-web/src/main/resources/META-INF/resources/js/AutoField.soy +++ b/modules/apps/asset/asset-publisher-web/src/main/resources/META-INF/resources/js/AutoField.soy @@ -125,6 +125,7 @@ @@ -140,6 +141,19 @@ {param selectedItems: $rule.selectedItems ?: [] /} {param vocabularyIds: $vocabularyIds /} {/call} + {elseif $rule.type == 'keywords'} +
+ + + +
{else} {call com.liferay.asset.taglib.AssetTagsSelector.render} {param eventName: $namespace + 'selectTag' /} diff --git a/modules/apps/asset/asset-tags-selector-web/src/main/java/com/liferay/asset/tags/selector/web/internal/display/context/AssetTagsSelectorDisplayContext.java b/modules/apps/asset/asset-tags-selector-web/src/main/java/com/liferay/asset/tags/selector/web/internal/display/context/AssetTagsSelectorDisplayContext.java index 5a56631954f92a..324f3177529cad 100644 --- a/modules/apps/asset/asset-tags-selector-web/src/main/java/com/liferay/asset/tags/selector/web/internal/display/context/AssetTagsSelectorDisplayContext.java +++ b/modules/apps/asset/asset-tags-selector-web/src/main/java/com/liferay/asset/tags/selector/web/internal/display/context/AssetTagsSelectorDisplayContext.java @@ -43,9 +43,17 @@ public AssetTagsSelectorDisplayContext( RenderRequest renderRequest, RenderResponse renderResponse, HttpServletRequest httpServletRequest) { + this(renderRequest, renderResponse, httpServletRequest, true); + } + + public AssetTagsSelectorDisplayContext( + RenderRequest renderRequest, RenderResponse renderResponse, + HttpServletRequest httpServletRequest, boolean rowChecker) { + _renderRequest = renderRequest; _renderResponse = renderResponse; _httpServletRequest = httpServletRequest; + _rowChecker = rowChecker; } public String getEventName() { @@ -71,6 +79,18 @@ public String getOrderByType() { return _orderByType; } + public PortletURL getPortletURL() { + PortletURL portletURL = _renderResponse.createRenderURL(); + + portletURL.setParameter("eventName", getEventName()); + portletURL.setParameter("groupIds", StringUtil.merge(_getGroupIds())); + portletURL.setParameter("mvcPath", _getMvcPath()); + portletURL.setParameter( + "selectedTagNames", StringUtil.merge(getSelectedTagNames())); + + return portletURL; + } + public String[] getSelectedTagNames() { if (ArrayUtil.isNotEmpty(_selectedTagNames)) { return _selectedTagNames; @@ -92,7 +112,7 @@ public SearchContainer getTagsSearchContainer() { WebKeys.THEME_DISPLAY); SearchContainer tagsSearchContainer = new SearchContainer( - _renderRequest, _getPortletURL(), null, "there-are-no-tags"); + _renderRequest, getPortletURL(), null, "there-are-no-tags"); String orderByCol = _getOrderByCol(); @@ -111,8 +131,10 @@ public SearchContainer getTagsSearchContainer() { tagsSearchContainer.setOrderByType(orderByType); - tagsSearchContainer.setRowChecker( - new EntriesChecker(_renderRequest, _renderResponse)); + if (_rowChecker) { + tagsSearchContainer.setRowChecker( + new EntriesChecker(_renderRequest, _renderResponse)); + } int tagsCount = AssetTagServiceUtil.getTagsCount( themeDisplay.getScopeGroupId(), _getKeywords()); @@ -160,6 +182,17 @@ private String _getKeywords() { return _keywords; } + private String _getMvcPath() { + if (Validator.isNotNull(_mvcPath)) { + return _mvcPath; + } + + _mvcPath = ParamUtil.getString( + _httpServletRequest, "mvcPath", "/view.jsp"); + + return _mvcPath; + } + private String _getOrderByCol() { if (Validator.isNotNull(_orderByCol)) { return _orderByCol; @@ -171,24 +204,16 @@ private String _getOrderByCol() { return _orderByCol; } - private PortletURL _getPortletURL() { - PortletURL portletURL = _renderResponse.createRenderURL(); - - portletURL.setParameter("eventName", getEventName()); - portletURL.setParameter( - "selectedTagNames", StringUtil.merge(getSelectedTagNames())); - - return portletURL; - } - private String _eventName; private long[] _groupIds; private final HttpServletRequest _httpServletRequest; private String _keywords; + private String _mvcPath; private String _orderByCol; private String _orderByType; private final RenderRequest _renderRequest; private final RenderResponse _renderResponse; + private final boolean _rowChecker; private String[] _selectedTagNames; private SearchContainer _tagsSearchContainer; diff --git a/modules/apps/asset/asset-tags-selector-web/src/main/resources/META-INF/resources/init.jsp b/modules/apps/asset/asset-tags-selector-web/src/main/resources/META-INF/resources/init.jsp index 5e3abfb56ab501..bf2aa616ead08e 100644 --- a/modules/apps/asset/asset-tags-selector-web/src/main/resources/META-INF/resources/init.jsp +++ b/modules/apps/asset/asset-tags-selector-web/src/main/resources/META-INF/resources/init.jsp @@ -28,6 +28,9 @@ page import="com.liferay.portal.kernel.dao.search.SearchContainer" %><%@ page import="com.liferay.portal.kernel.json.JSONFactoryUtil" %><%@ page import="com.liferay.portal.kernel.util.HtmlUtil" %> +<%@ page import="java.util.HashMap" %><%@ +page import="java.util.Map" %> + diff --git a/modules/apps/asset/asset-tags-selector-web/src/main/resources/META-INF/resources/select_single.jsp b/modules/apps/asset/asset-tags-selector-web/src/main/resources/META-INF/resources/select_single.jsp new file mode 100644 index 00000000000000..1af2a5844ba498 --- /dev/null +++ b/modules/apps/asset/asset-tags-selector-web/src/main/resources/META-INF/resources/select_single.jsp @@ -0,0 +1,68 @@ +<%-- +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +--%> + +<%@ include file="/init.jsp" %> + +<% +assetTagsSelectorDisplayContext = new AssetTagsSelectorDisplayContext(renderRequest, renderResponse, request, false); +%> + + + + + + + + <% + Map data = new HashMap(); + + data.put("entityid", tag.getTagId()); + data.put("entityname", tag.getName()); + %> + + + + <%= HtmlUtil.escape(tag.getName()) %> + + + + + + + + + + const Util = Liferay.Util; + + Util.selectEntityHandler('#selectAssetTagFm', '<%= HtmlUtil.escapeJS(assetTagsSelectorDisplayContext.getEventName()) %>', true); + \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/.lfrbuild-portal b/modules/apps/asset/asset-vocabularies-selector-web/.lfrbuild-portal new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/modules/apps/asset/asset-vocabularies-selector-web/bnd.bnd b/modules/apps/asset/asset-vocabularies-selector-web/bnd.bnd new file mode 100644 index 00000000000000..c8bb8fd8ba6e08 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/bnd.bnd @@ -0,0 +1,11 @@ +Bundle-Name: Liferay Asset Vocabularies Selector Web +Bundle-SymbolicName: com.liferay.asset.vocabularies.selector.web +Bundle-Version: 3.0.0 +Provide-Capability:\ + soy;\ + type="asset-vocabularies-selector-web";\ + version:Version="${Bundle-Version}" +Require-Capability:\ + osgi.extender;\ + filter:="(&(osgi.extender=jsp.taglib)(uri=http://liferay.com/tld/soy))" +Web-ContextPath: /asset-vocabularies-selector-web \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/build.gradle b/modules/apps/asset/asset-vocabularies-selector-web/build.gradle new file mode 100644 index 00000000000000..6864906bd01128 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/build.gradle @@ -0,0 +1,14 @@ +dependencies { + compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "default" + compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "default" + compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "default" + compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.1" + compileOnly group: "javax.servlet.jsp", name: "javax.servlet.jsp-api", version: "2.3.1" + compileOnly group: "org.apache.felix", name: "org.apache.felix.http.servlet-api", version: "1.1.2" + compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0" + compileOnly project(":apps:frontend-taglib:frontend-taglib") + compileOnly project(":apps:frontend-taglib:frontend-taglib-soy") + compileOnly project(":apps:portal:portal-upgrade-api") + compileOnly project(":core:petra:petra-lang") + compileOnly project(":core:petra:petra-string") +} \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/package.json b/modules/apps/asset/asset-vocabularies-selector-web/package.json new file mode 100644 index 00000000000000..d760af906a5c46 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/package.json @@ -0,0 +1,16 @@ +{ + "dependencies": { + "frontend-js-web": "*", + "metal": "2.16.8", + "metal-component": "2.16.8", + "metal-soy": "2.16.8", + "metal-state": "2.16.8" + }, + "name": "asset-vocabularies-selector-web", + "scripts": { + "build": "liferay-npm-scripts build", + "checkFormat": "liferay-npm-scripts check", + "format": "liferay-npm-scripts fix" + }, + "version": "3.0.0" +} diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/contants/AssetVocabulariesSelectorPortletKeys.java b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/contants/AssetVocabulariesSelectorPortletKeys.java new file mode 100644 index 00000000000000..5a445a5963d567 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/contants/AssetVocabulariesSelectorPortletKeys.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.asset.vocabularies.selector.web.internal.contants; + +/** + * @author Raymond Augé + */ +public class AssetVocabulariesSelectorPortletKeys { + + public static final String ASSET_VOCABULARIES_SELECTOR = + "com_liferay_asset_vocabularies_selector_web_portlet_" + + "AssetVocabulariesSelectorPortlet"; + +} \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/display/context/AssetVocabulariesSelectorDisplayContext.java b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/display/context/AssetVocabulariesSelectorDisplayContext.java new file mode 100644 index 00000000000000..70c60b70dc8a71 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/display/context/AssetVocabulariesSelectorDisplayContext.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.asset.vocabularies.selector.web.internal.display.context; + +import com.liferay.asset.kernel.model.AssetVocabulary; +import com.liferay.asset.kernel.service.AssetVocabularyLocalService; +import com.liferay.asset.kernel.service.AssetVocabularyService; +import com.liferay.petra.string.StringBundler; +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONFactory; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.language.Language; +import com.liferay.portal.kernel.model.Group; +import com.liferay.portal.kernel.service.GroupLocalService; +import com.liferay.portal.kernel.theme.ThemeDisplay; +import com.liferay.portal.kernel.util.Html; +import com.liferay.portal.kernel.util.ParamUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.kernel.util.WebKeys; + +import java.util.List; + +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import javax.servlet.http.HttpServletRequest; + +/** + * @author Raymond Augé + */ +public class AssetVocabulariesSelectorDisplayContext { + + public AssetVocabulariesSelectorDisplayContext( + RenderRequest renderRequest, RenderResponse renderResponse, + HttpServletRequest httpServletRequest) { + + _renderRequest = renderRequest; + _renderResponse = renderResponse; + _httpServletRequest = httpServletRequest; + _assetVocabularyService = + (AssetVocabularyService)renderRequest.getAttribute( + "assetVocabularyService"); + _assetVocabularyLocalService = + (AssetVocabularyLocalService)renderRequest.getAttribute( + "assetVocabularyLocalService"); + _groupLocalService = (GroupLocalService)renderRequest.getAttribute( + "groupLocalService"); + _html = (Html)renderRequest.getAttribute("html"); + _jsonFactory = (JSONFactory)renderRequest.getAttribute("jsonFactory"); + _language = (Language)renderRequest.getAttribute("language"); + } + + public String getEventName() { + if (Validator.isNotNull(_eventName)) { + return _eventName; + } + + _eventName = ParamUtil.getString( + _httpServletRequest, "eventName", + _renderResponse.getNamespace() + "selectVocabulary"); + + return _eventName; + } + + public String getSelectedVocabularies() { + if (_selectedVocabularies != null) { + return _selectedVocabularies; + } + + _selectedVocabularies = ParamUtil.getString( + _httpServletRequest, "selectedVocabularies"); + + return _selectedVocabularies; + } + + public JSONArray getVocabulariesJSONArray() throws Exception { + JSONArray jsonArray = _jsonFactory.createJSONArray(); + + ThemeDisplay themeDisplay = + (ThemeDisplay)_httpServletRequest.getAttribute( + WebKeys.THEME_DISPLAY); + + long[] groupIds = getGroupIds(themeDisplay); + + List vocabularies = + _assetVocabularyService.getGroupsVocabularies(groupIds); + + for (AssetVocabulary vocabulary : vocabularies) { + JSONObject jsonObject = _jsonFactory.createJSONObject(); + + jsonObject.put( + "icon", "vocabularies" + ).put( + "id", vocabulary.getVocabularyId() + ).put( + "key", vocabulary.getName() + ).put( + "name", getVocabularyTitle(vocabulary.getVocabularyId()) + ); + + if (getSelectedVocabularies().contains( + String.valueOf(vocabulary.getVocabularyId()))) { + + jsonObject.put("selected", true); + } + + jsonArray.put(jsonObject); + } + + return jsonArray; + } + + public String getVocabularyTitle(long vocabularyId) throws PortalException { + ThemeDisplay themeDisplay = (ThemeDisplay)_renderRequest.getAttribute( + WebKeys.THEME_DISPLAY); + + AssetVocabulary assetVocabulary = + _assetVocabularyLocalService.fetchAssetVocabulary(vocabularyId); + + StringBundler sb = new StringBundler(5); + + String title = assetVocabulary.getTitle(themeDisplay.getLocale()); + + sb.append(_html.escape(title)); + + sb.append(StringPool.SPACE); + sb.append(StringPool.OPEN_PARENTHESIS); + + if (assetVocabulary.getGroupId() == themeDisplay.getCompanyGroupId()) { + sb.append(_language.get(_httpServletRequest, "global")); + } + else { + Group group = _groupLocalService.fetchGroup( + assetVocabulary.getGroupId()); + + sb.append(group.getDescriptiveName(themeDisplay.getLocale())); + } + + sb.append(StringPool.CLOSE_PARENTHESIS); + + return sb.toString(); + } + + private long[] getGroupIds(ThemeDisplay themeDisplay) { + if (_groupIds != null) { + return _groupIds; + } + + return _groupIds = ParamUtil.getLongValues( + _httpServletRequest, "groupIds", + new long[] { + themeDisplay.getCompanyGroupId(), themeDisplay.getScopeGroupId() + }); + } + + private final AssetVocabularyLocalService _assetVocabularyLocalService; + private final AssetVocabularyService _assetVocabularyService; + private String _eventName; + private long[] _groupIds; + private final GroupLocalService _groupLocalService; + private final Html _html; + private final HttpServletRequest _httpServletRequest; + private final JSONFactory _jsonFactory; + private final Language _language; + private final RenderRequest _renderRequest; + private final RenderResponse _renderResponse; + private String _selectedVocabularies; + +} \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/portlet/AssetVocabulariesSelectorBrowserPortletProvider.java b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/portlet/AssetVocabulariesSelectorBrowserPortletProvider.java new file mode 100644 index 00000000000000..87b8555ebfd7ac --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/portlet/AssetVocabulariesSelectorBrowserPortletProvider.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.asset.vocabularies.selector.web.internal.portlet; + +import com.liferay.asset.vocabularies.selector.web.internal.contants.AssetVocabulariesSelectorPortletKeys; +import com.liferay.portal.kernel.portlet.BasePortletProvider; +import com.liferay.portal.kernel.portlet.BrowsePortletProvider; + +import org.osgi.service.component.annotations.Component; + +/** + * @author Raymond Augé + */ +@Component( + immediate = true, + property = "model.class.name=com.liferay.asset.kernel.model.AssetVocabulary", + service = BrowsePortletProvider.class +) +public class AssetVocabulariesSelectorBrowserPortletProvider + extends BasePortletProvider implements BrowsePortletProvider { + + @Override + public String getPortletName() { + return AssetVocabulariesSelectorPortletKeys.ASSET_VOCABULARIES_SELECTOR; + } + +} \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/portlet/AssetVocabulariesSelectorPortlet.java b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/portlet/AssetVocabulariesSelectorPortlet.java new file mode 100644 index 00000000000000..f3066f64c5fa22 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/portlet/AssetVocabulariesSelectorPortlet.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.asset.vocabularies.selector.web.internal.portlet; + +import com.liferay.asset.kernel.model.AssetVocabulary; +import com.liferay.asset.kernel.service.AssetVocabularyLocalService; +import com.liferay.asset.kernel.service.AssetVocabularyService; +import com.liferay.asset.vocabularies.selector.web.internal.contants.AssetVocabulariesSelectorPortletKeys; +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONFactory; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.json.JSONUtil; +import com.liferay.portal.kernel.language.Language; +import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet; +import com.liferay.portal.kernel.service.GroupLocalService; +import com.liferay.portal.kernel.theme.ThemeDisplay; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.Html; +import com.liferay.portal.kernel.util.ParamUtil; +import com.liferay.portal.kernel.util.WebKeys; + +import java.io.IOException; + +import java.util.List; + +import javax.portlet.Portlet; +import javax.portlet.PortletException; +import javax.portlet.PortletRequest; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import javax.portlet.ResourceRequest; +import javax.portlet.ResourceResponse; + +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +/** + * @author Raymond Augé + */ +@Component( + immediate = true, + property = { + "com.liferay.portlet.add-default-resource=true", + "com.liferay.portlet.css-class-wrapper=portlet-asset-vocabularies-selector", + "com.liferay.portlet.header-portlet-css=/css/tree.css", + "com.liferay.portlet.private-request-attributes=false", + "com.liferay.portlet.private-session-attributes=false", + "com.liferay.portlet.render-weight=50", + "com.liferay.portlet.system=true", + "com.liferay.portlet.use-default-template=true", + "javax.portlet.display-name=Asset Vocabularies Selector", + "javax.portlet.init-param.template-path=/META-INF/resources/", + "javax.portlet.init-param.view-template=/view.jsp", + "javax.portlet.name=" + AssetVocabulariesSelectorPortletKeys.ASSET_VOCABULARIES_SELECTOR, + "javax.portlet.resource-bundle=content.Language", + "javax.portlet.security-role-ref=guest,power-user,user" + }, + service = Portlet.class +) +public class AssetVocabulariesSelectorPortlet extends MVCPortlet { + + @Override + public void serveResource( + ResourceRequest resourceRequest, ResourceResponse resourceResponse) + throws IOException, PortletException { + + String resourceID = GetterUtil.getString( + resourceRequest.getResourceID()); + + if (resourceID.equals("getVocabularies")) { + JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); + + ThemeDisplay themeDisplay = + (ThemeDisplay)resourceRequest.getAttribute( + WebKeys.THEME_DISPLAY); + + long[] groupIds = getGroupIds(resourceRequest, themeDisplay); + + List vocabularies = + _assetVocabularyService.getGroupsVocabularies(groupIds); + + for (AssetVocabulary vocabulary : vocabularies) { + JSONObject jsonObject = JSONUtil.put( + "icon", "vocabularies" + ).put( + "id", vocabulary.getVocabularyId() + ).put( + "key", vocabulary.getName() + ).put( + "name", vocabulary.getTitle(themeDisplay.getLocale()) + ); + + jsonArray.put(jsonObject); + } + + writeJSON(resourceRequest, resourceResponse, jsonArray.toString()); + } + else { + super.serveResource(resourceRequest, resourceResponse); + } + } + + @Override + protected void doDispatch( + RenderRequest renderRequest, RenderResponse renderResponse) + throws IOException, PortletException { + + renderRequest.setAttribute( + "assetVocabularyLocalService", _assetVocabularyLocalService); + renderRequest.setAttribute( + "assetVocabularyService", _assetVocabularyService); + renderRequest.setAttribute("groupLocalService", _groupLocalService); + renderRequest.setAttribute("html", _html); + renderRequest.setAttribute("jsonFactory", _jsonFactory); + renderRequest.setAttribute("language", _language); + + super.doDispatch(renderRequest, renderResponse); + } + + private long[] getGroupIds( + PortletRequest portletRequest, ThemeDisplay themeDisplay) { + + return ParamUtil.getLongValues( + portletRequest, "groupIds", + new long[] { + themeDisplay.getCompanyGroupId(), themeDisplay.getScopeGroupId() + }); + } + + @Reference + private AssetVocabularyLocalService _assetVocabularyLocalService; + + @Reference + private AssetVocabularyService _assetVocabularyService; + + @Reference + private GroupLocalService _groupLocalService; + + @Reference + private Html _html; + + @Reference + private JSONFactory _jsonFactory; + + @Reference + private Language _language; + +} \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/upgrade/AssetVocabulariesSelectorWebUpgrade.java b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/upgrade/AssetVocabulariesSelectorWebUpgrade.java new file mode 100644 index 00000000000000..decc4fa14d55f5 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/java/com/liferay/asset/vocabularies/selector/web/internal/upgrade/AssetVocabulariesSelectorWebUpgrade.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.asset.vocabularies.selector.web.internal.upgrade; + +import com.liferay.portal.kernel.upgrade.DummyUpgradeStep; +import com.liferay.portal.upgrade.registry.UpgradeStepRegistrator; + +import org.osgi.service.component.annotations.Component; + +/** + * @author Raymond Augé + */ +@Component(immediate = true, service = UpgradeStepRegistrator.class) +public class AssetVocabulariesSelectorWebUpgrade + implements UpgradeStepRegistrator { + + @Override + public void register(Registry registry) { + registry.register("0.0.0", "1.0.0", new DummyUpgradeStep()); + } + +} \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/css/tree.scss b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/css/tree.scss new file mode 100644 index 00000000000000..8b4cf79c6d52b8 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/css/tree.scss @@ -0,0 +1,145 @@ +$navigation-color: #869cad; +$spacer: 1rem; + +.select-vocabulary-filter { + background: #fff; + border-bottom: 1px solid #dee2e6; + margin-bottom: $spacer * 1.5; + padding: $spacer * 0.75; +} + +.vocabulary-tree { + .card { + border: 1px solid #e7e7ed; + box-shadow: none; + color: #6b6c7e; + margin-bottom: 0; + + &:hover { + background-color: #f7f8f9; + border-color: #cdced9; + color: #272833; + } + + &:focus { + box-shadow: 0 0 0 2px white, 0 0 0 4px #80afff; + color: #272833; + } + } + + .card-row-padded { + padding: 8px 12px; + } + + .selected .card { + background-color: #80acff; + border-color: #80acff; + color: #272833; + } + + .disabled { + .card, + .card:hover, + .card:focus { + background-color: #e7e7ed; + border: 1px solid #e7e7ed; + box-shadow: none; + color: #272833; + cursor: not-allowed; + outline: none; + } + } + + .treeview { + margin-left: -15px; + + @media (min-width: 768px) { + margin-left: -54px; + } + } + + .treeview-node { + margin-bottom: 0.5rem; + position: relative; + } + + .treeview-node-main { + float: none; + margin-bottom: 15px; + padding-left: 15px; + position: relative; + + &:not(.disabled) { + cursor: pointer; + } + + @media (min-width: 768px) { + margin-bottom: 24px; + padding-left: 24px; + } + } + + .treeview-nodes { + border-left: 2px solid $navigation-color; + list-style: none; + margin-left: 15px; + padding-left: 0; + + .treeview-nodes { + border-left-style: dashed; + border-left-width: 1px; + } + + @media (min-width: 768px) { + margin-left: 54px; + } + } + + .treeview-node-name { + margin-left: 2px; + } + + .treeview-node-toggler { + background-color: $navigation-color; + border-radius: 3px; + display: inline-block; + height: 14px; + left: 0; + margin-left: -8px; + margin-top: -8px; + position: absolute; + text-align: center; + top: 50%; + width: 14px; + + &:before { + color: #fff; + content: '+'; + display: block; + line-height: 11px; + + .win & { + line-height: 14px; + } + } + } + + .treeview-node-wrapper > .treeview-nodes { + display: none; + } + + .expanded { + > .treeview-node-main > .treeview-node-toggler:before { + content: '-'; + font-size: 21px; + + .win & { + line-height: 11px; + } + } + + > .treeview-nodes { + display: block; + } + } +} diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/init-ext.jsp b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/init-ext.jsp new file mode 100644 index 00000000000000..bd7e580a414ba1 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/init-ext.jsp @@ -0,0 +1,15 @@ +<%-- +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +--%> \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/init.jsp b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/init.jsp new file mode 100644 index 00000000000000..8e4f15824ac7b2 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/init.jsp @@ -0,0 +1,39 @@ +<%-- +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +--%> + +<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> + +<%@ taglib uri="http://liferay.com/tld/frontend" prefix="liferay-frontend" %><%@ +taglib uri="http://liferay.com/tld/soy" prefix="soy" %><%@ +taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %> + +<%@ page import="com.liferay.asset.vocabularies.selector.web.internal.display.context.AssetVocabulariesSelectorDisplayContext" %><%@ +page import="com.liferay.portal.kernel.util.HtmlUtil" %> + +<%@ page import="java.util.HashMap" %><%@ +page import="java.util.Map" %> + + + + + + + +<% +AssetVocabulariesSelectorDisplayContext assetVocabulariesSelectorDisplayContext = new AssetVocabulariesSelectorDisplayContext(renderRequest, renderResponse, request); +%> + +<%@ include file="/init-ext.jsp" %> \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/js/SelectVocabulary.es.js b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/js/SelectVocabulary.es.js new file mode 100644 index 00000000000000..5df7bcf7c5cbb0 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/js/SelectVocabulary.es.js @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +import 'frontend-taglib/cards_treeview/CardsTreeview.es'; +import 'metal'; +import 'metal-component'; +import {PortletBase} from 'frontend-js-web'; +import Soy from 'metal-soy'; +import {Config} from 'metal-state'; + +import templates from './SelectVocabulary.soy'; + +/** + * KeyBoardEvent enter key + * @review + * @type {!string} + */ + +const ENTER_KEY = 'Enter'; + +/** + * SelectVocabulary + * + * This component shows a list of available vocabularies to move content in and + * allows to filter them by searching. + */ + +class SelectVocabulary extends PortletBase { + /** + * Filters deep nested nodes based on a filtering value + * + * @type {Array.} nodes + * @type {String} filterVAlue + * @protected + */ + + filterSiblingNodes_(nodes, filterValue) { + let filteredNodes = []; + + nodes.forEach(node => { + if (node.name.toLowerCase().indexOf(filterValue) !== -1) { + filteredNodes.push(node); + } + + if (node.children) { + filteredNodes = filteredNodes.concat( + this.filterSiblingNodes_(node.children, filterValue) + ); + } + }); + + return filteredNodes; + } + + /** + * When the search form is submitted, nothing should happend, + * as filtering is performed on keypress. + * @param {KeyboardEvent} event + * @private + * @review + */ + + _handleSearchFormKeyDown(event) { + if (event.key === ENTER_KEY) { + event.preventDefault(); + event.stopImmediatePropagation(); + } + } + + /** + * Searchs for nodes by name based on a filtering value + * + * @param {!Event} event + * @protected + */ + + _searchNodes(event) { + if (!this.originalNodes) { + this.originalNodes = this.nodes; + } else { + this.nodes = this.originalNodes; + } + + const filterValue = event.delegateTarget.value.toLowerCase(); + + if (filterValue !== '') { + this.viewType = 'flat'; + this.nodes = this.filterSiblingNodes_(this.nodes, filterValue); + } else { + this.viewType = 'tree'; + } + } + + /** + * Fires item selector save event on selected node change + * + * @param {!Event} event + * @protected + */ + + _selectedNodeChange(event) { + const newVal = event.newVal; + let selectedNodes = this.selectedNodes_; + + if (!selectedNodes) { + selectedNodes = []; + } + + if (newVal) { + const data = {}; + newVal.forEach(node => { + data[node.id] = { + key: node.key, + value: node.name, + vocabularyId: node.id + }; + }); + + selectedNodes.forEach(node => { + if (newVal.indexOf(node) === -1) { + data[node.id] = { + key: node.key, + unchecked: true, + value: node.name, + vocabularyId: node.id + }; + } + }); + + selectedNodes = []; + + newVal.forEach(node => { + selectedNodes.push(node); + }); + + this.selectedNodes_ = selectedNodes; + + Liferay.Util.getOpener().Liferay.fire(this.itemSelectorSaveEvent, { + data + }); + } + } +} + +SelectVocabulary.STATE = { + /** + * Event name to fire on node selection + * @type {String} + */ + + itemSelectorSaveEvent: Config.string(), + + /** + * List of nodes + * @type {Array.} + */ + + nodes: Config.array().required(), + + /** + * Theme images root path + * @type {String} + */ + + pathThemeImages: Config.string().required(), + + /** + * Type of view to render. Accepted values are 'tree' and 'flat' + * @type {String} + */ + + viewType: Config.string().value('flat') +}; + +Soy.register(SelectVocabulary, templates); + +export default SelectVocabulary; diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/js/SelectVocabulary.soy b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/js/SelectVocabulary.soy new file mode 100644 index 00000000000000..01014ce7c26653 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/js/SelectVocabulary.soy @@ -0,0 +1,55 @@ +{namespace com.liferay.asset.vocabularies.selector.web.SelectVocabulary} + +/** + * This renders the main element. + */ +{template .render} + {@param nodes: list} + {@param pathThemeImages: string} + {@param? _handleSearchFormKeyDown: any} + {@param? _selectedNodeChange: any} + {@param? namespace: string} + {@param? viewType: string} + +
+ + +
+
+
+ {call liferay.frontend.CardsTreeview.render} + {param events: [ + 'selectedNodesChanged': $_selectedNodeChange + ]/} + {param nodes: $nodes /} + {param pathThemeImages: $pathThemeImages /} + {param viewType: $viewType /} + {/call} +
+
+
+
+{/template} \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/view.jsp b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/view.jsp new file mode 100644 index 00000000000000..bf8478899c06e8 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/META-INF/resources/view.jsp @@ -0,0 +1,33 @@ +<%-- +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +--%> + +<%@ include file="/init.jsp" %> + +<% +Map context = new HashMap<>(); + +context.put("itemSelectorSaveEvent", HtmlUtil.escapeJS(assetVocabulariesSelectorDisplayContext.getEventName())); +context.put("namespace", liferayPortletResponse.getNamespace()); +context.put("nodes", assetVocabulariesSelectorDisplayContext.getVocabulariesJSONArray()); +context.put("pathThemeImages", themeDisplay.getPathThemeImages()); +context.put("viewType", "flat"); +%> + + \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language.properties new file mode 100644 index 00000000000000..93c70684a53c31 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ar.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ar.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ar.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_bg.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_bg.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_bg.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ca.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ca.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ca.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_cs.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_cs.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_cs.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_da.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_da.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_da.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_de.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_de.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_de.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_el.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_el.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_el.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_en.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_en.properties new file mode 100644 index 00000000000000..93c70684a53c31 --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_en.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_es.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_es.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_es.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_et.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_et.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_et.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_eu.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_eu.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_eu.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_fa.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_fa.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_fa.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_fi.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_fi.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_fi.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_fr.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_fr.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_fr.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_gl.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_gl.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_gl.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_hi_IN.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_hi_IN.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_hi_IN.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_hr.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_hr.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_hr.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_hu.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_hu.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_hu.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_in.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_in.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_in.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_it.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_it.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_it.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_iw.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_iw.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_iw.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ja.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ja.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ja.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_kk.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_kk.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_kk.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ko.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ko.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ko.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_lo.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_lo.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_lo.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_lt.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_lt.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_lt.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_nb.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_nb.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_nb.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_nl.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_nl.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_nl.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_nl_BE.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_nl_BE.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_nl_BE.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_pl.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_pl.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_pl.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_pt_BR.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_pt_BR.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_pt_BR.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_pt_PT.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_pt_PT.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_pt_PT.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ro.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ro.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ro.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ru.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ru.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ru.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sk.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sk.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sk.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sl.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sl.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sl.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sr_RS.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sr_RS.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sr_RS.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sr_RS_latin.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sr_RS_latin.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sr_RS_latin.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sv.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sv.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_sv.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ta_IN.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ta_IN.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_ta_IN.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_th.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_th.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_th.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_tr.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_tr.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_tr.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_uk.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_uk.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_uk.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_vi.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_vi.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_vi.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_zh_CN.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_zh_CN.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_zh_CN.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_zh_TW.properties b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_zh_TW.properties new file mode 100644 index 00000000000000..fd6c274b1f939d --- /dev/null +++ b/modules/apps/asset/asset-vocabularies-selector-web/src/main/resources/content/Language_zh_TW.properties @@ -0,0 +1 @@ +javax.portlet.title.com_liferay_asset_vocabularies_selector_web_portlet_AssetVocabulariesSelectorPortlet=Asset Vocabularies Selector (Automatic Copy) \ No newline at end of file diff --git a/modules/apps/export-import/export-import-service/src/main/java/com/liferay/exportimport/internal/exportimport/content/processor/LayoutReferencesExportImportContentProcessor.java b/modules/apps/export-import/export-import-service/src/main/java/com/liferay/exportimport/internal/exportimport/content/processor/LayoutReferencesExportImportContentProcessor.java index a3a052d5c8ae7b..cf37fe956809d1 100644 --- a/modules/apps/export-import/export-import-service/src/main/java/com/liferay/exportimport/internal/exportimport/content/processor/LayoutReferencesExportImportContentProcessor.java +++ b/modules/apps/export-import/export-import-service/src/main/java/com/liferay/exportimport/internal/exportimport/content/processor/LayoutReferencesExportImportContentProcessor.java @@ -52,6 +52,7 @@ import java.util.Locale; import java.util.Map; +import java.util.TreeMap; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; @@ -121,14 +122,14 @@ protected String replaceExportHostname( LayoutSet publicLayoutSet = group.getPublicLayoutSet(); - String publicLayoutSetVirtualHostname = - publicLayoutSet.getVirtualHostname(); + TreeMap publicLayoutSetVirtualHostnames = + publicLayoutSet.getVirtualHostnames(); String portalUrl = StringPool.BLANK; - if (Validator.isNotNull(publicLayoutSetVirtualHostname)) { + if (!publicLayoutSetVirtualHostnames.isEmpty()) { portalUrl = _portal.getPortalURL( - publicLayoutSetVirtualHostname, serverPort, secure); + publicLayoutSetVirtualHostnames.firstKey(), serverPort, secure); if (url.startsWith(portalUrl)) { if (secure) { @@ -144,12 +145,13 @@ protected String replaceExportHostname( LayoutSet privateLayoutSet = group.getPrivateLayoutSet(); - String privateLayoutSetVirtualHostname = - privateLayoutSet.getVirtualHostname(); + TreeMap privateLayoutSetVirtualHostnames = + privateLayoutSet.getVirtualHostnames(); - if (Validator.isNotNull(privateLayoutSetVirtualHostname)) { + if (!privateLayoutSetVirtualHostnames.isEmpty()) { portalUrl = _portal.getPortalURL( - privateLayoutSetVirtualHostname, serverPort, secure); + privateLayoutSetVirtualHostnames.firstKey(), serverPort, + secure); if (url.startsWith(portalUrl)) { if (secure) { @@ -558,17 +560,23 @@ protected String replaceImportLayoutReferences( company.getVirtualHostname(), serverPort, false); } - if (Validator.isNotNull(privateLayoutSet.getVirtualHostname())) { + TreeMap privateVirtualHostnames = + privateLayoutSet.getVirtualHostnames(); + + if (!privateVirtualHostnames.isEmpty()) { privateLayoutSetPortalURL = _portal.getPortalURL( - privateLayoutSet.getVirtualHostname(), serverPort, false); + privateVirtualHostnames.firstKey(), serverPort, false); } else { privateLayoutSetPortalURL = companyPortalURL; } - if (Validator.isNotNull(publicLayoutSet.getVirtualHostname())) { + TreeMap publicVirtualHostnames = + publicLayoutSet.getVirtualHostnames(); + + if (!publicVirtualHostnames.isEmpty()) { publicLayoutSetPortalURL = _portal.getPortalURL( - publicLayoutSet.getVirtualHostname(), serverPort, false); + publicVirtualHostnames.firstKey(), serverPort, false); } else { publicLayoutSetPortalURL = companyPortalURL; @@ -587,16 +595,20 @@ protected String replaceImportLayoutReferences( company.getVirtualHostname(), secureSecurePort, true); } - if (Validator.isNotNull(privateLayoutSet.getVirtualHostname())) { + TreeMap privateVirtualHostnames = + privateLayoutSet.getVirtualHostnames(); + + if (!privateVirtualHostnames.isEmpty()) { privateLayoutSetSecurePortalURL = _portal.getPortalURL( - privateLayoutSet.getVirtualHostname(), secureSecurePort, - true); + privateVirtualHostnames.firstKey(), secureSecurePort, true); } - if (Validator.isNotNull(publicLayoutSet.getVirtualHostname())) { + TreeMap publicVirtualHostnames = + publicLayoutSet.getVirtualHostnames(); + + if (!publicVirtualHostnames.isEmpty()) { publicLayoutSetSecurePortalURL = _portal.getPortalURL( - publicLayoutSet.getVirtualHostname(), secureSecurePort, - true); + publicVirtualHostnames.firstKey(), secureSecurePort, true); } } diff --git a/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/internal/util/JournalUtil.java b/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/internal/util/JournalUtil.java index f39f3e5ee470b5..8e7bdb9e57806c 100644 --- a/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/internal/util/JournalUtil.java +++ b/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/internal/util/JournalUtil.java @@ -73,6 +73,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.TreeMap; import javax.portlet.PortletRequest; import javax.portlet.PortletURL; @@ -762,10 +763,11 @@ else if (group.isUserGroup()) { String layoutSetFriendlyUrl = themeDisplay.getI18nPath(); - String virtualHostname = layoutSet.getVirtualHostname(); + TreeMap virtualHostnames = + layoutSet.getVirtualHostnames(); - if (Validator.isNull(virtualHostname) || - !virtualHostname.equals(themeDisplay.getServerName())) { + if (virtualHostnames.isEmpty() || + !virtualHostnames.containsKey(themeDisplay.getServerName())) { layoutSetFriendlyUrl = friendlyUrlCurrent + group.getFriendlyURL(); } @@ -838,10 +840,11 @@ else if (group.isUserGroup()) { String layoutSetFriendlyUrl = themeDisplayModel.getI18nPath(); - String virtualHostname = layoutSet.getVirtualHostname(); + TreeMap virtualHostnames = + layoutSet.getVirtualHostnames(); - if (Validator.isNull(virtualHostname) || - !virtualHostname.equals(themeDisplayModel.getServerName())) { + if (virtualHostnames.isEmpty() || + !virtualHostnames.containsKey(themeDisplayModel.getServerName())) { layoutSetFriendlyUrl = friendlyUrlCurrent + group.getFriendlyURL(); } diff --git a/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/init.jsp b/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/init.jsp index 1a045ce1c5da25..9bd6c653eda692 100644 --- a/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/init.jsp +++ b/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/init.jsp @@ -166,7 +166,8 @@ page import="java.util.List" %><%@ page import="java.util.Locale" %><%@ page import="java.util.Map" %><%@ page import="java.util.Objects" %><%@ -page import="java.util.ResourceBundle" %> +page import="java.util.ResourceBundle" %><%@ +page import="java.util.TreeMap" %> <%@ page import="javax.portlet.PortletRequest" %><%@ page import="javax.portlet.PortletURL" %><%@ diff --git a/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout/details.jsp b/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout/details.jsp index 76f2bbf554018c..34724e7cf7949e 100644 --- a/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout/details.jsp +++ b/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout/details.jsp @@ -44,9 +44,9 @@ StringBuilder friendlyURLBase = new StringBuilder(); LayoutSet layoutSet = selLayout.getLayoutSet(); - String virtualHostname = layoutSet.getVirtualHostname(); + TreeMap virtualHostnames = layoutSet.getVirtualHostnames(); - if (Validator.isNull(virtualHostname) || (friendlyURLBase.indexOf(virtualHostname) == -1)) { + if (virtualHostnames.isEmpty() || !_matchesHostname(friendlyURLBase, virtualHostnames)) { friendlyURLBase.append(group.getPathFriendlyURL(layoutsAdminDisplayContext.isPrivateLayout(), themeDisplay)); friendlyURLBase.append(HttpUtil.decodeURL(group.getFriendlyURL())); } @@ -205,4 +205,16 @@ StringBuilder friendlyURLBase = new StringBuilder(); } ); } - \ No newline at end of file + + +<%! +private boolean _matchesHostname(StringBuilder friendlyURLBase, TreeMap virtualHostnames) { + for (String virtualHostname : virtualHostnames.keySet()) { + if (friendlyURLBase.indexOf(virtualHostname) != -1) { + return true; + } + } + + return false; +} +%> \ No newline at end of file diff --git a/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout_set/sitemap.jsp b/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout_set/sitemap.jsp index ca57e716adc2b4..daed3e94f64516 100644 --- a/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout_set/sitemap.jsp +++ b/modules/apps/layout/layout-admin-web/src/main/resources/META-INF/resources/layout_set/sitemap.jsp @@ -23,7 +23,9 @@ String sitemapUrl = PortalUtil.getPortalURL(request) + themeDisplay.getPathConte LayoutSet layoutSet = layoutsAdminDisplayContext.getSelLayoutSet(); -if (!host.equals(layoutSet.getVirtualHostname())) { +TreeMap virtualHostnames = layoutSet.getVirtualHostnames(); + +if (!virtualHostnames.containsKey(host)) { sitemapUrl += "?groupId=" + layoutsAdminDisplayContext.getLiveGroupId() + "&privateLayout=" + layoutsAdminDisplayContext.isPrivateLayout(); } %> diff --git a/modules/apps/layout/layout-impl/src/main/java/com/liferay/layout/internal/model/adapter/StagedLayoutSetImpl.java b/modules/apps/layout/layout-impl/src/main/java/com/liferay/layout/internal/model/adapter/StagedLayoutSetImpl.java index 9ca54097eb10ef..90c8c35e384434 100644 --- a/modules/apps/layout/layout-impl/src/main/java/com/liferay/layout/internal/model/adapter/StagedLayoutSetImpl.java +++ b/modules/apps/layout/layout-impl/src/main/java/com/liferay/layout/internal/model/adapter/StagedLayoutSetImpl.java @@ -44,6 +44,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.TreeMap; /** * @author Máté Thurzó @@ -308,11 +309,21 @@ public String getUuid() { return String.valueOf(_layoutSet.isPrivateLayout()); } + /** + * @deprecated As of Mueller (7.2.x), replaced by {@link + #getVirtualHostnames()} + */ + @Deprecated @Override public String getVirtualHostname() { return _layoutSet.getVirtualHostname(); } + @Override + public TreeMap getVirtualHostnames() { + return _layoutSet.getVirtualHostnames(); + } + @Override public boolean hasSetModifiedDate() { return _layoutSet.hasSetModifiedDate(); @@ -537,11 +548,21 @@ public void setUuid(String uuid) { throw new UnsupportedOperationException(); } + /** + * @deprecated As of Mueller (7.2.x), replaced by {@link + #setVirtualHostnames(TreeMap)} + */ + @Deprecated @Override public void setVirtualHostname(String virtualHostname) { _layoutSet.setVirtualHostname(virtualHostname); } + @Override + public void setVirtualHostnames(TreeMap virtualHostnames) { + _layoutSet.setVirtualHostnames(virtualHostnames); + } + @Override public CacheModel toCacheModel() { return _layoutSet.toCacheModel(); diff --git a/modules/apps/nested-portlets/nested-portlets-web/src/main/java/com/liferay/nested/portlets/web/internal/display/context/NestedPortletsDisplayContext.java b/modules/apps/nested-portlets/nested-portlets-web/src/main/java/com/liferay/nested/portlets/web/internal/display/context/NestedPortletsDisplayContext.java index 00fd5c9cf30d90..da07e67a490569 100644 --- a/modules/apps/nested-portlets/nested-portlets-web/src/main/java/com/liferay/nested/portlets/web/internal/display/context/NestedPortletsDisplayContext.java +++ b/modules/apps/nested-portlets/nested-portlets-web/src/main/java/com/liferay/nested/portlets/web/internal/display/context/NestedPortletsDisplayContext.java @@ -23,11 +23,11 @@ import com.liferay.portal.kernel.theme.PortletDisplay; import com.liferay.portal.kernel.theme.ThemeDisplay; import com.liferay.portal.kernel.util.ListUtil; -import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.WebKeys; import com.liferay.portal.plugin.PluginUtil; import java.util.List; +import java.util.TreeMap; import javax.servlet.DispatcherType; import javax.servlet.http.HttpServletRequest; @@ -162,10 +162,13 @@ private boolean _isVirtualHostRequest( LayoutSet layoutSet = (LayoutSet)httpServletRequest.getAttribute( WebKeys.VIRTUAL_HOST_LAYOUT_SET); - if ((layoutSet != null) && - Validator.isNotNull(layoutSet.getVirtualHostname())) { + if (layoutSet != null) { + TreeMap virtualHostnames = + layoutSet.getVirtualHostnames(); - return true; + if (!virtualHostnames.isEmpty()) { + return true; + } } return false; diff --git a/modules/apps/portal/portal-servlet-test/src/testIntegration/java/com/liferay/portal/servlet/filters/multihost/locale/test/MultiVirtualHostLocaleFilterTest.java b/modules/apps/portal/portal-servlet-test/src/testIntegration/java/com/liferay/portal/servlet/filters/multihost/locale/test/MultiVirtualHostLocaleFilterTest.java new file mode 100644 index 00000000000000..f72878677b4d04 --- /dev/null +++ b/modules/apps/portal/portal-servlet-test/src/testIntegration/java/com/liferay/portal/servlet/filters/multihost/locale/test/MultiVirtualHostLocaleFilterTest.java @@ -0,0 +1,255 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.servlet.filters.multihost.locale.test; + +import com.liferay.arquillian.extension.junit.bridge.junit.Arquillian; +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.exception.AvailableLocaleException; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.language.LanguageUtil; +import com.liferay.portal.kernel.model.LayoutSet; +import com.liferay.portal.kernel.model.VirtualHost; +import com.liferay.portal.kernel.service.LayoutSetLocalService; +import com.liferay.portal.kernel.service.VirtualHostLocalService; +import com.liferay.portal.kernel.test.rule.AggregateTestRule; +import com.liferay.portal.kernel.test.util.TestPropsValues; +import com.liferay.portal.kernel.util.LocaleUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.kernel.util.WebKeys; +import com.liferay.portal.servlet.filters.absoluteredirects.AbsoluteRedirectsFilter; +import com.liferay.portal.test.rule.Inject; +import com.liferay.portal.test.rule.LiferayIntegrationTestRule; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.mock.web.MockHttpServletResponse; + +/** + * @author Noemi Zamarripa + */ +@RunWith(Arquillian.class) +public class MultiVirtualHostLocaleFilterTest { + + @ClassRule + @Rule + public static final AggregateTestRule aggregateTestRule = + new LiferayIntegrationTestRule(); + + @Before + public void setUp() throws PortalException { + _groupId = TestPropsValues.getGroupId(); + _availableLocales = LanguageUtil.getAvailableLocales(_groupId); + + LayoutSet layoutSet = _layoutSetLocalService.getLayoutSet( + _groupId, false); + + _layoutSetId = layoutSet.getLayoutSetId(); + + _treeMap = new TreeMap<>(); + } + + @After + public void tearDown() throws PortalException { + for (String hostname : _treeMap.keySet()) { + VirtualHost virtualHost = _virtualHostLocalService.getVirtualHost( + hostname); + + _virtualHostLocalService.deleteVirtualHost(virtualHost); + } + } + + @Test + public void testMultipleVirtualHostsWithLocale() throws Exception { + _treeMap.put(_TESTHOST_FR, _LANGUAGE_ID_FR); + _treeMap.put(_TESTHOST_ES, _LANGUAGE_ID_ES); + + _layoutSetLocalService.updateVirtualHosts(_groupId, false, _treeMap); + + for (Map.Entry entry : _treeMap.entrySet()) { + String hostname = entry.getKey(); + String languageId = entry.getValue(); + + _setupRequest(hostname, languageId); + + _invokeFilter(); + + VirtualHost virtualHost = _virtualHostLocalService.getVirtualHost( + hostname); + + Assert.assertEquals( + virtualHost.getLanguageId(), + _mockHttpServletRequest.getAttribute(WebKeys.I18N_LANGUAGE_ID)); + + LayoutSet layoutSet = + (LayoutSet)_mockHttpServletRequest.getAttribute( + WebKeys.VIRTUAL_HOST_LAYOUT_SET); + + Assert.assertEquals(_layoutSetId, layoutSet.getLayoutSetId()); + + _cleanUpRequest(); + } + } + + @Test + public void testMultipleVirtualHostsWithoutLocale() throws Exception { + _treeMap.put(_TESTHOST_FR, StringPool.BLANK); + _treeMap.put(_TESTHOST_ES, StringPool.BLANK); + + _layoutSetLocalService.updateVirtualHosts(_groupId, false, _treeMap); + + for (Map.Entry entry : _treeMap.entrySet()) { + String hostname = entry.getKey(); + String languageId = entry.getValue(); + + _setupRequest(hostname, languageId); + + _invokeFilter(); + + LayoutSet layoutSet = + (LayoutSet)_mockHttpServletRequest.getAttribute( + WebKeys.VIRTUAL_HOST_LAYOUT_SET); + + Assert.assertEquals(_layoutSetId, layoutSet.getLayoutSetId()); + + _cleanUpRequest(); + } + } + + @Test + public void testSingleVirtualHostWithLocale() throws Exception { + _treeMap.put(_TESTHOST_DE, _LANGUAGE_ID_DE); + + _layoutSetLocalService.updateVirtualHosts(_groupId, false, _treeMap); + + String hostname = _treeMap.firstKey(); + + _setupRequest(hostname, _treeMap.get(hostname)); + + _invokeFilter(); + + VirtualHost virtualHost = _virtualHostLocalService.getVirtualHost( + hostname); + + Assert.assertEquals( + virtualHost.getLanguageId(), + _mockHttpServletRequest.getAttribute(WebKeys.I18N_LANGUAGE_ID)); + + LayoutSet layoutSet = (LayoutSet)_mockHttpServletRequest.getAttribute( + WebKeys.VIRTUAL_HOST_LAYOUT_SET); + + Assert.assertEquals(_layoutSetId, layoutSet.getLayoutSetId()); + } + + @Test + public void testSingleVirtualHostWithoutLocale() throws Exception { + _treeMap.put(_TESTHOST_DE, StringPool.BLANK); + + _layoutSetLocalService.updateVirtualHosts(_groupId, false, _treeMap); + + String hostname = _treeMap.firstKey(); + + _setupRequest(hostname, _treeMap.get(hostname)); + + _invokeFilter(); + + LayoutSet layoutSet = (LayoutSet)_mockHttpServletRequest.getAttribute( + WebKeys.VIRTUAL_HOST_LAYOUT_SET); + + Assert.assertEquals(_layoutSetId, layoutSet.getLayoutSetId()); + } + + private void _cleanUpRequest() { + _mockHttpServletRequest.invalidate(); + } + + private void _invokeFilter() throws Exception { + _absoluteRedirectsFilter.doFilterTry( + _mockHttpServletRequest, new MockHttpServletResponse()); + } + + private void _setupRequest(String hostname, String languageId) + throws AvailableLocaleException { + + _mockHttpServletRequest = new MockHttpServletRequest(); + + if (Validator.isNotNull(languageId)) { + List locales = new ArrayList<>(); + + Locale locale = LocaleUtil.fromLanguageId(languageId); + + locales.add(locale); + + if (!_availableLocales.contains(locale)) { + throw new AvailableLocaleException(languageId); + } + + _mockHttpServletRequest.setPreferredLocales(locales); + } + + _mockHttpServletRequest.setRemoteHost(hostname); + _mockHttpServletRequest.setServerName(hostname); + _mockHttpServletRequest.setServerPort(_SERVER_PORT); + _mockHttpServletRequest.setRequestURI(_WEB_GUEST); + _mockHttpServletRequest.addHeader(_HOST, hostname); + } + + private static final String _HOST = "Host"; + + private static final String _LANGUAGE_ID_DE = "de_DE"; + + private static final String _LANGUAGE_ID_ES = "es_ES"; + + private static final String _LANGUAGE_ID_FR = "fr_FR"; + + private static final int _SERVER_PORT = 8080; + + private static final String _TESTHOST_DE = "testhost.de"; + + private static final String _TESTHOST_ES = "testhost.es"; + + private static final String _TESTHOST_FR = "testhost.fr"; + + private static final String _WEB_GUEST = "/web/guest"; + + private static Set _availableLocales; + private static long _groupId; + private static long _layoutSetId; + + @Inject + private static LayoutSetLocalService _layoutSetLocalService; + + @Inject + private static VirtualHostLocalService _virtualHostLocalService; + + private final AbsoluteRedirectsFilter _absoluteRedirectsFilter = + new AbsoluteRedirectsFilter(); + private MockHttpServletRequest _mockHttpServletRequest; + private TreeMap _treeMap; + +} \ No newline at end of file diff --git a/modules/apps/segments/segments-asah-connector/src/main/java/com/liferay/segments/asah/connector/internal/client/model/util/ExperimentUtil.java b/modules/apps/segments/segments-asah-connector/src/main/java/com/liferay/segments/asah/connector/internal/client/model/util/ExperimentUtil.java index 2f539008f1f8b3..3fb808d0de2c82 100644 --- a/modules/apps/segments/segments-asah-connector/src/main/java/com/liferay/segments/asah/connector/internal/client/model/util/ExperimentUtil.java +++ b/modules/apps/segments/segments-asah-connector/src/main/java/com/liferay/segments/asah/connector/internal/client/model/util/ExperimentUtil.java @@ -27,7 +27,6 @@ import com.liferay.portal.kernel.util.Portal; import com.liferay.portal.kernel.util.StringBundler; import com.liferay.portal.kernel.util.StringUtil; -import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.util.PropsValues; import com.liferay.segments.asah.connector.internal.client.model.Experiment; import com.liferay.segments.asah.connector.internal.client.model.ExperimentStatus; @@ -46,6 +45,7 @@ import java.util.List; import java.util.Locale; +import java.util.TreeMap; /** * @author Sarai Díaz @@ -182,8 +182,11 @@ private static String _getLayoutFullURL( LayoutSet layoutSet = layout.getLayoutSet(); - if (Validator.isNotNull(layoutSet.getVirtualHostname())) { - virtualHostname = layoutSet.getVirtualHostname(); + TreeMap virtualHostnames = + layoutSet.getVirtualHostnames(); + + if (!virtualHostnames.isEmpty()) { + virtualHostname = virtualHostnames.firstKey(); } else { Company company = companyLocalService.getCompany( diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language.properties index 67895e808d0847..0772bfa4dbdc94 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. equals=Equals estimated-time-to-declare-winner=Estimated Time to Declare Winner +field.asset-tag-ids=Tag field.browser=Browser field.cookies=Cookies +field.country=Country field.date-modified=Date Modified field.device-brand=Device Brand field.device-model=Device Model @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path field.organization-id=Organization field.parent-organization-id=Parent Organization field.referrer-url=Referrer URL +field.region=Region field.request-parameters=Request Parameters field.role-ids=Role field.screen-name=Screen Name diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ar.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ar.properties index cc3f1db2650047..86d3c37c0edcd9 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ar.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ar.properties @@ -51,8 +51,10 @@ enable-content-recommendation=تمكين توصية المحتوى (Automatic Tr enable-content-recommendation-help=تمكين هذا الخيار لتصفية المحتوى مع شروط اهتمام المستخدم. (Automatic Translation) equals=يساوي estimated-time-to-declare-winner=الوقت المقدر لإعلان الفائز +field.asset-tag-ids=Tag (Automatic Copy) field.browser=المتصفح field.cookies=ملفات تعريف الارتباط +field.country=Country (Automatic Copy) field.date-modified=تاريخ التعديل field.device-brand=العلامة التجارية للجهاز field.device-model=طراز الجهاز @@ -72,6 +74,7 @@ field.name-tree-path=مسار شجرة الاسم field.organization-id=المنظمة field.parent-organization-id=المؤسسة الأصل field.referrer-url=عنوان URL لجهة الإحالة +field.region=Region (Automatic Copy) field.request-parameters=معلمات الطلب (Automatic Translation) field.role-ids=الدور field.screen-name=الإسم الظاهر diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_bg.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_bg.properties index 90b31c5e48f009..2c78ee79454aba 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_bg.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_bg.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Разрешаване на препоръка з enable-content-recommendation-help=Активирайте тази опция, за да филтрирате съдържанието с условията на потребителя за интерес. (Automatic Translation) equals=Е равно (Automatic Translation) estimated-time-to-declare-winner=Очаквано време за обявяване на победителя (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Браузър (Automatic Translation) field.cookies=Бисквитки (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Дата на промяна (Automatic Translation) field.device-brand=Устройството марка (Automatic Translation) field.device-model=Модел на устройството (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Йерархичният път (Automatic Translation) field.organization-id=Организация (Automatic Translation) field.parent-organization-id=Родителската организация (Automatic Translation) field.referrer-url=Препращащият URL адрес (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Параметри на заявката (Automatic Translation) field.role-ids=Роля (Automatic Translation) field.screen-name=Екранно име (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ca.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ca.properties index 8ec3e27e994dd9..3e49314970571b 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ca.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ca.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Habiliteu la recomanació de contingut enable-content-recommendation-help=Habiliteu aquesta opció per filtrar el contingut amb els termes d'interès de l'usuari. equals=Iguals estimated-time-to-declare-winner=Temps estimat per declarar el guanyador +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Navegador field.cookies=Galetes +field.country=Country (Automatic Copy) field.date-modified=Data de modificació field.device-brand=Marca del dispositiu field.device-model=Model del dispositiu @@ -72,6 +74,7 @@ field.name-tree-path=Camí de l'arbre de noms field.organization-id=Organització field.parent-organization-id=Organització principal field.referrer-url=URL del recomanador +field.region=Region (Automatic Copy) field.request-parameters=Paràmetres de sol·licitud field.role-ids=Rol field.screen-name=Nom d'usuari diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_cs.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_cs.properties index f7b54da38fc265..d077b8e355a80c 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_cs.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_cs.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Povolit doporučení obsahu (Automatic Translation enable-content-recommendation-help=Povolte tuto volbu, pokud chcete filtrovat obsah s úrokovými podmínkami uživatele. (Automatic Translation) equals=Rovná se (Automatic Translation) estimated-time-to-declare-winner=Odhadovaný čas pro deklaraci vítěze (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Prohlížeč (Automatic Translation) field.cookies=Soubory cookie (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Datum změny (Automatic Translation) field.device-brand=Značka zařízení (Automatic Translation) field.device-model=Model zařízení (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchická cesta (Automatic Translation) field.organization-id=Organizace (Automatic Translation) field.parent-organization-id=Nadřazená organizace (Automatic Translation) field.referrer-url=Adresu URL odkazujícího serveru (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Parametry požadavku (Automatic Translation) field.role-ids=Role (Automatic Translation) field.screen-name=Název obrazovky (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_da.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_da.properties index ea3adddb404417..94cced791a5aa3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_da.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_da.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_de.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_de.properties index bb68352170d45c..b5f95ed78541e3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_de.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_de.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Inhaltsempfehlung aktivieren enable-content-recommendation-help=Aktivieren Sie diese Option, um den Inhalt nach den Interessen des Benutzers zu filtern. equals=Ist gleich estimated-time-to-declare-winner=Geschätzte Zeit bis zur Verkündung des Siegers +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser field.cookies=Cookies +field.country=Country (Automatic Copy) field.date-modified=Änderungsdatum field.device-brand=Gerätemarke field.device-model=Gerätemodell @@ -72,6 +74,7 @@ field.name-tree-path=Name des Verzeichnispfades field.organization-id=Organisation field.parent-organization-id=Übergeordnete Organisation field.referrer-url=Referrer-URL +field.region=Region (Automatic Copy) field.request-parameters=Anfrageparameter field.role-ids=Rolle field.screen-name=Benutzername diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_el.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_el.properties index 54bfdc27097bcb..1ef600b2c8c7fb 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_el.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_el.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Ενεργοποίηση σύστασης περι enable-content-recommendation-help=Ενεργοποιήστε αυτήν την επιλογή για να φιλτράρετε το περιεχόμενο με τους όρους ενδιαφέροντος του χρήστη. (Automatic Translation) equals=Ισούται με (Automatic Translation) estimated-time-to-declare-winner=Εκτιμώμενος χρόνος για τη διακήρυξη του νικητή (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Πρόγραμμα περιήγησης (Automatic Translation) field.cookies=Τα cookies (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Ημερομηνία τροποποίησης (Automatic Translation) field.device-brand=Συσκευή μάρκα (Automatic Translation) field.device-model=Μοντέλο συσκευής (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Διαδρομή ιεραρχίας (Automatic Translation) field.organization-id=Οργάνωση (Automatic Translation) field.parent-organization-id=Μητρική οργάνωση (Automatic Translation) field.referrer-url=Referrer URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Παράμετροι αίτησης (Automatic Translation) field.role-ids=Ρόλο (Automatic Translation) field.screen-name=Όνομα οθόνης (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_en.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_en.properties index 67895e808d0847..0772bfa4dbdc94 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_en.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_en.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. equals=Equals estimated-time-to-declare-winner=Estimated Time to Declare Winner +field.asset-tag-ids=Tag field.browser=Browser field.cookies=Cookies +field.country=Country field.date-modified=Date Modified field.device-brand=Device Brand field.device-model=Device Model @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path field.organization-id=Organization field.parent-organization-id=Parent Organization field.referrer-url=Referrer URL +field.region=Region field.request-parameters=Request Parameters field.role-ids=Role field.screen-name=Screen Name diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_es.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_es.properties index 277178fd9082ca..116ad6763f8a70 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_es.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_es.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Habilitar recomendación de contenido enable-content-recommendation-help=Habilite esta opción para filtrar el contenido con las condiciones de interés del usuario. equals=Igual estimated-time-to-declare-winner=Tiempo estimado para declarar el ganador +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Navegador field.cookies=Cookies +field.country=Country (Automatic Copy) field.date-modified=Fecha de modificación field.device-brand=Marca de dispositivo field.device-model=Modelo de dispositivo @@ -72,6 +74,7 @@ field.name-tree-path=Ruta del árbol de nombres field.organization-id=Organización field.parent-organization-id=Organización padre field.referrer-url=URL de referencia +field.region=Region (Automatic Copy) field.request-parameters=Parámetros de la petición field.role-ids=Rol field.screen-name=Nombre de usuario diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_et.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_et.properties index 27d805613731f7..6c74c77ba961bb 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_et.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_et.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Luba Sisusoovitus (Automatic Translation) enable-content-recommendation-help=Lubage see suvand sisu filtreerimiseks kasutaja huvide tingimustega. (Automatic Translation) equals=Võrdub (Automatic Translation) estimated-time-to-declare-winner=Hinnanguline aeg võitja deklareerimiseks (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Brauser (Automatic Translation) field.cookies=Küpsised (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Muutmise kuupäev (Automatic Translation) field.device-brand=Seadme Mark (Automatic Translation) field.device-model=Seadme mudel (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarhia tee (Automatic Translation) field.organization-id=Organisatsiooni (Automatic Translation) field.parent-organization-id=Emaettevõttele (Automatic Translation) field.referrer-url=Viitav URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Taotle parameetreid (Automatic Translation) field.role-ids=Rolli (Automatic Translation) field.screen-name=Kasutajanimi (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_eu.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_eu.properties index ea3adddb404417..94cced791a5aa3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_eu.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_eu.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_fa.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_fa.properties index 19f8540dce9d7c..796551cadc278a 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_fa.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_fa.properties @@ -51,8 +51,10 @@ enable-content-recommendation=فعال کردن توصیه محتوا (Automatic enable-content-recommendation-help=این گزینه را برای فیلتر کردن محتوا با شرایط مورد علاقه کاربر فعال کنید. (Automatic Translation) equals=برابر است estimated-time-to-declare-winner=زمان تخمینی برای اعلام برنده (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=مرورگر field.cookies=کوکی ها +field.country=Country (Automatic Copy) field.date-modified=تاریخ ویرایش (Automatic Translation) field.device-brand=دستگاه با نام تجاری (Automatic Translation) field.device-model=مدل دستگاه (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=سلسله مراتب مسیر (Automatic Translation) field.organization-id=سازمان (Automatic Translation) field.parent-organization-id=پدر و مادر سازمان (Automatic Translation) field.referrer-url=URL ارجاع دهنده (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=پارامترهای درخواست (Automatic Translation) field.role-ids=نقش field.screen-name=نام صفحه نمایش (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_fi.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_fi.properties index e1ed9d1761341c..4573f538d53b0e 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_fi.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_fi.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Ota Käyttöön Sisältösuositus enable-content-recommendation-help=Ota käyttöön tämä vaihtoehto suodattaaksesi sisältöä käyttäjän kiinnostuksen kohteiden mukaan. equals=Yhtä suuri kuin estimated-time-to-declare-winner=Arvioitu Aika Voittajan Julistamiseen +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Selain field.cookies=Evästeet +field.country=Country (Automatic Copy) field.date-modified=Muokkauspäivämäärä field.device-brand=Laitteen Merkki field.device-model=Laitteen Malli @@ -72,6 +74,7 @@ field.name-tree-path=Nimipuun Polku field.organization-id=Organisaatio field.parent-organization-id=Isäntäorganisaatio field.referrer-url=Viitattu URL +field.region=Region (Automatic Copy) field.request-parameters=Pyynnön Parametrit field.role-ids=Rooli field.screen-name=Nimimerkki @@ -158,4 +161,4 @@ x-member={0} Jäsen x-members={0} Jäsentä x-properties={0} Ominaisuutta x-with-property-x={0} Ominaisuudella {1} -x-with-property-x-x-x={0} Ominaisuudella {1} {2} {3} \ No newline at end of file +x-with-property-x-x-x={0} Ominaisuudella {1} {2} {3} diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_fr.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_fr.properties index ca421a86c77eea..51398890b50721 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_fr.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_fr.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Activer les recommandation de contenu enable-content-recommendation-help=Activez cette option pour filtrer le contenu en fonction des conditions d'intérêt de l'utilisateur. equals=Égal à estimated-time-to-declare-winner=Temps estimé pour déclarer le gagnant (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Navigateur field.cookies=Cookies +field.country=Country (Automatic Copy) field.date-modified=Date de modification field.device-brand=Marque de l'appareil field.device-model=Modèle du dispositif @@ -72,6 +74,7 @@ field.name-tree-path=Chemin de l'arbre des noms field.organization-id=Organisation field.parent-organization-id=Organisation parente field.referrer-url=URL de la recommandation +field.region=Region (Automatic Copy) field.request-parameters=Demander les paramètres field.role-ids=Rôle field.screen-name=login diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_gl.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_gl.properties index ea3adddb404417..94cced791a5aa3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_gl.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_gl.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_hi_IN.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_hi_IN.properties index 2b1733e6aa0140..29d90d7cb6b694 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_hi_IN.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_hi_IN.properties @@ -51,8 +51,10 @@ enable-content-recommendation=सामग्री अनुशंसा सक enable-content-recommendation-help=उपयोगकर्ता की रुचि की शर्तों के साथ सामग्री फ़िल्टर करने के लिए इस विकल्प को सक्षम करें। (Automatic Translation) equals=बराबर (Automatic Translation) estimated-time-to-declare-winner=विजेता घोषित करने के लिए अनुमानित समय (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=ब्राउज़र (Automatic Translation) field.cookies=कुकीज़ (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=दिनांक संशोधित (Automatic Translation) field.device-brand=डिवाइस ब्रांड (Automatic Translation) field.device-model=डिवाइस मॉडल (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=पदानुक्रम पथ (Automatic Translation) field.organization-id=संगठन (Automatic Translation) field.parent-organization-id=पैरेंट संगठन (Automatic Translation) field.referrer-url=संदर्भ URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=पैरामीटर का अनुरोध करें (Automatic Translation) field.role-ids=भूमिका (Automatic Translation) field.screen-name=स्क्रीन नाम (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_hr.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_hr.properties index ea3adddb404417..94cced791a5aa3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_hr.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_hr.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_hu.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_hu.properties index c37e962fb2722e..9053c31fb4721e 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_hu.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_hu.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Tartalomajánlat engedélyezése enable-content-recommendation-help=Engedélyezze a lehetőséget a tartalom felhasználó érdeklődése alapján történő szűréséhez. equals=Egyenlő estimated-time-to-declare-winner=A győztes kihirdetésének becsült időpontja +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Böngésző field.cookies=Cookie-k +field.country=Country (Automatic Copy) field.date-modified=Módosítás dátuma field.device-brand=Eszköz márkája field.device-model=Eszköz modellje @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchia útvonala field.organization-id=Szervezet field.parent-organization-id=Szülő szervezet field.referrer-url=Hivatkozás URL-címe +field.region=Region (Automatic Copy) field.request-parameters=Paraméterek kérelmezése field.role-ids=Szerepkör field.screen-name=Képernyőnév diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_in.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_in.properties index c69f62e78dfb15..02260ca7cd90b6 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_in.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_in.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Aktifkan rekomendasi konten (Automatic Translation enable-content-recommendation-help=Aktifkan opsi ini untuk memfilter konten dengan persyaratan minat pengguna. (Automatic Translation) equals=Sama dengan (Automatic Translation) estimated-time-to-declare-winner=Perkiraan waktu untuk mengumumkan pemenang (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Translation) field.cookies=Cookie (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Tanggal dimodifikasi (Automatic Translation) field.device-brand=Merek perangkat (Automatic Translation) field.device-model=Model perangkat (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hirarki Path (Automatic Translation) field.organization-id=Organisasi (Automatic Translation) field.parent-organization-id=Organisasi induk (Automatic Translation) field.referrer-url=URL perujuk (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Parameter permintaan (Automatic Translation) field.role-ids=Peran (Automatic Translation) field.screen-name=Nama layar (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_it.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_it.properties index 8c10f8ee05cc1b..830b456f7ef9eb 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_it.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_it.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Abilita raccomandazione sui contenuti (Automatic T enable-content-recommendation-help=Attivare questa opzione per filtrare il contenuto in base alle condizioni di interesse dell'utente. (Automatic Translation) equals=È uguale a (Automatic Translation) estimated-time-to-declare-winner=Tempo stimato per dichiarare il vincitore (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Translation) field.cookies=Cookie (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Data di modifica (Automatic Translation) field.device-brand=Marca di dispositivo (Automatic Translation) field.device-model=Modello di dispositivo (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Percorso della gerarchia (Automatic Translation) field.organization-id=Organizzazione (Automatic Translation) field.parent-organization-id=Organizzazione principale (Automatic Translation) field.referrer-url=Referrer URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Parametri di richiesta (Automatic Translation) field.role-ids=Ruolo (Automatic Translation) field.screen-name=Nome di schermo (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_iw.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_iw.properties index fe0bdbf284bf95..ed54bedf1d7871 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_iw.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_iw.properties @@ -51,8 +51,10 @@ enable-content-recommendation=אפשר המלצת תוכן (Automatic Translatio enable-content-recommendation-help=הפוך אפשרות זו לזמינה כדי לסנן את התוכן עם תנאי העניין של המשתמש. (Automatic Translation) equals=שווה ל- (Automatic Translation) estimated-time-to-declare-winner=זמן משוער להכריז על הזוכה (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=דפדפן (Automatic Translation) field.cookies=עוגיות (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=התאריך שונה (Automatic Translation) field.device-brand=המכשיר המותג (Automatic Translation) field.device-model=מודל המכשיר (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=נתיב הירארכיה (Automatic Translation) field.organization-id=הארגון (Automatic Translation) field.parent-organization-id=ארגון אב (Automatic Translation) field.referrer-url=כתובת URL של המפנה (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=בקשה לפרמטרים (Automatic Translation) field.role-ids=תפקיד (Automatic Translation) field.screen-name=שם מסך (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ja.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ja.properties index 2172945f9a4fa8..1b95b4a790fa03 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ja.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ja.properties @@ -51,8 +51,10 @@ enable-content-recommendation=コンテンツ推薦を有効にする enable-content-recommendation-help=ユーザーが関心のある言葉でコンテンツを絞り込むには、このオプションを有効にしてください。 equals=等しい estimated-time-to-declare-winner=勝者を宣言するための予想時間 +field.asset-tag-ids=Tag (Automatic Copy) field.browser=ブラウザ field.cookies=Cookie +field.country=Country (Automatic Copy) field.date-modified=変更日 field.device-brand=デバイスのブランド field.device-model=デバイスのモデル @@ -72,6 +74,7 @@ field.name-tree-path=名前ツリーパス field.organization-id=組織 field.parent-organization-id=親企業 field.referrer-url=リファラーURL +field.region=Region (Automatic Copy) field.request-parameters=リクエストパラメータ field.role-ids=ロール field.screen-name=スクリーン名 @@ -158,4 +161,4 @@ x-member=メンバー{0}名 x-members=メンバー{0}名 x-properties={0}件のプロパティ x-with-property-x=プロパティ {1} の {0} -x-with-property-x-x-x=プロパティ {1} {2} {3} の {0} \ No newline at end of file +x-with-property-x-x-x=プロパティ {1} {2} {3} の {0} diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_kk.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_kk.properties index ea3adddb404417..94cced791a5aa3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_kk.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_kk.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ko.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ko.properties index 3a4548f0fb576c..509ab7b749477a 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ko.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ko.properties @@ -51,8 +51,10 @@ enable-content-recommendation=콘텐츠 추천 사용 (Automatic Translation) enable-content-recommendation-help=이 옵션을 사용하여 사용자의 관심 조건으로 콘텐츠를 필터링합니다. (Automatic Translation) equals=같음 (Automatic Translation) estimated-time-to-declare-winner=우승자를 선언할 예상 시간 (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=브라우저 (Automatic Translation) field.cookies=쿠키 (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=최종 수정 날짜 (Automatic Translation) field.device-brand=장치 브랜드 (Automatic Translation) field.device-model=장치 모델 (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=계층 경로 (Automatic Translation) field.organization-id=조직 (Automatic Translation) field.parent-organization-id=부모 조직 (Automatic Translation) field.referrer-url=참조 URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=요청 매개 변수 (Automatic Translation) field.role-ids=역할 (Automatic Translation) field.screen-name=화면 이름 (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_lo.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_lo.properties index ea3adddb404417..94cced791a5aa3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_lo.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_lo.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_lt.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_lt.properties index 4b03bd876d8938..805d28737361b3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_lt.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_lt.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Turinio rekomendacijos įjungimas (Automatic Trans enable-content-recommendation-help=Įgalinkite šią parinktį, kad turinys būtų filtruojamas pagal vartotojo dominantas sąlygas. (Automatic Translation) equals=Yra lygi (Automatic Translation) estimated-time-to-declare-winner=Numatomas laikas paskelbti nugalėtoją (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Naršyklė (Automatic Translation) field.cookies=Slapukai (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Modifikavimo data (Automatic Translation) field.device-brand=Įrenginio prekės ženklo (Automatic Translation) field.device-model=Prietaiso modelis (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchija kelią (Automatic Translation) field.organization-id=Organizacijos (Automatic Translation) field.parent-organization-id=Pirminės organizacijos (Automatic Translation) field.referrer-url=Persiuntėjo URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Užklausos parametrai (Automatic Translation) field.role-ids=Vaidmuo (Automatic Translation) field.screen-name=Ekrano pavadinimas (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_nb.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_nb.properties index 48189719de5695..7dc2272df6439f 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_nb.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_nb.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Aktivere innholds anbefaling (Automatic Translatio enable-content-recommendation-help=Aktiver dette alternativet for å filtrere innholdet med brukerens interesse uttrykk. (Automatic Translation) equals=Er lik (Automatic Translation) estimated-time-to-declare-winner=Anslått tid for å erklære Winner (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Nettleser (Automatic Translation) field.cookies=Informasjonskapsler (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Endringsdato (Automatic Translation) field.device-brand=Apparat merket (Automatic Translation) field.device-model=Enhetsmodellen (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarkibanen (Automatic Translation) field.organization-id=Organisasjon (Automatic Translation) field.parent-organization-id=Overordnede organisasjonen (Automatic Translation) field.referrer-url=Henvisningswebadressen (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Be om parametere (Automatic Translation) field.role-ids=Rolle (Automatic Translation) field.screen-name=Navnet (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_nl.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_nl.properties index ab6663c0e01732..e794096c202a05 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_nl.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_nl.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Inhoudaanbeveling inschakelen enable-content-recommendation-help=Schakel deze optie in om de inhoud te filteren volgens de termen van de interesses van de gebruiker. equals=Is gelijk aan estimated-time-to-declare-winner=De geschatte tijd om een winnaar aan te kondigen +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser field.cookies=Cookies +field.country=Country (Automatic Copy) field.date-modified=Datum gewijzigd field.device-brand=Merk apparaat field.device-model=Model apparaat @@ -72,6 +74,7 @@ field.name-tree-path=Naam pad boomstructuur field.organization-id=Organisatie field.parent-organization-id=Bovenliggende organisatie field.referrer-url=Doorverwijs-URL +field.region=Region (Automatic Copy) field.request-parameters=Verzoekparameters field.role-ids=Functie field.screen-name=Gebruikersnaam diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_nl_BE.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_nl_BE.properties index ea3adddb404417..94cced791a5aa3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_nl_BE.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_nl_BE.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_pl.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_pl.properties index 6e956d24e221af..515efabac8e8d0 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_pl.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_pl.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Włącz rekomendację treści (Automatic Translati enable-content-recommendation-help=Włącz tę opcję, aby filtrować zawartość z warunkami użytkownika. (Automatic Translation) equals=Jest równa (Automatic Translation) estimated-time-to-declare-winner=Szacowany czas na zadeklarowanie zwycięzcy (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Przeglądarka (Automatic Translation) field.cookies=Pliki cookie (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Data modyfikacji (Automatic Translation) field.device-brand=Urządzenia marki (Automatic Translation) field.device-model=Model urządzenia (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchii ścieżki (Automatic Translation) field.organization-id=Organizacja (Automatic Translation) field.parent-organization-id=Organizacji nadrzędnej (Automatic Translation) field.referrer-url=Referrer URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Parametry żądania (Automatic Translation) field.role-ids=Rola (Automatic Translation) field.screen-name=Nazwa ekranu (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_pt_BR.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_pt_BR.properties index dfe2b67d1edb34..b54ed7ef837389 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_pt_BR.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_pt_BR.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Habilitar Recomendação de Conteúdo enable-content-recommendation-help=Habilitar esta opção para filtrar o conteúdo com os termos de interesse do usuário. equals=Igual estimated-time-to-declare-winner=Tempo Estimado para Declarar o Vencedor +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Navegador field.cookies=Cookies +field.country=Country (Automatic Copy) field.date-modified=Data de modificação field.device-brand=Marca do dispositivo field.device-model=Modelo do dispositivo @@ -72,6 +74,7 @@ field.name-tree-path=Caminho da hierarquia field.organization-id=Organização field.parent-organization-id=Organização Superior field.referrer-url=URL de referência +field.region=Region (Automatic Copy) field.request-parameters=Parâmetros da Solicitação field.role-ids=Função field.screen-name=Nome de Usuário @@ -158,4 +161,4 @@ x-member={0} Membro x-members={0} Membros x-properties={0} Propriedades x-with-property-x={0} Com a Propriedade {1} -x-with-property-x-x-x={0} Com a Propriedade {1} {2} {3} \ No newline at end of file +x-with-property-x-x-x={0} Com a Propriedade {1} {2} {3} diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_pt_PT.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_pt_PT.properties index 5b55afa0baf3c3..4a4992a33dfb61 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_pt_PT.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_pt_PT.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Tempo estimado para declarar vencedor (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ro.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ro.properties index 10570e4dbd8eba..e52dbe0e51cabb 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ro.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ro.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Activare recomandare conținut (Automatic Translat enable-content-recommendation-help=Activați această opțiune pentru a filtra conținutul cu termenii de interes ai utilizatorului. (Automatic Translation) equals=Este egal cu (Automatic Translation) estimated-time-to-declare-winner=Timpul estimat de declarare a câștigătorului (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser-ul (Automatic Translation) field.cookies=Cookie-uri (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Data modificat (Automatic Translation) field.device-brand=Dispozitiv de Brand (Automatic Translation) field.device-model=Model de aparat (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Ierarhia calea (Automatic Translation) field.organization-id=Organizarea (Automatic Translation) field.parent-organization-id=Organizaţia mamă (Automatic Translation) field.referrer-url=Referrer URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Parametrii de solicitare (Automatic Translation) field.role-ids=Rolul (Automatic Translation) field.screen-name=Nume ecran (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ru.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ru.properties index fca8c13823f8f9..7baf98f8f40e16 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ru.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ru.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Рекомендация включить конт enable-content-recommendation-help=Включите эту опцию для фильтрации содержимого с условиями интереса пользователя. (Automatic Translation) equals=Равняется (Automatic Translation) estimated-time-to-declare-winner=Ориентировочное время для объявления победителя (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Обозреватель (Automatic Translation) field.cookies=Печенье (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Дата изменения (Automatic Translation) field.device-brand=Марка устройства (Automatic Translation) field.device-model=Модель устройства (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Путь иерархии (Automatic Translation) field.organization-id=Организации (Automatic Translation) field.parent-organization-id=Вышестоящая организация (Automatic Translation) field.referrer-url=Реферер URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Параметры запроса (Automatic Translation) field.role-ids=Роль (Automatic Translation) field.screen-name=Имя экрана (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sk.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sk.properties index 534fd694c21fcf..054c38db840fc6 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sk.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sk.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Povoliť odporúčanie pre obsah (Automatic Transl enable-content-recommendation-help=Povoľte túto možnosť na filtrovanie obsahu s podmienkami používateľa. (Automatic Translation) equals=Rovná sa (Automatic Translation) estimated-time-to-declare-winner=Odhadovaný čas na deklarovanie víťaza (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Prehliadač (Automatic Translation) field.cookies=Súbory "cookie" (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Dátum úpravy (Automatic Translation) field.device-brand=Zariadenie značky (Automatic Translation) field.device-model=Model zariadenia (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchická cesta (Automatic Translation) field.organization-id=Organizácia (Automatic Translation) field.parent-organization-id=Materskej organizácie (Automatic Translation) field.referrer-url=Adresa URL odkazujúceho servera (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Požiadavky na parametre (Automatic Translation) field.role-ids=Úloha (Automatic Translation) field.screen-name=Názov obrazovky (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sl.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sl.properties index 34ef289df29d51..0180d616542cb5 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sl.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sl.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Omogoči priporočilo o vsebini (Automatic Transla enable-content-recommendation-help=Omogočite to možnost, če želite vsebino filtrirati s pogoji zanimanja uporabnika. (Automatic Translation) equals=Je enako (Automatic Translation) estimated-time-to-declare-winner=Predviden čas za razglasitev zmagovalca (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Brskalnik (Automatic Translation) field.cookies=Piškotki (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Datum spremembe (Automatic Translation) field.device-brand=Naprava blagovne znamke (Automatic Translation) field.device-model=Model naprave (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarhična pot (Automatic Translation) field.organization-id=Organizacija (Automatic Translation) field.parent-organization-id=Nadrejeni organizaciji. (Automatic Translation) field.referrer-url=Referrer URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Parametri zahteve (Automatic Translation) field.role-ids=Vlogo (Automatic Translation) field.screen-name=Prikazno ime (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sr_RS.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sr_RS.properties index ea3adddb404417..94cced791a5aa3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sr_RS.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sr_RS.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sr_RS_latin.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sr_RS_latin.properties index ea3adddb404417..94cced791a5aa3 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sr_RS_latin.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sr_RS_latin.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=Equals (Automatic Copy) estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Browser (Automatic Copy) field.cookies=Cookies (Automatic Copy) +field.country=Country (Automatic Copy) field.date-modified=Date Modified (Automatic Copy) field.device-brand=Device Brand (Automatic Copy) field.device-model=Device Model (Automatic Copy) @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path (Automatic Copy) field.organization-id=Organization (Automatic Copy) field.parent-organization-id=Parent Organization (Automatic Copy) field.referrer-url=Referrer URL (Automatic Copy) +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=Role (Automatic Copy) field.screen-name=Screen Name (Automatic Copy) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sv.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sv.properties index 66c902f07c8c55..4ec3900831f1c0 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_sv.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_sv.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Aktivera innehållsrekommendation enable-content-recommendation-help=Aktivera det här alternativet för att filtrera innehållet med användarens intressetermer. equals=Lika med estimated-time-to-declare-winner=Beräknad tid för att utse vinnare +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Webbläsare field.cookies=Cookies +field.country=Country (Automatic Copy) field.date-modified=Senast ändrad field.device-brand=Enhetens märke field.device-model=Enhetsmodell @@ -72,6 +74,7 @@ field.name-tree-path=Namnge sökväg för träd field.organization-id=Organisation field.parent-organization-id=Övergripande organisation field.referrer-url=Referent-URL +field.region=Region (Automatic Copy) field.request-parameters=Begär parametrar field.role-ids=Roll field.screen-name=Användarnamn @@ -158,4 +161,4 @@ x-member={0} medlem x-members={0} medlemmar x-properties={0} egenskaper x-with-property-x={0} med egenskapen {1} -x-with-property-x-x-x={0} med egenskapen {1} {2} {3} \ No newline at end of file +x-with-property-x-x-x={0} med egenskapen {1} {2} {3} diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ta_IN.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ta_IN.properties index 6c8d6ed6923bc5..332078936d1be0 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_ta_IN.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_ta_IN.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Enable Content Recommendation (Automatic Copy) enable-content-recommendation-help=Enable this option to filter the content with user's terms of interest. (Automatic Copy) equals=சமம் estimated-time-to-declare-winner=Estimated Time to Declare Winner (Automatic Copy) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=ப்ரவுசர் field.cookies=Cookies +field.country=Country (Automatic Copy) field.date-modified=மாற்றப்பட்ட தேதி field.device-brand=டிவைஸ் பிராண்டு field.device-model=டிவைஸ் மாடல் @@ -72,6 +74,7 @@ field.name-tree-path=Hierarchy Path field.organization-id=நிறுவனம் field.parent-organization-id=மூல நிறுவனம் field.referrer-url=Referrer URL +field.region=Region (Automatic Copy) field.request-parameters=Request Parameters (Automatic Copy) field.role-ids=பங்கு field.screen-name=Screen Name diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_th.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_th.properties index 85793b756db668..70e7cd9cebc90c 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_th.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_th.properties @@ -51,8 +51,10 @@ enable-content-recommendation=เปิดใช้งานการแนะ enable-content-recommendation-help=เปิดใช้งานตัวเลือกนี้เพื่อกรองเนื้อหาด้วยเงื่อนไขที่น่าสนใจของผู้ใช้ (Automatic Translation) equals=เท่ากับ (Automatic Translation) estimated-time-to-declare-winner=เวลาโดยประมาณที่จะประกาศผู้ชนะ (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=เบราว์เซอร์ (Automatic Translation) field.cookies=คุกกี้ (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=วันที่แก้ไข (Automatic Translation) field.device-brand=แบรนด์อุปกรณ์ (Automatic Translation) field.device-model=รุ่นของอุปกรณ์ (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=เส้นทางของลำดับชั้น ( field.organization-id=องค์กร (Automatic Translation) field.parent-organization-id=องค์กรหลัก (Automatic Translation) field.referrer-url=ทำการอ้างอิง URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=พารามิเตอร์คำขอ (Automatic Translation) field.role-ids=บทบาท (Automatic Translation) field.screen-name=ชื่อหน้าจอ (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_tr.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_tr.properties index 2ebf0d898468b0..c491db917195b7 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_tr.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_tr.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Içerik önerisini etkinleştir (Automatic Transla enable-content-recommendation-help=İçeriği kullanıcının ilgi koşulları ile filtrelemek için bu seçeneği etkinleştirin. (Automatic Translation) equals=Eşittir (Automatic Translation) estimated-time-to-declare-winner=Kazananı Beyan Etmek Için Tahmini Süre (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Tarayıcı (Automatic Translation) field.cookies=Tanımlama bilgileri (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Değiştirilme tarihi (Automatic Translation) field.device-brand=Cihaz marka (Automatic Translation) field.device-model=Cihaz modeli (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hiyerarşi yolu (Automatic Translation) field.organization-id=Organizasyon (Automatic Translation) field.parent-organization-id=Üst kuruluş (Automatic Translation) field.referrer-url=Yönlendirme URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=İstek Parametreleri (Automatic Translation) field.role-ids=Rolü (Automatic Translation) field.screen-name=Ekran adı (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_uk.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_uk.properties index b9cccd608abeab..8761cb98c6ffbb 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_uk.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_uk.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Увімкнути рекомендації щод enable-content-recommendation-help=Увімкніть цей параметр, щоб Фільтрувати вміст за допомогою умов, що становлять користувач. (Automatic Translation) equals=Дорівнює (Automatic Translation) estimated-time-to-declare-winner=Розрахунковий час оголосити переможця (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Браузер (Automatic Translation) field.cookies=Печиво (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Дата змінення (Automatic Translation) field.device-brand=Пристрій бренду (Automatic Translation) field.device-model=Модель пристрою (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Повний шлях (Automatic Translation) field.organization-id=Організація (Automatic Translation) field.parent-organization-id=Організацію батьків (Automatic Translation) field.referrer-url=Реферер URL (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Параметри запиту (Automatic Translation) field.role-ids=Роль (Automatic Translation) field.screen-name=Псевдонім (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_vi.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_vi.properties index 926a87a619334b..7c43d2064a964e 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_vi.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_vi.properties @@ -51,8 +51,10 @@ enable-content-recommendation=Bật khuyến nghị nội dung (Automatic Transl enable-content-recommendation-help=Bật tùy chọn này để lọc nội dung bằng các điều khoản quan tâm của người dùng. (Automatic Translation) equals=Tương đương (Automatic Translation) estimated-time-to-declare-winner=Thời gian ước tính tuyên bố người chiến thắng (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=Trình duyệt (Automatic Translation) field.cookies=Cookie (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=Ngày sửa đổi (Automatic Translation) field.device-brand=Thương hiệu thiết bị (Automatic Translation) field.device-model=Mô hình thiết bị (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=Hệ thống phân cấp đường (Automatic Translation) field.organization-id=Tổ chức (Automatic Translation) field.parent-organization-id=Tổ chức phụ huynh (Automatic Translation) field.referrer-url=URL tham chiếu (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=Yêu cầu tham số (Automatic Translation) field.role-ids=Vai trò (Automatic Translation) field.screen-name=Tên màn hình (Automatic Translation) diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_zh_CN.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_zh_CN.properties index f6ba0811d5d690..628b58f28bb22c 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_zh_CN.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_zh_CN.properties @@ -51,8 +51,10 @@ enable-content-recommendation=启用内容推荐 enable-content-recommendation-help=启用此选项可以使用用户感兴趣的词筛选内容。 equals=等于 estimated-time-to-declare-winner=声明获胜者的估计时间 +field.asset-tag-ids=Tag (Automatic Copy) field.browser=浏览器 field.cookies=Cookie +field.country=Country (Automatic Copy) field.date-modified=修改日期 field.device-brand=设备品牌 field.device-model=设备型号 @@ -72,6 +74,7 @@ field.name-tree-path=名称树路径 field.organization-id=组织 field.parent-organization-id=上级组织 field.referrer-url=来源页面 URL +field.region=Region (Automatic Copy) field.request-parameters=请求参数 (Automatic Translation) field.role-ids=角色 field.screen-name=屏幕显示名称 diff --git a/modules/apps/segments/segments-lang/src/main/resources/content/Language_zh_TW.properties b/modules/apps/segments/segments-lang/src/main/resources/content/Language_zh_TW.properties index 7c9fa3f1e052bd..002c7f709d73a2 100644 --- a/modules/apps/segments/segments-lang/src/main/resources/content/Language_zh_TW.properties +++ b/modules/apps/segments/segments-lang/src/main/resources/content/Language_zh_TW.properties @@ -51,8 +51,10 @@ enable-content-recommendation=啟用內容建議 (Automatic Translation) enable-content-recommendation-help=啟用此選項可按使用者感興趣的條款篩選內容。 (Automatic Translation) equals=等於 (Automatic Translation) estimated-time-to-declare-winner=宣佈獲勝者的估計時間 (Automatic Translation) +field.asset-tag-ids=Tag (Automatic Copy) field.browser=瀏覽器 (Automatic Translation) field.cookies=餅乾 (Automatic Translation) +field.country=Country (Automatic Copy) field.date-modified=修改日期 (Automatic Translation) field.device-brand=設備品牌 (Automatic Translation) field.device-model=設備型號 (Automatic Translation) @@ -72,6 +74,7 @@ field.name-tree-path=層次結構路徑 (Automatic Translation) field.organization-id=組織 (Automatic Translation) field.parent-organization-id=家長組織 (Automatic Translation) field.referrer-url=推薦人網址 (Automatic Translation) +field.region=Region (Automatic Copy) field.request-parameters=請求參數 (Automatic Translation) field.role-ids=作用 (Automatic Translation) field.screen-name=螢幕名稱 (Automatic Translation) diff --git a/modules/apps/segments/segments-service/build.gradle b/modules/apps/segments/segments-service/build.gradle index 0d2eff36c74399..be09de12651a6d 100644 --- a/modules/apps/segments/segments-service/build.gradle +++ b/modules/apps/segments/segments-service/build.gradle @@ -26,6 +26,7 @@ dependencies { compileOnly project(":apps:portal:portal-upgrade-api") compileOnly project(":apps:segments:segments-api") compileOnly project(":apps:staging:staging-api") + compileOnly project(":apps:static:osgi:osgi-util") compileOnly project(":apps:static:portal-configuration:portal-configuration-metatype-api") compileOnly project(":apps:xstream:xstream-configurator-api") compileOnly project(":core:osgi-service-tracker-collections") diff --git a/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/field/customizer/SegmentsFieldCustomizerRegistryImpl.java b/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/field/customizer/SegmentsFieldCustomizerRegistryImpl.java index 2d80b20930a2e0..5fb198cbdbc790 100644 --- a/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/field/customizer/SegmentsFieldCustomizerRegistryImpl.java +++ b/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/field/customizer/SegmentsFieldCustomizerRegistryImpl.java @@ -18,6 +18,7 @@ import com.liferay.osgi.service.tracker.collections.map.ServiceReferenceMapper; import com.liferay.osgi.service.tracker.collections.map.ServiceTrackerMap; import com.liferay.osgi.service.tracker.collections.map.ServiceTrackerMapFactory; +import com.liferay.osgi.util.StringPlus; import com.liferay.portal.kernel.util.Validator; import com.liferay.segments.field.customizer.SegmentsFieldCustomizer; import com.liferay.segments.field.customizer.SegmentsFieldCustomizerRegistry; @@ -104,10 +105,13 @@ public void map( ServiceReference serviceReference, Emitter emitter) { - String entityName = (String)serviceReference.getProperty( - "segments.field.customizer.entity.name"); + List entityNames = StringPlus.asList( + serviceReference.getProperty( + "segments.field.customizer.entity.name")); - emitter.emit(entityName); + for (String entityName : entityNames) { + emitter.emit(entityName); + } } } diff --git a/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/odata/entity/OrganizationEntityModel.java b/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/odata/entity/OrganizationEntityModel.java index 74e1dace8b25bd..bdb4d69415bfa5 100644 --- a/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/odata/entity/OrganizationEntityModel.java +++ b/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/odata/entity/OrganizationEntityModel.java @@ -41,6 +41,8 @@ public OrganizationEntityModel(List customEntityFields) { "dateModified", locale -> Field.getSortableFieldName(Field.MODIFIED_DATE), locale -> Field.MODIFIED_DATE), + new IdEntityField( + "assetTagIds", locale -> Field.ASSET_TAG_IDS, String::valueOf), new IdEntityField( "classPK", locale -> Field.ORGANIZATION_ID, String::valueOf), new IdEntityField( @@ -51,6 +53,8 @@ public OrganizationEntityModel(List customEntityFields) { new IdEntityField( "parentOrganizationId", locale -> "parentOrganizationId", String::valueOf), + new StringEntityField("country", locale -> "country"), + new StringEntityField("region", locale -> "region"), new StringEntityField( "name", locale -> Field.getSortableFieldName(Field.NAME)), new StringEntityField( diff --git a/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/odata/entity/UserEntityModel.java b/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/odata/entity/UserEntityModel.java index 97c9a7300e8449..affa903b205ae4 100644 --- a/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/odata/entity/UserEntityModel.java +++ b/modules/apps/segments/segments-service/src/main/java/com/liferay/segments/internal/odata/entity/UserEntityModel.java @@ -44,6 +44,8 @@ public UserEntityModel(List customEntityFields) { new IdEntityField( "ancestorOrganizationIds", locale -> "ancestorOrganizationIds", String::valueOf), + new IdEntityField( + "assetTagIds", locale -> Field.ASSET_TAG_IDS, String::valueOf), new IdEntityField( "classPK", locale -> Field.USER_ID, String::valueOf), new IdEntityField( diff --git a/modules/apps/segments/segments-web/build.gradle b/modules/apps/segments/segments-web/build.gradle index a686a4d8e974c2..d2c5853506773e 100644 --- a/modules/apps/segments/segments-web/build.gradle +++ b/modules/apps/segments/segments-web/build.gradle @@ -17,5 +17,6 @@ dependencies { compileOnly project(":core:osgi-service-tracker-collections") compileOnly project(":core:petra:petra-function") compileOnly project(":core:petra:petra-lang") + compileOnly project(":core:petra:petra-reflect") compileOnly project(":core:petra:petra-string") } \ No newline at end of file diff --git a/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/AssetTagSegmentsFieldCustomizer.java b/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/AssetTagSegmentsFieldCustomizer.java new file mode 100644 index 00000000000000..b0348df7afc19c --- /dev/null +++ b/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/AssetTagSegmentsFieldCustomizer.java @@ -0,0 +1,153 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.segments.web.internal.field.customizer; + +import com.liferay.asset.kernel.model.AssetTag; +import com.liferay.asset.kernel.service.AssetTagLocalService; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.model.ClassedModel; +import com.liferay.portal.kernel.model.Group; +import com.liferay.portal.kernel.portlet.LiferayWindowState; +import com.liferay.portal.kernel.portlet.PortletProvider; +import com.liferay.portal.kernel.portlet.PortletProviderUtil; +import com.liferay.portal.kernel.security.auth.CompanyThreadLocal; +import com.liferay.portal.kernel.service.GroupLocalService; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ListUtil; +import com.liferay.portal.kernel.util.Portal; +import com.liferay.segments.field.Field; +import com.liferay.segments.field.customizer.SegmentsFieldCustomizer; + +import java.util.List; +import java.util.Locale; + +import javax.portlet.PortletRequest; +import javax.portlet.PortletURL; + +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +/** + * @author Raymond Augé + */ +@Component( + immediate = true, + property = { + "segments.field.customizer.entity.name=Organization", + "segments.field.customizer.entity.name=User", + "segments.field.customizer.key=" + AssetTagSegmentsFieldCustomizer.KEY, + "segments.field.customizer.priority:Integer=50" + }, + service = SegmentsFieldCustomizer.class +) +public class AssetTagSegmentsFieldCustomizer + extends BaseSegmentsFieldCustomizer { + + public static final String KEY = "tag"; + + @Override + public ClassedModel getClassedModel(String fieldValue) { + return _getAssetTag(fieldValue); + } + + @Override + public String getClassName() { + return AssetTag.class.getName(); + } + + @Override + public List getFieldNames() { + return _fieldNames; + } + + @Override + public String getFieldValueName(String fieldValue, Locale locale) { + AssetTag assetTag = _getAssetTag(fieldValue); + + if (assetTag == null) { + return fieldValue; + } + + return assetTag.getName(); + } + + @Override + public String getKey() { + return KEY; + } + + @Override + public Field.SelectEntity getSelectEntity(PortletRequest portletRequest) { + try { + PortletURL portletURL = PortletProviderUtil.getPortletURL( + portletRequest, AssetTag.class.getName(), + PortletProvider.Action.BROWSE); + + if (portletURL == null) { + return null; + } + + Group companyGroup = _groupLocalService.getCompanyGroup( + CompanyThreadLocal.getCompanyId()); + + portletURL.setParameter("eventName", "selectEntity"); + portletURL.setParameter( + "groupIds", String.valueOf(companyGroup.getGroupId())); + portletURL.setParameter("mvcPath", "/select_single.jsp"); + portletURL.setWindowState(LiferayWindowState.POP_UP); + + return new Field.SelectEntity( + "selectEntity", + getSelectEntityTitle( + _portal.getLocale(portletRequest), + AssetTag.class.getName()), + portletURL.toString(), false); + } + catch (Exception e) { + if (_log.isWarnEnabled()) { + _log.warn("Unable to get select entity", e); + } + + return null; + } + } + + private AssetTag _getAssetTag(String fieldValue) { + long assetTagId = GetterUtil.getLong(fieldValue); + + if (assetTagId == 0) { + return null; + } + + return _assetTagLocalService.fetchAssetTag(assetTagId); + } + + private static final Log _log = LogFactoryUtil.getLog( + AssetTagSegmentsFieldCustomizer.class); + + private static final List _fieldNames = ListUtil.fromArray( + new String[] {"assetTagIds"}); + + @Reference + private AssetTagLocalService _assetTagLocalService; + + @Reference + private GroupLocalService _groupLocalService; + + @Reference + private Portal _portal; + +} \ No newline at end of file diff --git a/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/CountrySegmentsFieldCustomizer.java b/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/CountrySegmentsFieldCustomizer.java new file mode 100644 index 00000000000000..366d609a7f1d48 --- /dev/null +++ b/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/CountrySegmentsFieldCustomizer.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.segments.web.internal.field.customizer; + +import com.liferay.portal.kernel.model.Country; +import com.liferay.portal.kernel.service.CountryService; +import com.liferay.portal.kernel.util.ListUtil; +import com.liferay.segments.field.Field; +import com.liferay.segments.field.customizer.SegmentsFieldCustomizer; + +import java.util.List; +import java.util.Locale; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +/** + * @author Raymond Augé + */ +@Component( + immediate = true, + property = { + "segments.field.customizer.entity.name=Organization", + "segments.field.customizer.key=" + CountrySegmentsFieldCustomizer.KEY, + "segments.field.customizer.priority:Integer=50" + }, + service = SegmentsFieldCustomizer.class +) +public class CountrySegmentsFieldCustomizer + extends BaseSegmentsFieldCustomizer { + + public static final String KEY = "country"; + + @Override + public List getFieldNames() { + return _fieldNames; + } + + @Override + public String getKey() { + return KEY; + } + + @Override + public List getOptions(Locale locale) { + List countries = _countryService.getCountries(); + + Stream stream = countries.stream(); + + return stream.map( + country -> new Field.Option( + country.getName(locale), String.valueOf(country.getName())) + ).collect( + Collectors.toList() + ); + } + + private static final List _fieldNames = ListUtil.fromArray( + new String[] {"country"}); + + @Reference + private CountryService _countryService; + +} \ No newline at end of file diff --git a/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/FreeformTextSegmentsFieldCustomizer.java b/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/FreeformTextSegmentsFieldCustomizer.java new file mode 100644 index 00000000000000..d9f7d33aab6f51 --- /dev/null +++ b/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/FreeformTextSegmentsFieldCustomizer.java @@ -0,0 +1,130 @@ +package com.liferay.segments.web.internal.field.customizer; + +import com.liferay.asset.kernel.model.AssetVocabulary; +import com.liferay.asset.kernel.service.AssetCategoryLocalService; +import com.liferay.asset.kernel.service.AssetVocabularyLocalService; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.model.ClassedModel; +import com.liferay.portal.kernel.portlet.LiferayWindowState; +import com.liferay.portal.kernel.portlet.PortletProvider; +import com.liferay.portal.kernel.portlet.PortletProviderUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.Portal; +import com.liferay.segments.context.Context; +import com.liferay.segments.field.Field; +import com.liferay.segments.field.customizer.SegmentsFieldCustomizer; + +import java.util.Arrays; +import java.util.List; +import java.util.Locale; + +import javax.portlet.PortletRequest; +import javax.portlet.PortletURL; + +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +@Component( + immediate = true, + property = { + "segments.field.customizer.entity.name=User", + "segments.field.customizer.entity.name=Organization", + "segments.field.customizer.entity.name=Context", + "segments.field.customizer.key=" + FreeformTextSegmentsFieldCustomizer.KEY, + "segments.field.customizer.priority:Integer=50" + }, + service = SegmentsFieldCustomizer.class +) +public class FreeformTextSegmentsFieldCustomizer + extends BaseSegmentsFieldCustomizer { + + public static final String KEY = "freeform"; + + @Override + public ClassedModel getClassedModel(String fieldValue) { + return _getAssetVocabulary(fieldValue); + } + + @Override + public String getClassName() { + return AssetVocabulary.class.getName(); + } + + @Override + public List getFieldNames() { + return _fieldNames; + } + + @Override + public String getFieldValueName(String fieldValue, Locale locale) { + AssetVocabulary assetVocabulary = _getAssetVocabulary(fieldValue); + + if (assetVocabulary == null) { + return fieldValue; + } + + return assetVocabulary.getName(); + } + + @Override + public String getKey() { + return KEY; + } + + @Override + public Field.SelectEntity getSelectEntity(PortletRequest portletRequest) { + try { + PortletURL portletURL = PortletProviderUtil.getPortletURL( + portletRequest, AssetVocabulary.class.getName(), + PortletProvider.Action.BROWSE); + + portletURL.setParameter("eventName", "selectEntity"); + portletURL.setWindowState(LiferayWindowState.POP_UP); + + return new Field.SelectEntity( + "selectEntity", + getSelectEntityTitle( + _portal.getLocale(portletRequest), + AssetVocabulary.class.getName()), + portletURL.toString(), true); + } + catch (Exception e) { + if (_log.isWarnEnabled()) { + _log.warn("Unable to get select entity", e); + } + + return null; + } + } + + private AssetVocabulary _getAssetVocabulary(String fieldValue) { + long _vocabularyId = GetterUtil.getLong(fieldValue); + + if (_vocabularyId == 0) { + return null; + } + + return _assetVocabularyLocalService.fetchAssetVocabulary(_vocabularyId); + } + + private static final Log _log = LogFactoryUtil.getLog( + FreeformTextSegmentsFieldCustomizer.class); + + private static final List _fieldNames = Arrays.asList( + "emailAddress", "firstName", "jobTitle", "lastName", "screenName", + "userName", "country", "region", "name", "nameTreePath", "type", + Context.BROWSER, Context.DEVICE_BRAND, Context.DEVICE_MODEL, + Context.HOSTNAME, Context.REFERRER_URL, Context.URL, Context.USER_AGENT, + Context.COOKIES, Context.REQUEST_PARAMETERS); + + @Reference + private AssetCategoryLocalService _assetCategoryLocalService; + + @Reference + private AssetVocabularyLocalService _assetVocabularyLocalService; + + @Reference + private Portal _portal; + +} \ No newline at end of file diff --git a/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/RegionSegmentsFieldCustomizer.java b/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/RegionSegmentsFieldCustomizer.java new file mode 100644 index 00000000000000..81e9269fd0c84d --- /dev/null +++ b/modules/apps/segments/segments-web/src/main/java/com/liferay/segments/web/internal/field/customizer/RegionSegmentsFieldCustomizer.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.segments.web.internal.field.customizer; + +import com.liferay.petra.reflect.ReflectionUtil; +import com.liferay.petra.string.StringBundler; +import com.liferay.portal.kernel.model.Country; +import com.liferay.portal.kernel.model.Region; +import com.liferay.portal.kernel.service.CountryService; +import com.liferay.portal.kernel.service.RegionService; +import com.liferay.portal.kernel.util.ListUtil; +import com.liferay.segments.field.Field; +import com.liferay.segments.field.customizer.SegmentsFieldCustomizer; + +import java.util.List; +import java.util.Locale; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +/** + * @author Raymond Augé + */ +@Component( + immediate = true, + property = { + "segments.field.customizer.entity.name=Organization", + "segments.field.customizer.key=" + RegionSegmentsFieldCustomizer.KEY, + "segments.field.customizer.priority:Integer=50" + }, + service = SegmentsFieldCustomizer.class +) +public class RegionSegmentsFieldCustomizer extends BaseSegmentsFieldCustomizer { + + public static final String KEY = "region"; + + @Override + public List getFieldNames() { + return _fieldNames; + } + + @Override + public String getKey() { + return KEY; + } + + @Override + public List getOptions(Locale locale) { + List regions = _regionService.getRegions(); + + Stream stream = regions.stream(); + + return stream.map( + region -> new Field.Option( + _getRegionLabel(region, locale), region.getName()) + ).sorted( + (a, b) -> a.getLabel( + ).compareTo( + b.getLabel() + ) + ).collect( + Collectors.toList() + ); + } + + private String _getRegionLabel(Region region, Locale locale) { + try { + Country country = _countryService.getCountry(region.getCountryId()); + + return StringBundler.concat( + country.getName(locale), " - ", region.getName()); + } + catch (Exception e) { + return ReflectionUtil.throwException(e); + } + } + + private static final List _fieldNames = ListUtil.fromArray( + new String[] {"region"}); + + @Reference + private CountryService _countryService; + + @Reference + private RegionService _regionService; + +} \ No newline at end of file diff --git a/modules/apps/segments/segments-web/src/main/resources/META-INF/resources/js/components/inputs/CollectionInput.es.js b/modules/apps/segments/segments-web/src/main/resources/META-INF/resources/js/components/inputs/CollectionInput.es.js index b5c19a8dfe3cdc..d2f39328dd7fa7 100644 --- a/modules/apps/segments/segments-web/src/main/resources/META-INF/resources/js/components/inputs/CollectionInput.es.js +++ b/modules/apps/segments/segments-web/src/main/resources/META-INF/resources/js/components/inputs/CollectionInput.es.js @@ -26,6 +26,12 @@ class CollectionInput extends React.Component { static propTypes = { disabled: propTypes.bool, onChange: propTypes.func.isRequired, + selectEntity: propTypes.shape({ + id: propTypes.string, + multiple: propTypes.bool, + title: propTypes.string, + uri: propTypes.string + }), value: propTypes.string }; @@ -75,22 +81,97 @@ class CollectionInput extends React.Component { }; }; + /** + * Opens a modal for selecting entities. Uses different methods for + * selecting multiple entities versus single because of the way the event + * and data is submitted. + */ + _handleSelectEntity = () => { + const { + onChange, + selectEntity: {id, multiple, title, uri} + } = this.props; + + if (multiple) { + AUI().use('liferay-item-selector-dialog', A => { + const itemSelectorDialog = new A.LiferayItemSelectorDialog({ + eventName: id, + on: { + selectedItemChange: event => { + const newVal = event.newVal; + + if (newVal) { + const selectedValues = event.newVal.map( + item => ({ + displayValue: item.name, + value: item.id + }) + ); + + onChange(selectedValues); + } + } + }, + strings: { + add: Liferay.Language.get('select'), + cancel: Liferay.Language.get('cancel') + }, + title, + url: uri + }); + + itemSelectorDialog.open(); + }); + } else { + Liferay.Util.selectEntity( + { + dialog: { + constrain: true, + destroyOnHide: true, + modal: true + }, + id, + title, + uri + }, + event => { + onChange({ + displayValue: event.entityname, + value: event.entityid + }); + } + ); + } + }; + render() { const {disabled} = this.props; const {key, value} = this._stringToKeyValueObject(this.props.value); return ( <> - +
+ +
+ +
+
{ + const { + onChange, + selectEntity: {id, multiple, title, uri} + } = this.props; + + if (multiple) { + AUI().use('liferay-item-selector-dialog', A => { + const itemSelectorDialog = new A.LiferayItemSelectorDialog({ + eventName: id, + on: { + selectedItemChange: event => { + const newVal = event.newVal; + + if (newVal) { + const selectedValues = event.newVal.map( + item => ({ + displayValue: item.name, + value: item.id + }) + ); + + onChange(selectedValues); + } + } + }, + strings: { + add: Liferay.Language.get('select'), + cancel: Liferay.Language.get('cancel') + }, + title, + url: uri + }); + + itemSelectorDialog.open(); + }); + } else { + Liferay.Util.selectEntity( + { + dialog: { + constrain: true, + destroyOnHide: true, + modal: true + }, + id, + title, + uri + }, + event => { + onChange({ + displayValue: event.entityname, + value: event.entityid + }); + } + ); + } + }; + render() { const {disabled, options, value} = this.props; return options.length === 0 ? ( - +
+ +
+ +
+
) : ( toTreeMap( + ActionRequest actionRequest, String parameterPrefix, + Set availableLocales) + throws AvailableLocaleException { + + TreeMap treeMap = new TreeMap<>(); + + String[] virtualHostNames = ParamUtil.getStringValues( + actionRequest, parameterPrefix + "Name[]"); + String[] virtualHostLocales = ParamUtil.getStringValues( + actionRequest, parameterPrefix + "Locale[]"); + + for (int i = 0; i < virtualHostNames.length; i++) { + String virtualHostName = virtualHostNames[i]; + + String virtualHostLocale = virtualHostLocales[i]; + + if (Validator.isNotNull(virtualHostLocale)) { + Locale locale = LocaleUtil.fromLanguageId(virtualHostLocale); + + if (!availableLocales.contains(locale)) { + throw new AvailableLocaleException(virtualHostLocale); + } + } + + treeMap.put(virtualHostName, virtualHostLocale); + } + + return treeMap; + } + protected void updateActive(ActionRequest actionRequest, boolean active) throws Exception { @@ -918,21 +951,18 @@ protected Group updateGroup(ActionRequest actionRequest) throws Exception { LayoutSet publicLayoutSet = liveGroup.getPublicLayoutSet(); - String publicVirtualHost = ParamUtil.getString( - actionRequest, "publicVirtualHost", - publicLayoutSet.getVirtualHostname()); + Set availableLocales = LanguageUtil.getAvailableLocales( + liveGroup.getGroupId()); - layoutSetService.updateVirtualHost( - liveGroup.getGroupId(), false, publicVirtualHost); + layoutSetService.updateVirtualHosts( + liveGroup.getGroupId(), false, + toTreeMap(actionRequest, "publicVirtualHost", availableLocales)); LayoutSet privateLayoutSet = liveGroup.getPrivateLayoutSet(); - String privateVirtualHost = ParamUtil.getString( - actionRequest, "privateVirtualHost", - privateLayoutSet.getVirtualHostname()); - - layoutSetService.updateVirtualHost( - liveGroup.getGroupId(), true, privateVirtualHost); + layoutSetService.updateVirtualHosts( + liveGroup.getGroupId(), true, + toTreeMap(actionRequest, "privateVirtualHost", availableLocales)); // Staging @@ -946,25 +976,17 @@ protected Group updateGroup(ActionRequest actionRequest) throws Exception { groupService.updateFriendlyURL( stagingGroup.getGroupId(), friendlyURL); - LayoutSet stagingPublicLayoutSet = - stagingGroup.getPublicLayoutSet(); - - publicVirtualHost = ParamUtil.getString( - actionRequest, "stagingPublicVirtualHost", - stagingPublicLayoutSet.getVirtualHostname()); - - layoutSetService.updateVirtualHost( - stagingGroup.getGroupId(), false, publicVirtualHost); - - LayoutSet stagingPrivateLayoutSet = - stagingGroup.getPrivateLayoutSet(); - - privateVirtualHost = ParamUtil.getString( - actionRequest, "stagingPrivateVirtualHost", - stagingPrivateLayoutSet.getVirtualHostname()); - - layoutSetService.updateVirtualHost( - stagingGroup.getGroupId(), true, privateVirtualHost); + layoutSetService.updateVirtualHosts( + stagingGroup.getGroupId(), false, + toTreeMap( + actionRequest, "stagingPublicVirtualHost", + availableLocales)); + + layoutSetService.updateVirtualHosts( + stagingGroup.getGroupId(), true, + toTreeMap( + actionRequest, "stagingPrivateVirtualHost", + availableLocales)); UnicodeProperties stagedGroupTypeSettingsProperties = stagingGroup.getTypeSettingsProperties(); diff --git a/modules/apps/site/site-admin-web/src/main/resources/META-INF/resources/init.jsp b/modules/apps/site/site-admin-web/src/main/resources/META-INF/resources/init.jsp index bc73ed82008a65..db510693479a27 100644 --- a/modules/apps/site/site-admin-web/src/main/resources/META-INF/resources/init.jsp +++ b/modules/apps/site/site-admin-web/src/main/resources/META-INF/resources/init.jsp @@ -34,7 +34,6 @@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %> page import="com.liferay.frontend.taglib.clay.servlet.taglib.util.NavigationItem" %><%@ page import="com.liferay.map.constants.MapProviderWebKeys" %><%@ page import="com.liferay.petra.string.StringPool" %><%@ -page import="com.liferay.portal.kernel.bean.BeanParamUtil" %><%@ page import="com.liferay.portal.kernel.dao.search.SearchContainer" %><%@ page import="com.liferay.portal.kernel.exception.DuplicateGroupException" %><%@ page import="com.liferay.portal.kernel.exception.GroupFriendlyURLException" %><%@ @@ -128,7 +127,8 @@ page import="java.util.List" %><%@ page import="java.util.Locale" %><%@ page import="java.util.Map" %><%@ page import="java.util.Objects" %><%@ -page import="java.util.Set" %> +page import="java.util.Set" %><%@ +page import="java.util.TreeMap" %> <%@ page import="javax.portlet.PortletPreferences" %><%@ page import="javax.portlet.PortletRequest" %><%@ diff --git a/modules/apps/site/site-admin-web/src/main/resources/META-INF/resources/site/site_url.jsp b/modules/apps/site/site-admin-web/src/main/resources/META-INF/resources/site/site_url.jsp index e77f0d61b0be00..2656e6b0f137a7 100644 --- a/modules/apps/site/site-admin-web/src/main/resources/META-INF/resources/site/site_url.jsp +++ b/modules/apps/site/site-admin-web/src/main/resources/META-INF/resources/site/site_url.jsp @@ -25,8 +25,26 @@ Long stagingGroupId = (Long)request.getAttribute("site.stagingGroupId"); LayoutSet publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroupId, false); LayoutSet privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(liveGroupId, true); -String publicVirtualHost = ParamUtil.getString(request, "publicVirtualHost", BeanParamUtil.getString(publicLayoutSet, request, "virtualHostname")); -String privateVirtualHost = ParamUtil.getString(request, "privateVirtualHost", BeanParamUtil.getString(privateLayoutSet, request, "virtualHostname")); +//// The list of locales available for the site + +Set availableLocales = LanguageUtil.getAvailableLocales(liveGroupId); + +//// Conversions to/from Local/languageId + +// String languageId = LocaleUtil.toLanguageId(locale); +// Locale locale = LocaleUtil.fromLanguageId(languageId); + +TreeMap publicVirtualHosts = publicLayoutSet.getVirtualHostnames(); + +if (publicVirtualHosts.size() == 0) { + publicVirtualHosts.put(StringPool.BLANK, StringPool.BLANK); +} + +TreeMap privateVirtualHosts = privateLayoutSet.getVirtualHostnames(); + +if (privateVirtualHosts.size() == 0) { + privateVirtualHosts.put(StringPool.BLANK, StringPool.BLANK); +} %>

- +
- - - function(val, fieldNode, ruleValue) { - return (val != A.one('#publicVirtualHost').val()); - } - - + <% + for (Map.Entry entry : publicVirtualHosts.entrySet()) { + String hostName = entry.getKey(); + + String hostLocale = Validator.isNotNull(entry.getValue()) ? entry.getValue() : StringPool.BLANK; + %> + +
+
+ + + + + + <% + for (Locale localeEntry : availableLocales) { + String languageId = LocaleUtil.toLanguageId(localeEntry); + %> + + + + <% + } + %> + + +
+
+ + <% + } + %> + +
+ +
+ + <% + for (Map.Entry entry : privateVirtualHosts.entrySet()) { + String hostName = entry.getKey(); + + String hostLocale = Validator.isNotNull(entry.getValue()) ? entry.getValue() : StringPool.BLANK; + %> + +
+
+ + + + + + <% + for (Locale localeEntry : availableLocales) { + String languageId = LocaleUtil.toLanguageId(localeEntry); + %> + + + + <% + } + %> + + +
+
+ + <% + } + %> + +
<% LayoutSet stagingPublicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(stagingGroupId, false); - String stagingPublicVirtualHost = ParamUtil.getString(request, "stagingPublicVirtualHost", stagingPublicLayoutSet.getVirtualHostname()); + TreeMap stagingPublicVirtualHosts = stagingPublicLayoutSet.getVirtualHostnames(); + + if (stagingPublicVirtualHosts.size() == 0) { + stagingPublicVirtualHosts.put(StringPool.BLANK, StringPool.BLANK); + } %> - +
+ + <% + for (Map.Entry entry : stagingPublicVirtualHosts.entrySet()) { + String hostName = entry.getKey(); + + String hostLocale = Validator.isNotNull(entry.getValue()) ? entry.getValue() : StringPool.BLANK; + %> + +
+
+ + + + + + <% + for (Locale localeEntry : availableLocales) { + String languageId = LocaleUtil.toLanguageId(localeEntry); + %> + + + + <% + } + %> + + +
+
+ + <% + } + %> + +
<% LayoutSet stagingPrivateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(stagingGroupId, true); - String stagingPrivateVirtualHost = ParamUtil.getString(request, "stagingPrivateVirtualHost", stagingPrivateLayoutSet.getVirtualHostname()); + TreeMap stagingPrivateVirtualHosts = stagingPrivateLayoutSet.getVirtualHostnames(); + + if (stagingPrivateVirtualHosts.size() == 0) { + stagingPrivateVirtualHosts.put(StringPool.BLANK, StringPool.BLANK); + } %> - - - function(val, fieldNode, ruleValue) { - return (val != A.one('#stagingPublicVirtualHost').val()); - } - - +
+ + <% + for (Map.Entry entry : stagingPrivateVirtualHosts.entrySet()) { + String hostName = entry.getKey(); + + String hostLocale = Validator.isNotNull(entry.getValue()) ? entry.getValue() : StringPool.BLANK; + %> + +
+
+ + + + + + <% + for (Locale localeEntry : availableLocales) { + String languageId = LocaleUtil.toLanguageId(localeEntry); + %> + + + + <% + } + %> + + +
+
+ + <% + } + %> + +
+ + new Liferay.AutoFields( + { + contentBox: '#publicVirtualHostFields', + namespace: '' + } + ).render(); + + new Liferay.AutoFields( + { + contentBox: '#privateVirtualHostFields', + namespace: '' + } + ).render(); + + + new Liferay.AutoFields( + { + contentBox: '#stagingPublicVirtualHostFields', + namespace: '' + } + ).render(); + + new Liferay.AutoFields( + { + contentBox: '#stagingPrivateVirtualHostFields', + namespace: '' + } + ).render(); + + +