/** * Returns the parent layout ID of this layout. * * @return the parent layout ID of this layout */ @Override public long getParentLayoutId() { return _layout.getParentLayoutId(); }
throws Exception { if (layout.getParentLayoutId() != LayoutConstants.DEFAULT_PARENT_LAYOUT_ID) {
/** * @see com.liferay.portal.lar.ExportImportHelperImpl#getMissingParentLayouts( * Layout, long) */ protected List<Layout> getMissingRemoteParentLayouts( HttpPrincipal httpPrincipal, Layout layout, long remoteGroupId) throws PortalException { List<Layout> missingRemoteParentLayouts = new ArrayList<>(); long parentLayoutId = layout.getParentLayoutId(); while (parentLayoutId > 0) { Layout parentLayout = LayoutLocalServiceUtil.getLayout( layout.getGroupId(), layout.isPrivateLayout(), parentLayoutId); if (StagingServiceHttp.hasRemoteLayout( httpPrincipal, parentLayout.getUuid(), remoteGroupId, parentLayout.isPrivateLayout())) { // If one parent is found, all others are assumed to exist break; } missingRemoteParentLayouts.add(parentLayout); parentLayoutId = parentLayout.getParentLayoutId(); } return missingRemoteParentLayouts; }
/** * @see com.liferay.exportimport.kernel.backgroundtask.LayoutRemoteStagingBackgroundTaskExecutor#getMissingRemoteParentLayouts( * HttpPrincipal, Layout, long) */ @Override public List<Layout> getMissingParentLayouts(Layout layout, long liveGroupId) throws PortalException { List<Layout> missingParentLayouts = new ArrayList<>(); long parentLayoutId = layout.getParentLayoutId(); Layout parentLayout = null; while (parentLayoutId > 0) { parentLayout = _layoutLocalService.getLayout( layout.getGroupId(), layout.isPrivateLayout(), parentLayoutId); if (_layoutLocalService.hasLayout( parentLayout.getUuid(), liveGroupId, parentLayout.isPrivateLayout())) { // If one parent is found, all others are assumed to exist break; } missingParentLayouts.add(parentLayout); parentLayoutId = parentLayout.getParentLayoutId(); } return missingParentLayouts; }
soapModel.setPrivateLayout(model.isPrivateLayout()); soapModel.setLayoutId(model.getLayoutId()); soapModel.setParentLayoutId(model.getParentLayoutId()); soapModel.setName(model.getName()); soapModel.setTitle(model.getTitle());