Skip to content

Commit

Permalink
LPD-44292 Uses the util class to get the proper parent layout structu…
Browse files Browse the repository at this point in the history
…re item
  • Loading branch information
ealonso authored and brianchandotcom committed Dec 17, 2024
1 parent 6181859 commit 486aaec
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer;

import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.layout.util.structure.LayoutStructure;
import com.liferay.layout.util.structure.LayoutStructureItem;
Expand All @@ -26,7 +27,8 @@ public LayoutStructureItem addLayoutStructureItem(

return layoutStructure.addCollectionItemLayoutStructureItem(
pageElement.getExternalReferenceCode(),
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.liferay.headless.admin.site.dto.v1_0.EmptyCollectionConfig;
import com.liferay.headless.admin.site.dto.v1_0.PageCollectionDefinition;
import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.layout.util.CollectionPaginationUtil;
import com.liferay.layout.util.structure.CollectionStyledLayoutStructureItem;
Expand Down Expand Up @@ -36,7 +37,8 @@ public LayoutStructureItem addLayoutStructureItem(
(CollectionStyledLayoutStructureItem)
layoutStructure.addCollectionStyledLayoutStructureItem(
pageElement.getExternalReferenceCode(),
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());

PageCollectionDefinition pageCollectionDefinition =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.liferay.headless.admin.site.dto.v1_0.PageColumnDefinition;
import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.layout.util.structure.ColumnLayoutStructureItem;
import com.liferay.layout.util.structure.LayoutStructure;
Expand All @@ -30,7 +31,8 @@ public LayoutStructureItem addLayoutStructureItem(
(ColumnLayoutStructureItem)
layoutStructure.addColumnLayoutStructureItem(
pageElement.getExternalReferenceCode(),
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());

PageColumnDefinition pageColumnDefinition =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.liferay.headless.admin.site.dto.v1_0.PageContainerDefinition;
import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.layout.util.structure.ContainerStyledLayoutStructureItem;
import com.liferay.layout.util.structure.LayoutStructure;
Expand All @@ -30,7 +31,8 @@ public LayoutStructureItem addLayoutStructureItem(
(ContainerStyledLayoutStructureItem)
layoutStructure.addContainerStyledLayoutStructureItem(
pageElement.getExternalReferenceCode(),
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());

PageContainerDefinition pageContainerDefinition =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer;

import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.layout.util.structure.LayoutStructure;
import com.liferay.layout.util.structure.LayoutStructureItem;
Expand All @@ -26,7 +27,8 @@ public LayoutStructureItem addLayoutStructureItem(

return layoutStructure.addDropZoneLayoutStructureItem(
pageElement.getExternalReferenceCode(),
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.liferay.headless.admin.site.dto.v1_0.FormConfig;
import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.dto.v1_0.PageFormDefinition;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.headless.delivery.dto.v1_0.ClassTypeReference;
import com.liferay.headless.delivery.dto.v1_0.ContextReference;
Expand Down Expand Up @@ -37,7 +38,8 @@ public LayoutStructureItem addLayoutStructureItem(
(FormStyledLayoutStructureItem)
layoutStructure.addFormStyledLayoutStructureItem(
pageElement.getExternalReferenceCode(),
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());

PageFormDefinition pageFormDefinition =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer;

import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.layout.util.structure.LayoutStructure;
import com.liferay.layout.util.structure.LayoutStructureItem;
Expand All @@ -26,7 +27,8 @@ public LayoutStructureItem addLayoutStructureItem(

return layoutStructure.addFormStepContainerStyledLayoutStructureItem(
pageElement.getExternalReferenceCode(),
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer;

import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.layout.util.structure.LayoutStructure;
import com.liferay.layout.util.structure.LayoutStructureItem;
Expand All @@ -26,7 +27,8 @@ public LayoutStructureItem addLayoutStructureItem(

return layoutStructure.addFormStepLayoutStructureItem(
pageElement.getExternalReferenceCode(),
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.dto.v1_0.PageFragmentDropZoneDefinition;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.layout.util.structure.FragmentDropZoneLayoutStructureItem;
import com.liferay.layout.util.structure.LayoutStructure;
Expand All @@ -31,7 +32,8 @@ public LayoutStructureItem addLayoutStructureItem(
(FragmentDropZoneLayoutStructureItem)
layoutStructure.addFragmentDropZoneLayoutStructureItem(
pageElement.getExternalReferenceCode(),
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());

PageFragmentDropZoneDefinition pageFragmentDropZoneDefinition =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.liferay.headless.admin.site.dto.v1_0.PageElement;
import com.liferay.headless.admin.site.dto.v1_0.PageRowDefinition;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.LayoutStructureUtil;
import com.liferay.headless.admin.site.internal.resource.util.layout.structure.item.importer.context.LayoutStructureItemImporterContext;
import com.liferay.layout.util.constants.LayoutDataItemTypeConstants;
import com.liferay.layout.util.structure.LayoutStructure;
Expand All @@ -33,7 +34,8 @@ public LayoutStructureItem addLayoutStructureItem(
layoutStructure.addLayoutStructureItem(
pageElement.getExternalReferenceCode(),
LayoutDataItemTypeConstants.TYPE_ROW,
pageElement.getParentExternalReferenceCode(),
LayoutStructureUtil.getParentExternalReferenceCode(
pageElement, layoutStructure),
pageElement.getPosition());

PageRowDefinition pageRowDefinition =
Expand Down

0 comments on commit 486aaec

Please sign in to comment.