Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ae00a30
LPD-70380 Enhance the context with the identifiers of the company and…
lfbesada Nov 3, 2025
445049e
LPD-70380 Export the configuration field values of the type Category
lfbesada Nov 3, 2025
88e3765
LPD-70380 Add a method to log a missing ItemExternalReference
lfbesada Oct 24, 2025
c4b8811
LPD-70380 Import the configuration field values of the type Category
lfbesada Nov 3, 2025
d0eb037
LPD-70380 Add tests to asserting that the configuration values could …
lfbesada Nov 3, 2025
a2693d5
LPD-70380 Add a util to manage the references with support for catego…
lfbesada Oct 24, 2025
d7fa540
LPD-70380 Add test capabilities to category fragment configuration fi…
lfbesada Nov 3, 2025
4b422e9
LPD-70380 Add category fragment configuration fields to the test, ass…
lfbesada Nov 3, 2025
1a229bb
LPD-70380 Assert the missing reference log
lfbesada Nov 3, 2025
8072611
LPD-70389 Export the configuration field values of the type Collection
lfbesada Nov 3, 2025
a7c484b
LPD-70389 Import the configuration field values of the type Collection
lfbesada Nov 3, 2025
ab3ac22
LPD-70389 Add support to test the configuration fields of the type co…
lfbesada Nov 3, 2025
f062221
LPD-70389 Add tests for collection fragment configuration field value…
lfbesada Nov 3, 2025
0494083
LPD-70389 Prevent an error in case there is no service context's user…
lfbesada Nov 3, 2025
a5a8c44
LPD-70381 Export the configuration field values of the type Item
lfbesada Nov 3, 2025
7505c26
LPD-70381 Import the configuration field values of the type Item
lfbesada Nov 3, 2025
6bf337a
LPD-70381 Add support to test the values of the configuration fields …
lfbesada Nov 3, 2025
0f45e5d
LPD-70381 Add tests for item fragment configuration field values asse…
lfbesada Nov 3, 2025
c1855be
LPD-70416 Add a type util to help conversion external/internal types …
lfbesada Nov 3, 2025
d528ae4
LPD-70416 Export the configuration field values of the type navigatio…
lfbesada Nov 3, 2025
5410438
LPD-70416 Import the configuration field values of the type navigatio…
lfbesada Nov 3, 2025
1a3f67b
LPD-70416 Add support to test the values of the configuration fields …
lfbesada Nov 3, 2025
094bf5b
LPD-70416 Add tests for navigation menu fragment configuration field …
lfbesada Nov 3, 2025
08f3ab9
LPD-70416 Set explicitly the class name, as we are not setting the cl…
lfbesada Nov 3, 2025
9bf49b6
LPD-70416 Add required dependency
lfbesada Nov 3, 2025
f672324
LPD-70382 Export the configuration field values of the types color pa…
lfbesada Nov 3, 2025
8ea2dfd
LPD-70382 Import the configuration field values of the types color pa…
lfbesada Nov 3, 2025
30f5f17
LPD-70382 Add support to test the values of the configuration fields …
lfbesada Nov 3, 2025
0b21c99
LPD-70382 Add tests for color palette and color picker fragment confi…
lfbesada Nov 3, 2025
8088fd5
LPD-70456 Export the configuration field values of the types URL and …
lfbesada Nov 3, 2025
fcb3bd4
LPD-70456 Rename
lfbesada Nov 11, 2025
65caf26
LPD-70456 Extract to reuse, no logic changes
lfbesada Nov 3, 2025
475cba2
LPD-70456 Import the configuration field values of the types URL and …
lfbesada Nov 3, 2025
5fa081f
LPD-70456 Add support to test the values of the configuration fields …
lfbesada Nov 3, 2025
fa619d9
LPD-70456 Add tests for url and video fragment configuration field va…
lfbesada Nov 3, 2025
dfd608d
LPD-70456 Fix issues trying to cast empty strings as JSONObjects beca…
lfbesada Nov 11, 2025
9f42c50
LPD-70708 Add a test to expose the issue
lfbesada Nov 5, 2025
b12da72
LPD-70708 In case of adding a new item using an existing item ID remo…
lfbesada Nov 5, 2025
14f71d7
wip fix page settings
lfbesada Nov 7, 2025
269ef1e
wip test
lfbesada Nov 7, 2025
1bcb6d4
LPD-70456 Fix the field of the DTOs by instanciating and then callin…
ccorreagg Nov 4, 2025
5e4beb0
LPD-70456 Set pageSpecifications as nested fields to be exported alon…
ccorreagg Nov 4, 2025
4b06a00
Revert just some code to check if the creation of the DataSet works a…
ccorreagg Nov 6, 2025
d1b11e6
LPD-70456 We have to execute this code (for example, to add the segme…
ccorreagg Nov 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void onAfterUpdate(

private void _addAssetListEntryUsage(
long classNameId, long fragmentEntryLinkId, long groupId, String key,
long plid) {
long plid, long userId) {

ServiceContext serviceContext =
ServiceContextThreadLocal.getServiceContext();
Expand All @@ -76,7 +76,7 @@ private void _addAssetListEntryUsage(

try {
_assetListEntryUsageLocalService.addAssetListEntryUsage(
serviceContext.getUserId(), groupId, classNameId,
userId, groupId, classNameId,
String.valueOf(fragmentEntryLinkId),
_portal.getClassNameId(FragmentEntryLink.class.getName()), key,
plid, serviceContext);
Expand Down Expand Up @@ -131,7 +131,7 @@ private void _updateAssetListEntryUsages(
fragmentEntryLink.getFragmentEntryLinkId(),
fragmentEntryLink.getGroupId(),
fieldValueJSONObject.getString("key"),
fragmentEntryLink.getPlid());
fragmentEntryLink.getPlid(), fragmentEntryLink.getUserId());
}

if (fieldValueJSONObject.has("classPK")) {
Expand All @@ -140,7 +140,7 @@ private void _updateAssetListEntryUsages(
fragmentEntryLink.getFragmentEntryLinkId(),
fragmentEntryLink.getGroupId(),
fieldValueJSONObject.getString("classPK"),
fragmentEntryLink.getPlid());
fragmentEntryLink.getPlid(), fragmentEntryLink.getUserId());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

import com.liferay.headless.admin.site.dto.v1_0.ContainerPageElementDefinition;
import com.liferay.headless.admin.site.dto.v1_0.HtmlProperties;
import com.liferay.headless.admin.site.dto.v1_0.PageElementDefinition;
import com.liferay.headless.admin.site.internal.dto.v1_0.util.ContainerLayoutUtil;
import com.liferay.headless.admin.site.internal.dto.v1_0.util.FragmentLinkUtil;
import com.liferay.headless.admin.site.internal.dto.v1_0.util.FragmentViewportUtil;
import com.liferay.headless.admin.site.internal.dto.v1_0.util.LayoutUtil;
import com.liferay.info.item.InfoItemServiceRegistry;
import com.liferay.layout.converter.ContentVisibilityConverter;
import com.liferay.layout.util.structure.ContainerStyledLayoutStructureItem;
Expand Down Expand Up @@ -58,65 +57,63 @@ public ContainerPageElementDefinition toDTO(
throw new UnsupportedOperationException();
}

return new ContainerPageElementDefinition() {
{
setContentVisibility(
() -> {
String contentVisibility =
containerStyledLayoutStructureItem.
getContentVisibility();

if (Validator.isNull(contentVisibility)) {
return null;
}

return ContentVisibility.create(
ContentVisibilityConverter.convertToExternalValue(
contentVisibility));
});
setCssClasses(
() -> {
Set<String> cssClasses =
containerStyledLayoutStructureItem.getCssClasses();

if (SetUtil.isEmpty(cssClasses)) {
return null;
}

return ArrayUtil.toStringArray(cssClasses);
});
setCustomCSS(
() -> {
String customCSS =
containerStyledLayoutStructureItem.getCustomCSS();

if (Validator.isNotNull(customCSS)) {
return customCSS;
}

return null;
});
setFragmentLink(
() -> FragmentLinkUtil.toFragmentLink(
companyId, _infoItemServiceRegistry,
containerStyledLayoutStructureItem.getLinkJSONObject(),
scopeGroupId));
setFragmentViewports(
() -> FragmentViewportUtil.toFragmentViewports(
containerStyledLayoutStructureItem.
getItemConfigJSONObject()));
setHtmlProperties(
() -> _toHtmlProperties(
containerStyledLayoutStructureItem));
setIndexed(containerStyledLayoutStructureItem::isIndexed);
setLayout(
() -> LayoutUtil.toLayout(
containerStyledLayoutStructureItem.
getItemConfigJSONObject()));
setName(containerStyledLayoutStructureItem::getName);
setType(PageElementDefinition.Type.CONTAINER);
}
};
ContainerPageElementDefinition containerPageElementDefinition =
new ContainerPageElementDefinition();

containerPageElementDefinition.setContentVisibility(
() -> {
String contentVisibility =
containerStyledLayoutStructureItem.getContentVisibility();

if (Validator.isNull(contentVisibility)) {
return null;
}

return ContainerPageElementDefinition.ContentVisibility.create(
ContentVisibilityConverter.convertToExternalValue(
contentVisibility));
});
containerPageElementDefinition.setCssClasses(
() -> {
Set<String> cssClasses =
containerStyledLayoutStructureItem.getCssClasses();

if (SetUtil.isEmpty(cssClasses)) {
return null;
}

return ArrayUtil.toStringArray(cssClasses);
});
containerPageElementDefinition.setCustomCSS(
() -> {
String customCSS =
containerStyledLayoutStructureItem.getCustomCSS();

if (Validator.isNotNull(customCSS)) {
return customCSS;
}

return null;
});
containerPageElementDefinition.setFragmentLink(
() -> FragmentLinkUtil.toFragmentLink(
companyId, _infoItemServiceRegistry,
containerStyledLayoutStructureItem.getLinkJSONObject(),
scopeGroupId));
containerPageElementDefinition.setFragmentViewports(
() -> FragmentViewportUtil.toFragmentViewports(
containerStyledLayoutStructureItem.getItemConfigJSONObject()));
containerPageElementDefinition.setHtmlProperties(
() -> _toHtmlProperties(containerStyledLayoutStructureItem));
containerPageElementDefinition.setIndexed(
containerStyledLayoutStructureItem::isIndexed);
containerPageElementDefinition.setLayout(
() -> ContainerLayoutUtil.toLayout(
containerStyledLayoutStructureItem.getItemConfigJSONObject()));
containerPageElementDefinition.setName(
containerStyledLayoutStructureItem::getName);

return containerPageElementDefinition;
}

private HtmlProperties _toHtmlProperties(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import com.liferay.headless.admin.site.dto.v1_0.SuccessFormContainerSubmissionResult;
import com.liferay.headless.admin.site.dto.v1_0.SuccessNotificationMessage;
import com.liferay.headless.admin.site.dto.v1_0.URLFormContainerSubmissionResult;
import com.liferay.headless.admin.site.internal.dto.v1_0.util.ContainerLayoutUtil;
import com.liferay.headless.admin.site.internal.dto.v1_0.util.FragmentViewportUtil;
import com.liferay.headless.admin.site.internal.dto.v1_0.util.ItemScopeUtil;
import com.liferay.headless.admin.site.internal.dto.v1_0.util.LayoutUtil;
import com.liferay.headless.admin.site.internal.dto.v1_0.util.LocalizedValueUtil;
import com.liferay.layout.page.template.model.LayoutPageTemplateEntry;
import com.liferay.layout.page.template.service.LayoutPageTemplateEntryLocalService;
Expand Down Expand Up @@ -107,7 +107,7 @@ public FormContainerPageElementDefinition toDTO(
formContainerPageElementDefinition.setIndexed(
formStyledLayoutStructureItem::isIndexed);
formContainerPageElementDefinition.setLayout(
() -> LayoutUtil.toLayout(
() -> ContainerLayoutUtil.toLayout(
formStyledLayoutStructureItem.getItemConfigJSONObject()));
formContainerPageElementDefinition.setName(
formStyledLayoutStructureItem::getName);
Expand Down
Loading