diff --git a/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PendingCommerceOrderFDSAPIURLResolver.java b/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PendingCommerceOrderFDSAPIURLResolver.java index 1a68e41449588b..7f6d8d6ff3ee49 100644 --- a/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PendingCommerceOrderFDSAPIURLResolver.java +++ b/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PendingCommerceOrderFDSAPIURLResolver.java @@ -13,6 +13,7 @@ import com.liferay.commerce.product.service.CommerceChannelLocalService; import com.liferay.frontend.data.set.resolver.FDSAPIURLResolver; import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.util.Validator; import javax.servlet.http.HttpServletRequest; @@ -42,29 +43,47 @@ public String resolve(String baseURL, HttpServletRequest httpServletRequest) (CommerceContext)httpServletRequest.getAttribute( CommerceWebKeys.COMMERCE_CONTEXT); - AccountEntry accountEntry = commerceContext.getAccountEntry(); - CommerceChannel commerceChannel = - _commerceChannelLocalService.getCommerceChannel( - commerceContext.getCommerceChannelId()); - CommerceOrder commerceOrder = commerceContext.getCommerceOrder(); - - return baseURL.replaceAll( - "\\{accountExternalReferenceCode\\}", - accountEntry.getExternalReferenceCode() - ).replaceAll( - "\\{accountId\\}", String.valueOf(accountEntry.getAccountEntryId()) - ).replaceAll( - "\\{cartId\\}", String.valueOf(commerceOrder.getCommerceOrderId()) - ).replaceAll( - "\\{channelExternalReferenceCode\\}", - String.valueOf(commerceChannel.getExternalReferenceCode()) - ).replaceAll( - "\\{channelId\\}", - String.valueOf(commerceContext.getCommerceChannelId()) - ).replaceAll( - "\\{externalReferenceCode\\}", - commerceOrder.getExternalReferenceCode() - ); + if (Validator.isNotNull(commerceContext)) { + AccountEntry accountEntry = commerceContext.getAccountEntry(); + + if (Validator.isNotNull(accountEntry)) { + baseURL = baseURL.replaceAll( + "\\{accountExternalReferenceCode\\}", + accountEntry.getExternalReferenceCode() + ).replaceAll( + "\\{accountId\\}", + String.valueOf(accountEntry.getAccountEntryId()) + ); + } + + CommerceChannel commerceChannel = + _commerceChannelLocalService.getCommerceChannel( + commerceContext.getCommerceChannelId()); + + if (Validator.isNotNull(commerceChannel)) { + baseURL = baseURL.replaceAll( + "\\{channelExternalReferenceCode\\}", + String.valueOf(commerceChannel.getExternalReferenceCode()) + ).replaceAll( + "\\{channelId\\}", + String.valueOf(commerceContext.getCommerceChannelId()) + ); + } + + CommerceOrder commerceOrder = commerceContext.getCommerceOrder(); + + if (Validator.isNotNull(commerceOrder)) { + baseURL = baseURL.replaceAll( + "\\{cartId\\}", + String.valueOf(commerceOrder.getCommerceOrderId()) + ).replaceAll( + "\\{externalReferenceCode\\}", + commerceOrder.getExternalReferenceCode() + ); + } + } + + return baseURL; } @Reference diff --git a/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PendingCommerceOrderItemFDSAPIURLResolver.java b/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PendingCommerceOrderItemFDSAPIURLResolver.java new file mode 100644 index 00000000000000..6619f1ce7e8029 --- /dev/null +++ b/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PendingCommerceOrderItemFDSAPIURLResolver.java @@ -0,0 +1,55 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.commerce.order.content.web.internal.frontend.data.set.resolver; + +import com.liferay.commerce.constants.CommerceWebKeys; +import com.liferay.commerce.context.CommerceContext; +import com.liferay.commerce.model.CommerceOrder; +import com.liferay.frontend.data.set.resolver.FDSAPIURLResolver; +import com.liferay.portal.kernel.util.Validator; + +import javax.servlet.http.HttpServletRequest; + +import org.osgi.service.component.annotations.Component; + +@Component( + property = "fds.rest.application.key=/headless-commerce-delivery-cart/v1.0/CartItem", + service = FDSAPIURLResolver.class +) +public class PendingCommerceOrderItemFDSAPIURLResolver + implements FDSAPIURLResolver { + + @Override + public String getSchema() { + return "CartItem"; + } + + @Override + public String resolve( + String baseURL, HttpServletRequest httpServletRequest) { + + CommerceContext commerceContext = + (CommerceContext)httpServletRequest.getAttribute( + CommerceWebKeys.COMMERCE_CONTEXT); + + if (Validator.isNotNull(commerceContext)) { + CommerceOrder commerceOrder = commerceContext.getCommerceOrder(); + + if (Validator.isNotNull(commerceOrder)) { + baseURL = baseURL.replaceAll( + "\\{cartId\\}", + String.valueOf(commerceOrder.getCommerceOrderId()) + ).replaceAll( + "\\{externalReferenceCode\\}", + commerceOrder.getExternalReferenceCode() + ); + } + } + + return baseURL; + } + +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PlacedCommerceOrderFDSAPIURLResolver.java b/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PlacedCommerceOrderFDSAPIURLResolver.java new file mode 100644 index 00000000000000..39236bc07394d0 --- /dev/null +++ b/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PlacedCommerceOrderFDSAPIURLResolver.java @@ -0,0 +1,91 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.commerce.order.content.web.internal.frontend.data.set.resolver; + +import com.liferay.account.model.AccountEntry; +import com.liferay.commerce.constants.CommerceWebKeys; +import com.liferay.commerce.context.CommerceContext; +import com.liferay.commerce.model.CommerceOrder; +import com.liferay.commerce.product.model.CommerceChannel; +import com.liferay.commerce.product.service.CommerceChannelLocalService; +import com.liferay.frontend.data.set.resolver.FDSAPIURLResolver; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.util.Validator; + +import javax.servlet.http.HttpServletRequest; + +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +/** + * @author Gianmarco Brunialti Masera + */ +@Component( + property = "fds.rest.application.key=/headless-commerce-delivery-order/v1.0/PlacedOrder", + service = FDSAPIURLResolver.class +) +public class PlacedCommerceOrderFDSAPIURLResolver implements FDSAPIURLResolver { + + @Override + public String getSchema() { + return "PlacedOrder"; + } + + @Override + public String resolve(String baseURL, HttpServletRequest httpServletRequest) + throws PortalException { + + CommerceContext commerceContext = + (CommerceContext)httpServletRequest.getAttribute( + CommerceWebKeys.COMMERCE_CONTEXT); + + if (Validator.isNotNull(commerceContext)) { + AccountEntry accountEntry = commerceContext.getAccountEntry(); + + if (Validator.isNotNull(accountEntry)) { + baseURL = baseURL.replaceAll( + "\\{accountExternalReferenceCode\\}", + accountEntry.getExternalReferenceCode() + ).replaceAll( + "\\{accountId\\}", + String.valueOf(accountEntry.getAccountEntryId()) + ); + } + + CommerceChannel commerceChannel = + _commerceChannelLocalService.getCommerceChannel( + commerceContext.getCommerceChannelId()); + + if (Validator.isNotNull(commerceChannel)) { + baseURL = baseURL.replaceAll( + "\\{channelExternalReferenceCode\\}", + String.valueOf(commerceChannel.getExternalReferenceCode()) + ).replaceAll( + "\\{channelId\\}", + String.valueOf(commerceContext.getCommerceChannelId()) + ); + } + + CommerceOrder commerceOrder = commerceContext.getCommerceOrder(); + + if (Validator.isNotNull(commerceOrder)) { + baseURL = baseURL.replaceAll( + "\\{placedOrderId\\}", + String.valueOf(commerceOrder.getCommerceOrderId()) + ).replaceAll( + "\\{externalReferenceCode\\}", + commerceOrder.getExternalReferenceCode() + ); + } + } + + return baseURL; + } + + @Reference + private CommerceChannelLocalService _commerceChannelLocalService; + +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PlacedCommerceOrderItemFDSAPIURLResolver.java b/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PlacedCommerceOrderItemFDSAPIURLResolver.java new file mode 100644 index 00000000000000..b2d20cd4e78ca7 --- /dev/null +++ b/modules/apps/commerce/commerce-order-content-web/src/main/java/com/liferay/commerce/order/content/web/internal/frontend/data/set/resolver/PlacedCommerceOrderItemFDSAPIURLResolver.java @@ -0,0 +1,58 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.commerce.order.content.web.internal.frontend.data.set.resolver; + +import com.liferay.commerce.constants.CommerceWebKeys; +import com.liferay.commerce.context.CommerceContext; +import com.liferay.commerce.model.CommerceOrder; +import com.liferay.frontend.data.set.resolver.FDSAPIURLResolver; +import com.liferay.portal.kernel.util.Validator; + +import javax.servlet.http.HttpServletRequest; + +import org.osgi.service.component.annotations.Component; + +/** + * @author Gianmarco Brunialti Masera + */ +@Component( + property = "fds.rest.application.key=/headless-commerce-delivery-order/v1.0/PlacedOrderItem", + service = FDSAPIURLResolver.class +) +public class PlacedCommerceOrderItemFDSAPIURLResolver + implements FDSAPIURLResolver { + + @Override + public String getSchema() { + return "PlacedOrderItem"; + } + + @Override + public String resolve( + String baseURL, HttpServletRequest httpServletRequest) { + + CommerceContext commerceContext = + (CommerceContext)httpServletRequest.getAttribute( + CommerceWebKeys.COMMERCE_CONTEXT); + + if (Validator.isNotNull(commerceContext)) { + CommerceOrder commerceOrder = commerceContext.getCommerceOrder(); + + if (Validator.isNotNull(commerceOrder)) { + baseURL = baseURL.replaceAll( + "\\{placedOrderId\\}", + String.valueOf(commerceOrder.getCommerceOrderId()) + ).replaceAll( + "\\{externalReferenceCode\\}", + commerceOrder.getExternalReferenceCode() + ); + } + } + + return baseURL; + } + +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer-extender/build.gradle b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer-extender/build.gradle index c869f855a272b1..aa0bb5b934ec31 100644 --- a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer-extender/build.gradle +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer-extender/build.gradle @@ -16,6 +16,8 @@ dependencies { compileOnly project(":apps:commerce:headless:headless-commerce:headless-commerce-admin-catalog-api") compileOnly project(":apps:commerce:headless:headless-commerce:headless-commerce-admin-channel-api") compileOnly project(":apps:commerce:headless:headless-commerce:headless-commerce-admin-order-api") + compileOnly project(":apps:object:object-api") + compileOnly project(":apps:object:object-rest-api") compileOnly project(":apps:portal-configuration:portal-configuration-module-configuration-api") compileOnly project(":apps:portal-vulcan:portal-vulcan-api") compileOnly project(":apps:site-initializer:site-initializer-extender:site-initializer-extender-api") diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer-extender/src/main/java/com/liferay/commerce/site/initializer/extender/CommerceSiteInitializerImpl.java b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer-extender/src/main/java/com/liferay/commerce/site/initializer/extender/CommerceSiteInitializerImpl.java index a073980d5d7c8e..2529fe6c1c1f01 100644 --- a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer-extender/src/main/java/com/liferay/commerce/site/initializer/extender/CommerceSiteInitializerImpl.java +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer-extender/src/main/java/com/liferay/commerce/site/initializer/extender/CommerceSiteInitializerImpl.java @@ -52,10 +52,15 @@ import com.liferay.headless.commerce.admin.channel.resource.v1_0.ChannelResource; import com.liferay.headless.commerce.admin.order.dto.v1_0.OrderType; import com.liferay.headless.commerce.admin.order.resource.v1_0.OrderTypeResource; +import com.liferay.object.model.ObjectDefinition; +import com.liferay.object.model.ObjectEntry; +import com.liferay.object.service.ObjectDefinitionLocalService; +import com.liferay.object.service.ObjectEntryService; import com.liferay.petra.string.StringBundler; import com.liferay.petra.string.StringPool; import com.liferay.portal.configuration.module.configuration.ConfigurationProvider; import com.liferay.portal.kernel.dao.orm.QueryUtil; +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; @@ -68,6 +73,7 @@ import com.liferay.portal.kernel.service.LayoutLocalService; import com.liferay.portal.kernel.service.ResourcePermissionLocalService; import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.UserLocalService; import com.liferay.portal.kernel.service.permission.ModelPermissionsFactory; import com.liferay.portal.kernel.settings.FallbackKeysSettingsUtil; import com.liferay.portal.kernel.settings.GroupServiceSettingsLocator; @@ -89,6 +95,8 @@ import com.liferay.site.initializer.extender.CommerceSiteInitializer; import com.liferay.site.initializer.extender.SiteInitializerUtil; +import java.io.Serializable; + import java.math.BigDecimal; import java.net.URL; @@ -107,6 +115,7 @@ /** * @author Rafael Praxedes + * @author Gianmarco Brunialti Masera */ @Component(service = CommerceSiteInitializer.class) public class CommerceSiteInitializerImpl implements CommerceSiteInitializer { @@ -171,6 +180,51 @@ public void addCPDefinitions( _addOrUpdateCommerceOrderTypes(serviceContext, servletContext); } + @Override + public void addFDSEntries( + Bundle bundle, ServiceContext serviceContext, + ServletContext servletContext, + Map stringUtilReplaceValues) + throws Exception { + + Enumeration enumeration = bundle.findEntries( + "/site-initializer/data-sets", StringPool.STAR, true); + + if (enumeration == null) { + return; + } + + while (enumeration.hasMoreElements()) { + URL url = enumeration.nextElement(); + + String fileName = url.getFile(); + + if (fileName.endsWith("/")) { + continue; + } + + if (StringUtil.endsWith(fileName, "data-set.json")) { + String json = URLUtil.toString(url); + + if (json == null) { + continue; + } + + try { + JSONObject fdsEntryJSONObject = + _jsonFactory.createJSONObject(json); + + _addFDSEntry( + fdsEntryJSONObject, serviceContext, + stringUtilReplaceValues); + } + catch (Exception exception) { + _log.error(exception); + } + } + } + } + @Override public void addPortletSettings( ClassLoader classLoader, ServiceContext serviceContext, @@ -622,6 +676,216 @@ private void _addDefaultCPDisplayLayout( modifiableSettings.store(); } + private void _addFDSEntry( + JSONObject jsonObject, ServiceContext serviceContext, + Map stringUtilReplaceValues) + throws PortalException { + + ObjectDefinition fdsEntryObjectDefinition = + _objectDefinitionLocalService. + getObjectDefinitionByExternalReferenceCode( + "FDSEntry", serviceContext.getCompanyId()); + + JSONObject fdsEntryJSONObject = jsonObject.getJSONObject("dataSet"); + + String externalReferenceCode = fdsEntryJSONObject.getString( + "externalReferenceCode"); + String fdsEntryLabel = fdsEntryJSONObject.getString("label"); + + ObjectEntry fdsObjectEntry = _objectEntryService.addObjectEntry( + 0, fdsEntryObjectDefinition.getObjectDefinitionId(), + HashMapBuilder.put( + "externalReferenceCode", externalReferenceCode + ).put( + "label", fdsEntryLabel + ).put( + "label_i18n", + HashMapBuilder.put( + serviceContext.getLanguageId(), fdsEntryLabel + ).build() + ).put( + "name", fdsEntryLabel + ).put( + "restApplication", + fdsEntryJSONObject.getString("restApplication") + ).put( + "restEndpoint", fdsEntryJSONObject.getString("restEndpoint") + ).put( + "restSchema", fdsEntryJSONObject.getString("restSchema") + ).build(), + serviceContext); + + JSONArray fdsViewsJSONArray = jsonObject.getJSONArray("views"); + + for (int i = 0; i < fdsViewsJSONArray.length(); i++) { + ObjectEntry fdsViewObjectEntry = _addFDSView( + fdsViewsJSONArray.getJSONObject(i), + fdsObjectEntry.getObjectEntryId(), serviceContext); + + String fdsViewObjectEntryERC = + fdsViewObjectEntry.getExternalReferenceCode(); + + stringUtilReplaceValues.put( + StringBundler.concat("FDS_VIEW_ERC:", fdsViewObjectEntryERC), + String.valueOf(fdsViewObjectEntry.getObjectEntryId())); + } + } + + private void _addFDSItemActions( + JSONObject fdsViewJSONObject, long fdsViewObjectEntryId, + ServiceContext serviceContext) + throws PortalException { + + ObjectDefinition fdsViewItemActionObjectDefinition = + _objectDefinitionLocalService. + getObjectDefinitionByExternalReferenceCode( + "FDSAction", serviceContext.getCompanyId()); + + JSONArray fdsItemActionsJSONArray = fdsViewJSONObject.getJSONArray( + "actions"); + + if (fdsItemActionsJSONArray == null) { + return; + } + + for (int i = 0; i < fdsItemActionsJSONArray.length(); i++) { + JSONObject fdsItemActionJSONObject = + fdsItemActionsJSONArray.getJSONObject(i); + + _objectEntryService.addObjectEntry( + 0, fdsViewItemActionObjectDefinition.getObjectDefinitionId(), + HashMapBuilder.put( + "confirmationMessage_i18n", + (Serializable)_jsonFactory.looseDeserialize( + fdsItemActionJSONObject.getString( + "confirmationMessage_i18n")) + ).put( + "icon", fdsItemActionJSONObject.getString("icon") + ).put( + "label_i18n", + (Serializable)_jsonFactory.looseDeserialize( + fdsItemActionJSONObject.getString("label_i18n")) + ).put( + "method", fdsItemActionJSONObject.getString("method") + ).put( + "modalSize", fdsItemActionJSONObject.getString("modalSize") + ).put( + "permissionKey", + fdsItemActionJSONObject.getString("permissionKey") + ).put( + "r_fdsViewFDSItemActionRelationship_c_fdsViewId", + String.valueOf(fdsViewObjectEntryId) + ).put( + "title_i18n", + (Serializable)_jsonFactory.looseDeserialize( + fdsItemActionJSONObject.getString("title_i18n")) + ).put( + "type", fdsItemActionJSONObject.getString("type") + ).put( + "url", fdsItemActionJSONObject.getString("url") + ).build(), + serviceContext); + } + } + + private void _addFDSTableFields( + JSONArray fdsFieldsJSONArray, long objectEntryId, + ServiceContext serviceContext) + throws PortalException { + + ObjectDefinition fdsFieldObjectDefinition = + _objectDefinitionLocalService. + getObjectDefinitionByExternalReferenceCode( + "FDSField", serviceContext.getCompanyId()); + + for (int i = 0; i < fdsFieldsJSONArray.length(); i++) { + JSONObject fdsFieldJSONObject = fdsFieldsJSONArray.getJSONObject(i); + + _objectEntryService.addObjectEntry( + 0, fdsFieldObjectDefinition.getObjectDefinitionId(), + HashMapBuilder.put( + "label", + fdsFieldJSONObject.getString( + "label", fdsFieldJSONObject.getString("name")) + ).put( + "label_i18n", + (Serializable)_jsonFactory.looseDeserialize( + fdsFieldJSONObject.getString("label_i18n")) + ).put( + "name", fdsFieldJSONObject.getString("name") + ).put( + "r_fdsViewFDSFieldRelationship_c_fdsViewId", objectEntryId + ).put( + "renderer", + fdsFieldJSONObject.getString("renderer", "default") + ).put( + "sortable", fdsFieldJSONObject.getBoolean("sortable", true) + ).put( + "type", fdsFieldJSONObject.getString("type") + ).build(), + serviceContext); + } + } + + private ObjectEntry _addFDSView( + JSONObject fdsViewJSONObject, long fdsEntryObjectEntryId, + ServiceContext serviceContext) + throws PortalException { + + ObjectDefinition fdsViewObjectDefinition = + _objectDefinitionLocalService. + getObjectDefinitionByExternalReferenceCode( + "FDSView", serviceContext.getCompanyId()); + + ObjectEntry fdsViewObjectEntry = _objectEntryService.addObjectEntry( + 0, fdsViewObjectDefinition.getObjectDefinitionId(), + HashMapBuilder.put( + "defaultItemsPerPage", + fdsViewJSONObject.getInt("defaultItemsPerPage", 20) + ).put( + "description", fdsViewJSONObject.getString("description") + ).put( + "externalReferenceCode", + fdsViewJSONObject.getString("externalReferenceCode") + ).put( + "label", fdsViewJSONObject.getString("label") + ).put( + "label_i18n", + HashMapBuilder.put( + serviceContext.getLanguageId(), + fdsViewJSONObject.getString("label") + ).build() + ).put( + "listOfItemsPerPage", + fdsViewJSONObject.getString( + "listOfItemsPerPage", "4, 8, 20, 40, 60") + ).put( + "r_fdsEntryFDSViewRelationship_c_fdsEntryId", + fdsEntryObjectEntryId + ).put( + "symbol", fdsViewJSONObject.getString("symbol", "catalog") + ).build(), + serviceContext); + + JSONObject fdsVisualizationModesJSONObject = + fdsViewJSONObject.getJSONObject("visualizationModes"); + + if (fdsVisualizationModesJSONObject.has("table")) { + JSONArray fdsFieldsJSONArray = + fdsVisualizationModesJSONObject.getJSONArray("table"); + + _addFDSTableFields( + fdsFieldsJSONArray, fdsViewObjectEntry.getObjectEntryId(), + serviceContext); + } + + _addFDSItemActions( + fdsViewJSONObject, fdsViewObjectEntry.getObjectEntryId(), + serviceContext); + + return fdsViewObjectEntry; + } + private void _addModelResourcePermissions( String className, String primKey, String resourcePath, ServiceContext serviceContext, ServletContext servletContext) @@ -1082,6 +1346,12 @@ else if (StringUtil.equals(propertyType, "UPDATE_PRICE")) { @Reference private LayoutLocalService _layoutLocalService; + @Reference + private ObjectDefinitionLocalService _objectDefinitionLocalService; + + @Reference + private ObjectEntryService _objectEntryService; + @Reference private OrderTypeResource.Factory _orderTypeResourceFactory; @@ -1098,4 +1368,7 @@ else if (StringUtil.equals(propertyType, "UPDATE_PRICE")) { @Reference private ResourcePermissionLocalService _resourcePermissionLocalService; + @Reference + private UserLocalService _userLocalService; + } \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/pending-order-items/data-set.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/pending-order-items/data-set.json new file mode 100644 index 00000000000000..6e799d05313f9b --- /dev/null +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/pending-order-items/data-set.json @@ -0,0 +1,132 @@ +{ + "dataSet": { + "externalReferenceCode": "commerce-pending-order-items-data-set", + "label": "Pending Order Items", + "restApplication": "/headless-commerce-delivery-cart/v1.0", + "restEndpoint": "/v1.0/carts/{cartId}/cart-items", + "restSchema": "CartItem" + }, + "views": [ + { + "actions": [ + { + "confirmationMessage_i18n": { + }, + "icon": "view", + "label_i18n": { + "en_US": "View" + }, + "method": "", + "modalSize": "", + "permissionKey": "", + "title_i18n": { + }, + "type": "link", + "url": "{productURLs.en_US}" + }, + { + "confirmationMessage_i18n": { + }, + "icon": "trash", + "label_i18n": { + "en_US": "Remove" + }, + "method": "DELETE", + "modalSize": "", + "permissionKey": "", + "title_i18n": { + }, + "type": "async", + "url": "/o/headless-commerce-delivery-cart/v1.0/cart-items/{id}" + } + ], + "externalReferenceCode": "commerce-pending-order-items-data-set-view", + "label": "Pending Order Items View", + "visualizationModes": { + "table": [ + { + "label_i18n": { + "en_US": "" + }, + "name": "thumbnail", + "renderer": "image", + "sortable": false, + "type": "string" + }, + { + "label_i18n": { + "en_US": "SKU" + }, + "name": "sku", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Name" + }, + "name": "name", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "List Price" + }, + "name": "price.priceFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Promotion Price" + }, + "name": "price.promoPriceFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Discount" + }, + "name": "price.discountFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Quantity" + }, + "name": "quantity", + "renderer": "default", + "sortable": true, + "type": "integer" + }, + { + "label_i18n": { + "en_US": "UOM" + }, + "name": "skuUnitOfMeasure.name", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Total" + }, + "name": "price.finalPriceFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/pending-orders/data-set.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/pending-orders/data-set.json new file mode 100644 index 00000000000000..c70a9bd80e9d5b --- /dev/null +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/pending-orders/data-set.json @@ -0,0 +1,117 @@ +{ + "dataSet": { + "externalReferenceCode": "commerce-pending-orders-data-set", + "label": "Pending Orders", + "restApplication": "/headless-commerce-delivery-cart/v1.0", + "restEndpoint": "/v1.0/channels/{channelId}/carts", + "restSchema": "Cart" + }, + "views": [ + { + "actions": [ + { + "confirmationMessage_i18n": { + }, + "icon": "view", + "label_i18n": { + "en_US": "View" + }, + "method": "", + "modalSize": "", + "permissionKey": "", + "title_i18n": { + }, + "type": "link", + "url": "cart/{id}" + } + ], + "externalReferenceCode": "commerce-pending-orders-data-set-view", + "label": "Pending Orders View", + "visualizationModes": { + "table": [ + { + "label_i18n": { + "en_US": "Order ID" + }, + "name": "id", + "renderer": "actionLink", + "sortable": true, + "type": "integer" + }, + { + "label_i18n": { + "en_US": "Order Name" + }, + "name": "name", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Order Date" + }, + "name": "createDate", + "renderer": "Date", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "ERC" + }, + "name": "externalReferenceCode", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Purchase Order Number" + }, + "name": "purchaseOrderNumber", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Account" + }, + "name": "account", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Amount" + }, + "name": "summary.totalFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Created by" + }, + "name": "author", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Status" + }, + "name": "workflowStatusInfo.label_i18n", + "renderer": "label", + "sortable": true, + "type": "string" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/placed-order-items/data-set.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/placed-order-items/data-set.json new file mode 100644 index 00000000000000..eea999dfee5eca --- /dev/null +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/placed-order-items/data-set.json @@ -0,0 +1,117 @@ +{ + "dataSet": { + "externalReferenceCode": "commerce-placed-order-items-data-set", + "label": "Placed Order Items", + "restApplication": "/headless-commerce-delivery-order/v1.0", + "restEndpoint": "/v1.0/channels/{placedOrderId}/placed-order-items", + "restSchema": "PlacedOrderItem" + }, + "views": [ + { + "actions": [ + { + "confirmationMessage_i18n": { + }, + "icon": "view", + "label_i18n": { + "en_US": "View" + }, + "method": "", + "modalSize": "", + "permissionKey": "", + "title_i18n": { + }, + "type": "link", + "url": "../p/{productURLs.en_US}" + } + ], + "externalReferenceCode": "commerce-placed-order-items-data-set-view", + "label": "Placed Order Items View", + "visualizationModes": { + "table": [ + { + "label_i18n": { + "en_US": "" + }, + "name": "thumbnail", + "renderer": "image", + "sortable": false, + "type": "string" + }, + { + "label_i18n": { + "en_US": "SKU" + }, + "name": "sku", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Name" + }, + "name": "name", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "List Price" + }, + "name": "price.priceFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Promotion Price" + }, + "name": "price.promoPriceFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Discount" + }, + "name": "price.discountFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Quantity" + }, + "name": "quantity", + "renderer": "default", + "sortable": true, + "type": "integer" + }, + { + "label_i18n": { + "en_US": "UOM" + }, + "name": "skuUnitOfMeasure.name", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Total" + }, + "name": "price.finalPriceFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/placed-orders/data-set.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/placed-orders/data-set.json new file mode 100644 index 00000000000000..811d32ab0903f9 --- /dev/null +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/data-sets/placed-orders/data-set.json @@ -0,0 +1,117 @@ +{ + "dataSet": { + "externalReferenceCode": "commerce-placed-orders-data-set", + "label": "Placed Orders", + "restApplication": "/headless-commerce-delivery-order/v1.0", + "restEndpoint": "/v1.0/channels/{channelId}/placed-orders", + "restSchema": "PlacedOrder" + }, + "views": [ + { + "actions": [ + { + "confirmationMessage_i18n": { + }, + "icon": "view", + "label_i18n": { + "en_US": "View" + }, + "method": "", + "modalSize": "", + "permissionKey": "", + "title_i18n": { + }, + "type": "link", + "url": "order/{id}" + } + ], + "externalReferenceCode": "commerce-placed-orders-data-set-view", + "label": "Placed Orders View", + "visualizationModes": { + "table": [ + { + "label_i18n": { + "en_US": "Order ID" + }, + "name": "id", + "renderer": "actionLink", + "sortable": true, + "type": "integer" + }, + { + "label_i18n": { + "en_US": "Order Name" + }, + "name": "name", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Order Date" + }, + "name": "createDate", + "renderer": "Date", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "ERC" + }, + "name": "externalReferenceCode", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Purchase Order Number" + }, + "name": "purchaseOrderNumber", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Account" + }, + "name": "account", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Amount" + }, + "name": "summary.totalFormatted", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Created by" + }, + "name": "author", + "renderer": "default", + "sortable": true, + "type": "string" + }, + { + "label_i18n": { + "en_US": "Status" + }, + "name": "orderStatusInfo.label_i18n", + "renderer": "label", + "sortable": true, + "type": "string" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/cart/display-page-template.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/cart/display-page-template.json new file mode 100644 index 00000000000000..462e77f2a825b2 --- /dev/null +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/cart/display-page-template.json @@ -0,0 +1,6 @@ +{ + "contentType": { + "className": "com.liferay.commerce.model.CommerceOrder" + }, + "name": "cart" +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/cart/page-definition.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/cart/page-definition.json new file mode 100644 index 00000000000000..37c1b7c66fff43 --- /dev/null +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/cart/page-definition.json @@ -0,0 +1,41 @@ +{ + "pageElement": { + "pageElements": [ + { + "definition": { + "fragmentSettings": { + "unallowedFragments": [ + ] + } + }, + "type": "DropZone" + }, + { + "definition": { + "fragment": { + "key": "com.liferay.frontend.data.set.admin.web.internal.fragment.renderer.FDSAdminFragmentRenderer" + }, + "fragmentConfig": { + "itemSelector": { + "className": "com.liferay.object.model.ObjectDefinition#[$OBJECT_DEFINITION_ID:FDSView$]", + "classPK": "[$FDS_VIEW_ERC:commerce-pending-order-items-data-set-view$]", + "externalReferenceCode": "commerce-pending-order-items-data-set-view", + "itemType": "_com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageEditorPortlet_selectInfoItem" + } + }, + "fragmentFields": [ + ], + "indexed": true + }, + "type": "Fragment" + } + ], + "type": "Root" + }, + "settings": { + "masterPage": { + "key": "commerce-classic-master" + } + }, + "version": 1.1 +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/order/display-page-template.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/order/display-page-template.json new file mode 100644 index 00000000000000..7a2f086f3335a9 --- /dev/null +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/order/display-page-template.json @@ -0,0 +1,6 @@ +{ + "contentType": { + "className": "com.liferay.commerce.model.CommerceOrder" + }, + "name": "order" +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/order/page-definition.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/order/page-definition.json new file mode 100644 index 00000000000000..288a0b2070a93d --- /dev/null +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layout-page-templates/display-page-templates/order/page-definition.json @@ -0,0 +1,41 @@ +{ + "pageElement": { + "pageElements": [ + { + "definition": { + "fragmentSettings": { + "unallowedFragments": [ + ] + } + }, + "type": "DropZone" + }, + { + "definition": { + "fragment": { + "key": "com.liferay.frontend.data.set.admin.web.internal.fragment.renderer.FDSAdminFragmentRenderer" + }, + "fragmentConfig": { + "itemSelector": { + "className": "com.liferay.object.model.ObjectDefinition#[$OBJECT_DEFINITION_ID:FDSView$]", + "classPK": "[$FDS_VIEW_ERC:commerce-placed-order-items-data-set-view$]", + "externalReferenceCode": "commerce-placed-order-items-data-set-view", + "itemType": "_com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageEditorPortlet_selectInfoItem" + } + }, + "fragmentFields": [ + ], + "indexed": true + }, + "type": "Fragment" + } + ], + "type": "Root" + }, + "settings": { + "masterPage": { + "key": "commerce-classic-master" + } + }, + "version": 1.1 +} \ No newline at end of file diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layouts/pending-orders/page-definition.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layouts/pending-orders/page-definition.json index da212350c6edba..35858eb58e3d70 100644 --- a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layouts/pending-orders/page-definition.json +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layouts/pending-orders/page-definition.json @@ -1,5 +1,35 @@ { "pageElement": { + "pageElements": [ + { + "definition": { + "fragmentSettings": { + "unallowedFragments": [ + ] + } + }, + "type": "DropZone" + }, + { + "definition": { + "fragment": { + "key": "com.liferay.frontend.data.set.admin.web.internal.fragment.renderer.FDSAdminFragmentRenderer" + }, + "fragmentConfig": { + "itemSelector": { + "className": "com.liferay.object.model.ObjectDefinition#[$OBJECT_DEFINITION_ID:FDSView$]", + "classPK": "[$FDS_VIEW_ERC:commerce-pending-orders-data-set-view$]", + "externalReferenceCode": "commerce-pending-orders-data-set-view", + "itemType": "_com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageEditorPortlet_selectInfoItem" + } + }, + "fragmentFields": [ + ], + "indexed": true + }, + "type": "Fragment" + } + ], "type": "Root" }, "settings": { diff --git a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layouts/placed-orders/page-definition.json b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layouts/placed-orders/page-definition.json index da212350c6edba..ec96e905160b84 100644 --- a/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layouts/placed-orders/page-definition.json +++ b/modules/apps/commerce/commerce-site-initializer/commerce-site-initializer/src/main/resources/site-initializer/layouts/placed-orders/page-definition.json @@ -1,5 +1,35 @@ { "pageElement": { + "pageElements": [ + { + "definition": { + "fragmentSettings": { + "unallowedFragments": [ + ] + } + }, + "type": "DropZone" + }, + { + "definition": { + "fragment": { + "key": "com.liferay.frontend.data.set.admin.web.internal.fragment.renderer.FDSAdminFragmentRenderer" + }, + "fragmentConfig": { + "itemSelector": { + "className": "com.liferay.object.model.ObjectDefinition#[$OBJECT_DEFINITION_ID:FDSView$]", + "classPK": "[$FDS_VIEW_ERC:commerce-placed-orders-data-set-view$]", + "externalReferenceCode": "commerce-placed-orders-data-set-view", + "itemType": "_com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageEditorPortlet_selectInfoItem" + } + }, + "fragmentFields": [ + ], + "indexed": true + }, + "type": "Fragment" + } + ], "type": "Root" }, "settings": { diff --git a/modules/apps/site-initializer/site-initializer-extender/site-initializer-extender-api/src/main/java/com/liferay/site/initializer/extender/CommerceSiteInitializer.java b/modules/apps/site-initializer/site-initializer-extender/site-initializer-extender-api/src/main/java/com/liferay/site/initializer/extender/CommerceSiteInitializer.java index b53cb01fc16e0f..587dd6b35c05ba 100644 --- a/modules/apps/site-initializer/site-initializer-extender/site-initializer-extender-api/src/main/java/com/liferay/site/initializer/extender/CommerceSiteInitializer.java +++ b/modules/apps/site-initializer/site-initializer-extender/site-initializer-extender-api/src/main/java/com/liferay/site/initializer/extender/CommerceSiteInitializer.java @@ -16,6 +16,7 @@ /** * @author Nilton Vieira + * @author Gianmarco Brunialti Masera */ @ProviderType public interface CommerceSiteInitializer { @@ -30,6 +31,12 @@ public void addCPDefinitions( Map stringUtilReplaceValues) throws Exception; + public void addFDSEntries( + Bundle bundle, ServiceContext serviceContext, + ServletContext servletContext, + Map stringUtilReplaceValues) + throws Exception; + public void addPortletSettings( ClassLoader classLoader, ServiceContext serviceContext, ServletContext servletContext) diff --git a/modules/apps/site-initializer/site-initializer-extender/site-initializer-extender/src/main/java/com/liferay/site/initializer/extender/internal/BundleSiteInitializer.java b/modules/apps/site-initializer/site-initializer-extender/site-initializer-extender/src/main/java/com/liferay/site/initializer/extender/internal/BundleSiteInitializer.java index 9091672454bf8b..3af7b8555b6352 100644 --- a/modules/apps/site-initializer/site-initializer-extender/site-initializer-extender/src/main/java/com/liferay/site/initializer/extender/internal/BundleSiteInitializer.java +++ b/modules/apps/site-initializer/site-initializer-extender/site-initializer-extender/src/main/java/com/liferay/site/initializer/extender/internal/BundleSiteInitializer.java @@ -837,6 +837,22 @@ private void _addExpandoValues( } } + private void _addFDSEntries( + ServiceContext serviceContext, + Map stringUtilReplaceValues) + throws Exception { + + CommerceSiteInitializer commerceSiteInitializer = + _commerceSiteInitializerSnapshot.get(); + + if (commerceSiteInitializer == null) { + return; + } + + commerceSiteInitializer.addFDSEntries( + _bundle, serviceContext, _servletContext, stringUtilReplaceValues); + } + private void _addFragmentEntries( long groupId, String parentResourcePath, ServiceContext serviceContext, @@ -5004,9 +5020,15 @@ private Map> _createRMap(ServiceContext serviceContext) { R addCPDefinitionsR = new R( "addCPDefinitions", () -> _addCPDefinitions(serviceContext, stringUtilReplaceValues)); + R addFDSEntriesR = new R( + "addFDSEntries", + () -> _addFDSEntries(serviceContext, stringUtilReplaceValues)); R addExpandoValuesR = new R( "addExpandoValues", () -> _addExpandoValues(serviceContext, stringUtilReplaceValues)); + R addFDSEntriesR = new R( + "addFDSEntries", + () -> _addFDSEntries(serviceContext, stringUtilReplaceValues)); R addFragmentEntriesR = new R( "addFragmentEntries", () -> _addFragmentEntries(serviceContext, stringUtilReplaceValues)); @@ -5190,12 +5212,18 @@ addAccountsR, _dependsOn(addOrUpdateExpandoColumnsR) ).put( addCPDefinitionsR, _dependsOn(addOrUpdateLayoutsR, addOrUpdateObjectEntriesR) + ).put( + addFDSEntriesR, + _dependsOn(addOrUpdateLayoutsR, addOrUpdateObjectEntriesR) ).put( addExpandoValuesR, _dependsOn( addOrUpdateBlogPostingsR, addOrUpdateJournalArticlesR, addOrUpdateKnowledgeBaseArticlesR, addOrUpdateLayoutsContentR, addOrUpdateSegmentsEntriesR, addOrUpdateUserGroupsR) + ).put( + addFDSEntriesR, + _dependsOn(addOrUpdateLayoutsR, addOrUpdateObjectEntriesR) ).put( addFragmentEntriesR, _dependsOn(addOrUpdateDocumentsR) ).put(