
com.liferay.headless.delivery.internal.resource.v1_0.BaseStructuredContentResourceImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.headless.delivery.impl
Show all versions of com.liferay.headless.delivery.impl
Liferay Headless Delivery Implementation
The newest version!
/**
* SPDX-FileCopyrightText: (c) 2000 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.headless.delivery.internal.resource.v1_0;
import com.liferay.headless.delivery.dto.v1_0.DefaultValue;
import com.liferay.headless.delivery.dto.v1_0.Rating;
import com.liferay.headless.delivery.dto.v1_0.StructuredContent;
import com.liferay.headless.delivery.resource.v1_0.StructuredContentResource;
import com.liferay.petra.function.UnsafeBiConsumer;
import com.liferay.petra.function.UnsafeConsumer;
import com.liferay.petra.function.UnsafeFunction;
import com.liferay.petra.function.transform.TransformUtil;
import com.liferay.petra.string.StringPool;
import com.liferay.portal.kernel.exception.NoSuchModelException;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.model.Resource;
import com.liferay.portal.kernel.model.ResourceAction;
import com.liferay.portal.kernel.model.ResourceConstants;
import com.liferay.portal.kernel.model.ResourcePermission;
import com.liferay.portal.kernel.security.permission.ActionKeys;
import com.liferay.portal.kernel.security.permission.resource.ModelResourcePermission;
import com.liferay.portal.kernel.service.GroupLocalService;
import com.liferay.portal.kernel.service.PermissionServiceUtil;
import com.liferay.portal.kernel.service.ResourceActionLocalService;
import com.liferay.portal.kernel.service.ResourceLocalServiceUtil;
import com.liferay.portal.kernel.service.ResourcePermissionLocalService;
import com.liferay.portal.kernel.service.RoleLocalService;
import com.liferay.portal.kernel.service.permission.ModelPermissions;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.GroupThreadLocal;
import com.liferay.portal.kernel.util.HashMapBuilder;
import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.SetUtil;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.odata.entity.EntityModel;
import com.liferay.portal.odata.filter.ExpressionConvert;
import com.liferay.portal.odata.filter.FilterParser;
import com.liferay.portal.odata.filter.FilterParserProvider;
import com.liferay.portal.odata.sort.SortField;
import com.liferay.portal.odata.sort.SortParser;
import com.liferay.portal.odata.sort.SortParserProvider;
import com.liferay.portal.vulcan.accept.language.AcceptLanguage;
import com.liferay.portal.vulcan.batch.engine.VulcanBatchEngineTaskItemDelegate;
import com.liferay.portal.vulcan.batch.engine.resource.VulcanBatchEngineExportTaskResource;
import com.liferay.portal.vulcan.batch.engine.resource.VulcanBatchEngineImportTaskResource;
import com.liferay.portal.vulcan.crud.VulcanCRUDItemDelegate;
import com.liferay.portal.vulcan.pagination.Page;
import com.liferay.portal.vulcan.pagination.Pagination;
import com.liferay.portal.vulcan.permission.ModelPermissionsUtil;
import com.liferay.portal.vulcan.permission.Permission;
import com.liferay.portal.vulcan.resource.EntityModelResource;
import com.liferay.portal.vulcan.util.ActionUtil;
import com.liferay.portal.vulcan.util.UriInfoUtil;
import jakarta.annotation.Generated;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.ws.rs.NotSupportedException;
import jakarta.ws.rs.core.MultivaluedHashMap;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.UriInfo;
import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
/**
* @author Javier Gamarra
* @generated
*/
@Generated("")
@jakarta.ws.rs.Path("/v1.0")
public abstract class BaseStructuredContentResourceImpl
implements EntityModelResource, StructuredContentResource,
VulcanBatchEngineTaskItemDelegate,
VulcanCRUDItemDelegate {
/**
* Invoke this method with the command line:
*
* curl -X 'DELETE' 'http://localhost:8080/o/headless-delivery/v1.0/asset-libraries/{assetLibraryId}/structured-contents/by-external-reference-code/{externalReferenceCode}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Deletes the asset library's structured content by external reference code."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "assetLibraryId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "externalReferenceCode"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.DELETE
@jakarta.ws.rs.Path(
"/asset-libraries/{assetLibraryId}/structured-contents/by-external-reference-code/{externalReferenceCode}"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public void deleteAssetLibraryStructuredContentByExternalReferenceCode(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("assetLibraryId")
Long assetLibraryId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("externalReferenceCode")
String externalReferenceCode)
throws Exception {
}
/**
* Invoke this method with the command line:
*
* curl -X 'DELETE' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents/by-external-reference-code/{externalReferenceCode}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Deletes the site's structured content by external reference code."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "externalReferenceCode"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.DELETE
@jakarta.ws.rs.Path(
"/sites/{siteId}/structured-contents/by-external-reference-code/{externalReferenceCode}"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public void deleteSiteStructuredContentByExternalReferenceCode(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("externalReferenceCode")
String externalReferenceCode)
throws Exception {
}
/**
* Invoke this method with the command line:
*
* curl -X 'DELETE' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Deletes the structured content and returns a 204 if the operation succeeds."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.DELETE
@jakarta.ws.rs.Path("/structured-contents/{structuredContentId}")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public void deleteStructuredContent(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId)
throws Exception {
}
/**
* Invoke this method with the command line:
*
* curl -X 'DELETE' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/batch' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "callbackURL"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes("application/json")
@jakarta.ws.rs.DELETE
@jakarta.ws.rs.Path("/structured-contents/batch")
@jakarta.ws.rs.Produces("application/json")
@Override
public Response deleteStructuredContentBatch(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("callbackURL")
String callbackURL,
Object object)
throws Exception {
vulcanBatchEngineImportTaskResource.setContextAcceptLanguage(
contextAcceptLanguage);
vulcanBatchEngineImportTaskResource.setContextCompany(contextCompany);
vulcanBatchEngineImportTaskResource.setContextHttpServletRequest(
contextHttpServletRequest);
vulcanBatchEngineImportTaskResource.setContextUriInfo(contextUriInfo);
vulcanBatchEngineImportTaskResource.setContextUser(contextUser);
Response.ResponseBuilder responseBuilder = Response.accepted();
return responseBuilder.entity(
vulcanBatchEngineImportTaskResource.deleteImportTask(
StructuredContent.class.getName(), callbackURL, object)
).build();
}
/**
* Invoke this method with the command line:
*
* curl -X 'DELETE' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/my-rating' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Deletes the structured content's rating and returns a 204 if the operation succeeds."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.DELETE
@jakarta.ws.rs.Path("/structured-contents/{structuredContentId}/my-rating")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public void deleteStructuredContentMyRating(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId)
throws Exception {
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/asset-libraries/{assetLibraryId}/structured-contents/by-external-reference-code/{externalReferenceCode}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "assetLibraryId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "externalReferenceCode"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path(
"/asset-libraries/{assetLibraryId}/structured-contents/by-external-reference-code/{externalReferenceCode}"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public StructuredContent
getAssetLibraryStructuredContentByExternalReferenceCode(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("assetLibraryId")
Long assetLibraryId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("externalReferenceCode")
String externalReferenceCode)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/asset-libraries/{assetLibraryId}/structured-contents/permissions' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "assetLibraryId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "roleNames"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path(
"/asset-libraries/{assetLibraryId}/structured-contents/permissions"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public Page getAssetLibraryStructuredContentPermissionsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("assetLibraryId")
Long assetLibraryId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("roleNames")
String roleNames)
throws Exception {
String portletName = getPermissionCheckerPortletName(assetLibraryId);
PermissionServiceUtil.checkPermission(
assetLibraryId, portletName, assetLibraryId);
return toPermissionPage(
HashMapBuilder.put(
"get",
addAction(
ActionKeys.PERMISSIONS,
"getAssetLibraryStructuredContentPermissionsPage",
portletName, assetLibraryId)
).put(
"replace",
addAction(
ActionKeys.PERMISSIONS,
"putAssetLibraryStructuredContentPermissionsPage",
portletName, assetLibraryId)
).build(),
assetLibraryId, portletName, roleNames);
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/asset-libraries/{assetLibraryId}/structured-contents' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "assetLibraryId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "aggregationTerms"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "filter"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "flatten"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "page"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "pageSize"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "search"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "sort"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path("/asset-libraries/{assetLibraryId}/structured-contents")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public Page getAssetLibraryStructuredContentsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("assetLibraryId")
Long assetLibraryId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("flatten")
Boolean flatten,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("search")
String search,
@jakarta.ws.rs.core.Context
com.liferay.portal.vulcan.aggregation.Aggregation aggregation,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.filter.Filter filter,
@jakarta.ws.rs.core.Context Pagination pagination,
@jakarta.ws.rs.core.Context com.liferay.portal.kernel.search.Sort[]
sorts)
throws Exception {
return Page.of(Collections.emptyList());
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/content-structures/{contentStructureId}/structured-contents' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves a list of the content structure's structured content. Results can be paginated, filtered, searched, and sorted."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "contentStructureId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "aggregationTerms"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "filter"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "page"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "pageSize"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "search"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "sort"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path(
"/content-structures/{contentStructureId}/structured-contents"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public Page getContentStructureStructuredContentsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("contentStructureId")
Long contentStructureId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("search")
String search,
@jakarta.ws.rs.core.Context
com.liferay.portal.vulcan.aggregation.Aggregation aggregation,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.filter.Filter filter,
@jakarta.ws.rs.core.Context Pagination pagination,
@jakarta.ws.rs.core.Context com.liferay.portal.kernel.search.Sort[]
sorts)
throws Exception {
return Page.of(Collections.emptyList());
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents/by-external-reference-code/{externalReferenceCode}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves the site's structured content by external reference code."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "externalReferenceCode"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path(
"/sites/{siteId}/structured-contents/by-external-reference-code/{externalReferenceCode}"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public StructuredContent getSiteStructuredContentByExternalReferenceCode(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("externalReferenceCode")
String externalReferenceCode)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents/by-key/{key}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves a structured content by its key (`articleKey`)."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "key"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path("/sites/{siteId}/structured-contents/by-key/{key}")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public StructuredContent getSiteStructuredContentByKey(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("key")
String key)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents/by-uuid/{uuid}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves a structured content by its UUID."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "uuid"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path("/sites/{siteId}/structured-contents/by-uuid/{uuid}")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public StructuredContent getSiteStructuredContentByUuid(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("uuid")
String uuid)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents/permissions' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "roleNames"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path("/sites/{siteId}/structured-contents/permissions")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public Page getSiteStructuredContentPermissionsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("roleNames")
String roleNames)
throws Exception {
String portletName = getPermissionCheckerPortletName(siteId);
PermissionServiceUtil.checkPermission(siteId, portletName, siteId);
return toPermissionPage(
HashMapBuilder.put(
"get",
addAction(
ActionKeys.PERMISSIONS,
"getSiteStructuredContentPermissionsPage", portletName,
siteId)
).put(
"replace",
addAction(
ActionKeys.PERMISSIONS,
"putSiteStructuredContentPermissionsPage", portletName,
siteId)
).build(),
siteId, portletName, roleNames);
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves the site's structured content. Results can be paginated, filtered, searched, flattened, and sorted."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "aggregationTerms"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "filter"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "flatten"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "page"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "pageSize"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "search"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "sort"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path("/sites/{siteId}/structured-contents")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public Page getSiteStructuredContentsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("flatten")
Boolean flatten,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("search")
String search,
@jakarta.ws.rs.core.Context
com.liferay.portal.vulcan.aggregation.Aggregation aggregation,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.filter.Filter filter,
@jakarta.ws.rs.core.Context Pagination pagination,
@jakarta.ws.rs.core.Context com.liferay.portal.kernel.search.Sort[]
sorts)
throws Exception {
return Page.of(Collections.emptyList());
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves the structured content via its ID."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path("/structured-contents/{structuredContentId}")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public StructuredContent getStructuredContent(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/structured-content-folders/{structuredContentFolderId}/structured-contents' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves the folder's structured content. Results can be paginated, filtered, searched, and sorted."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentFolderId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "aggregationTerms"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "filter"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "flatten"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "page"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "pageSize"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "search"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "sort"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path(
"/structured-content-folders/{structuredContentFolderId}/structured-contents"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public Page
getStructuredContentFolderStructuredContentsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentFolderId")
Long structuredContentFolderId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("flatten")
Boolean flatten,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("search")
String search,
@jakarta.ws.rs.core.Context
com.liferay.portal.vulcan.aggregation.Aggregation
aggregation,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.filter.Filter filter,
@jakarta.ws.rs.core.Context Pagination pagination,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.Sort[] sorts)
throws Exception {
return Page.of(Collections.emptyList());
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/my-rating' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves the structured content's rating."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path("/structured-contents/{structuredContentId}/my-rating")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public Rating getStructuredContentMyRating(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId)
throws Exception {
return new Rating();
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/permissions' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "roleNames"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path(
"/structured-contents/{structuredContentId}/permissions"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public Page getStructuredContentPermissionsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("roleNames")
String roleNames)
throws Exception {
String resourceName = getPermissionCheckerResourceName(
structuredContentId);
Long resourceId = getPermissionCheckerResourceId(structuredContentId);
PermissionServiceUtil.checkPermission(
getPermissionCheckerGroupId(structuredContentId), resourceName,
resourceId);
return toPermissionPage(
HashMapBuilder.put(
"get",
addAction(
ActionKeys.PERMISSIONS,
"getStructuredContentPermissionsPage", resourceName,
resourceId)
).put(
"replace",
addAction(
ActionKeys.PERMISSIONS,
"putStructuredContentPermissionsPage", resourceName,
resourceId)
).build(),
resourceId, resourceName, roleNames);
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/rendered-content-by-display-page/{displayPageKey}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves the structured content's rendered display page"
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "displayPageKey"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path(
"/structured-contents/{structuredContentId}/rendered-content-by-display-page/{displayPageKey}"
)
@jakarta.ws.rs.Produces("text/html")
@Override
public String
getStructuredContentRenderedContentByDisplayPageDisplayPageKey(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("displayPageKey")
String displayPageKey)
throws Exception {
return StringPool.BLANK;
}
/**
* Invoke this method with the command line:
*
* curl -X 'GET' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/rendered-content/{contentTemplateId}' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Retrieves the structured content's rendered template (the result of applying the structure's values to a template)."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "contentTemplateId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "nestedFields"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "restrictFields"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.GET
@jakarta.ws.rs.Path(
"/structured-contents/{structuredContentId}/rendered-content/{contentTemplateId}"
)
@jakarta.ws.rs.Produces("text/html")
@Override
public String getStructuredContentRenderedContentContentTemplate(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("contentTemplateId")
String contentTemplateId)
throws Exception {
return StringPool.BLANK;
}
/**
* Invoke this method with the command line:
*
* curl -X 'PATCH' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}' -d $'{"contentFields": ___, "contentStructureId": ___, "customFields": ___, "dateExpired": ___, "datePublished": ___, "description": ___, "description_i18n": ___, "externalReferenceCode": ___, "friendlyUrlPath": ___, "friendlyUrlPath_i18n": ___, "keywords": ___, "neverExpire": ___, "permissions": ___, "priority": ___, "relatedContents": ___, "structuredContentFolderId": ___, "taxonomyCategoryIds": ___, "title": ___, "title_i18n": ___, "viewableBy": ___}' --header 'Content-Type: application/json' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Updates only the fields received in the request body, leaving any other fields untouched."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.PATCH
@jakarta.ws.rs.Path("/structured-contents/{structuredContentId}")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public StructuredContent patchStructuredContent(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId,
StructuredContent structuredContent)
throws Exception {
StructuredContent existingStructuredContent = getStructuredContent(
structuredContentId);
if (structuredContent.getContentStructureId() != null) {
existingStructuredContent.setContentStructureId(
structuredContent.getContentStructureId());
}
if (structuredContent.getCustomFields() != null) {
existingStructuredContent.setCustomFields(
structuredContent.getCustomFields());
}
if (structuredContent.getDateExpired() != null) {
existingStructuredContent.setDateExpired(
structuredContent.getDateExpired());
}
if (structuredContent.getDatePublished() != null) {
existingStructuredContent.setDatePublished(
structuredContent.getDatePublished());
}
if (structuredContent.getDescription() != null) {
existingStructuredContent.setDescription(
structuredContent.getDescription());
}
if (structuredContent.getDescription_i18n() != null) {
existingStructuredContent.setDescription_i18n(
structuredContent.getDescription_i18n());
}
if (structuredContent.getExternalReferenceCode() != null) {
existingStructuredContent.setExternalReferenceCode(
structuredContent.getExternalReferenceCode());
}
if (structuredContent.getFriendlyUrlPath() != null) {
existingStructuredContent.setFriendlyUrlPath(
structuredContent.getFriendlyUrlPath());
}
if (structuredContent.getFriendlyUrlPath_i18n() != null) {
existingStructuredContent.setFriendlyUrlPath_i18n(
structuredContent.getFriendlyUrlPath_i18n());
}
if (structuredContent.getKeywords() != null) {
existingStructuredContent.setKeywords(
structuredContent.getKeywords());
}
if (structuredContent.getNeverExpire() != null) {
existingStructuredContent.setNeverExpire(
structuredContent.getNeverExpire());
}
if (structuredContent.getPermissions() != null) {
existingStructuredContent.setPermissions(
structuredContent.getPermissions());
}
if (structuredContent.getPriority() != null) {
existingStructuredContent.setPriority(
structuredContent.getPriority());
}
if (structuredContent.getStructuredContentFolderId() != null) {
existingStructuredContent.setStructuredContentFolderId(
structuredContent.getStructuredContentFolderId());
}
if (structuredContent.getTaxonomyCategoryIds() != null) {
existingStructuredContent.setTaxonomyCategoryIds(
structuredContent.getTaxonomyCategoryIds());
}
if (structuredContent.getTitle() != null) {
existingStructuredContent.setTitle(structuredContent.getTitle());
}
if (structuredContent.getTitle_i18n() != null) {
existingStructuredContent.setTitle_i18n(
structuredContent.getTitle_i18n());
}
if (structuredContent.getViewableBy() != null) {
existingStructuredContent.setViewableBy(
structuredContent.getViewableBy());
}
preparePatch(structuredContent, existingStructuredContent);
return putStructuredContent(
structuredContentId, existingStructuredContent);
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/asset-libraries/{assetLibraryId}/structured-contents' -d $'{"contentFields": ___, "contentStructureId": ___, "customFields": ___, "dateExpired": ___, "datePublished": ___, "description": ___, "description_i18n": ___, "externalReferenceCode": ___, "friendlyUrlPath": ___, "friendlyUrlPath_i18n": ___, "keywords": ___, "neverExpire": ___, "permissions": ___, "priority": ___, "relatedContents": ___, "structuredContentFolderId": ___, "taxonomyCategoryIds": ___, "title": ___, "title_i18n": ___, "viewableBy": ___}' --header 'Content-Type: application/json' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "assetLibraryId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path("/asset-libraries/{assetLibraryId}/structured-contents")
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public StructuredContent postAssetLibraryStructuredContent(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("assetLibraryId")
Long assetLibraryId,
StructuredContent structuredContent)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/asset-libraries/{assetLibraryId}/structured-contents/batch' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "assetLibraryId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "callbackURL"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes("application/json")
@jakarta.ws.rs.Path(
"/asset-libraries/{assetLibraryId}/structured-contents/batch"
)
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces("application/json")
@Override
public Response postAssetLibraryStructuredContentBatch(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("assetLibraryId")
Long assetLibraryId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("callbackURL")
String callbackURL,
Object object)
throws Exception {
vulcanBatchEngineImportTaskResource.setContextAcceptLanguage(
contextAcceptLanguage);
vulcanBatchEngineImportTaskResource.setContextCompany(contextCompany);
vulcanBatchEngineImportTaskResource.setContextHttpServletRequest(
contextHttpServletRequest);
vulcanBatchEngineImportTaskResource.setContextUriInfo(contextUriInfo);
vulcanBatchEngineImportTaskResource.setContextUser(contextUser);
Response.ResponseBuilder responseBuilder = Response.accepted();
return responseBuilder.entity(
vulcanBatchEngineImportTaskResource.postImportTask(
StructuredContent.class.getName(), callbackURL, null, object)
).build();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/asset-libraries/{assetLibraryId}/structured-contents/export-batch' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "assetLibraryId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "filter"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "search"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "sort"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "callbackURL"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "contentType"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fieldNames"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes("application/json")
@jakarta.ws.rs.Path(
"/asset-libraries/{assetLibraryId}/structured-contents/export-batch"
)
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces("application/json")
@Override
public Response postAssetLibraryStructuredContentsPageExportBatch(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("assetLibraryId")
Long assetLibraryId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("search")
String search,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.filter.Filter filter,
@jakarta.ws.rs.core.Context com.liferay.portal.kernel.search.Sort[]
sorts,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("callbackURL")
String callbackURL,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.DefaultValue("JSON")
@jakarta.ws.rs.QueryParam("contentType")
String contentType,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("fieldNames")
String fieldNames)
throws Exception {
vulcanBatchEngineExportTaskResource.setContextAcceptLanguage(
contextAcceptLanguage);
vulcanBatchEngineExportTaskResource.setContextCompany(contextCompany);
vulcanBatchEngineExportTaskResource.setContextHttpServletRequest(
contextHttpServletRequest);
vulcanBatchEngineExportTaskResource.setContextUriInfo(contextUriInfo);
vulcanBatchEngineExportTaskResource.setContextUser(contextUser);
vulcanBatchEngineExportTaskResource.setGroupLocalService(
groupLocalService);
Response.ResponseBuilder responseBuilder = Response.accepted();
return responseBuilder.entity(
vulcanBatchEngineExportTaskResource.postExportTask(
StructuredContent.class.getName(), callbackURL, contentType,
fieldNames)
).build();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/content-structures/{contentStructureId}/structured-contents/export-batch' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "contentStructureId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "filter"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "search"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "sort"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "callbackURL"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "contentType"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fieldNames"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes("application/json")
@jakarta.ws.rs.Path(
"/content-structures/{contentStructureId}/structured-contents/export-batch"
)
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces("application/json")
@Override
public Response postContentStructureStructuredContentsPageExportBatch(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("contentStructureId")
Long contentStructureId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("search")
String search,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.filter.Filter filter,
@jakarta.ws.rs.core.Context com.liferay.portal.kernel.search.Sort[]
sorts,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("callbackURL")
String callbackURL,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.DefaultValue("JSON")
@jakarta.ws.rs.QueryParam("contentType")
String contentType,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("fieldNames")
String fieldNames)
throws Exception {
vulcanBatchEngineExportTaskResource.setContextAcceptLanguage(
contextAcceptLanguage);
vulcanBatchEngineExportTaskResource.setContextCompany(contextCompany);
vulcanBatchEngineExportTaskResource.setContextHttpServletRequest(
contextHttpServletRequest);
vulcanBatchEngineExportTaskResource.setContextUriInfo(contextUriInfo);
vulcanBatchEngineExportTaskResource.setContextUser(contextUser);
vulcanBatchEngineExportTaskResource.setGroupLocalService(
groupLocalService);
Response.ResponseBuilder responseBuilder = Response.accepted();
return responseBuilder.entity(
vulcanBatchEngineExportTaskResource.postExportTask(
StructuredContent.class.getName(), callbackURL, contentType,
fieldNames)
).build();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents' -d $'{"contentFields": ___, "contentStructureId": ___, "customFields": ___, "dateExpired": ___, "datePublished": ___, "description": ___, "description_i18n": ___, "externalReferenceCode": ___, "friendlyUrlPath": ___, "friendlyUrlPath_i18n": ___, "keywords": ___, "neverExpire": ___, "permissions": ___, "priority": ___, "relatedContents": ___, "structuredContentFolderId": ___, "taxonomyCategoryIds": ___, "title": ___, "title_i18n": ___, "viewableBy": ___}' --header 'Content-Type: application/json' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Creates a new structured content."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path("/sites/{siteId}/structured-contents")
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public StructuredContent postSiteStructuredContent(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
StructuredContent structuredContent)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents/batch' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "callbackURL"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes("application/json")
@jakarta.ws.rs.Path("/sites/{siteId}/structured-contents/batch")
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces("application/json")
@Override
public Response postSiteStructuredContentBatch(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("callbackURL")
String callbackURL,
Object object)
throws Exception {
vulcanBatchEngineImportTaskResource.setContextAcceptLanguage(
contextAcceptLanguage);
vulcanBatchEngineImportTaskResource.setContextCompany(contextCompany);
vulcanBatchEngineImportTaskResource.setContextHttpServletRequest(
contextHttpServletRequest);
vulcanBatchEngineImportTaskResource.setContextUriInfo(contextUriInfo);
vulcanBatchEngineImportTaskResource.setContextUser(contextUser);
Response.ResponseBuilder responseBuilder = Response.accepted();
return responseBuilder.entity(
vulcanBatchEngineImportTaskResource.postImportTask(
StructuredContent.class.getName(), callbackURL, null, object)
).build();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents/export-batch' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "filter"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "search"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "sort"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "callbackURL"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "contentType"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fieldNames"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes("application/json")
@jakarta.ws.rs.Path("/sites/{siteId}/structured-contents/export-batch")
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces("application/json")
@Override
public Response postSiteStructuredContentsPageExportBatch(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("search")
String search,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.filter.Filter filter,
@jakarta.ws.rs.core.Context com.liferay.portal.kernel.search.Sort[]
sorts,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("callbackURL")
String callbackURL,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.DefaultValue("JSON")
@jakarta.ws.rs.QueryParam("contentType")
String contentType,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("fieldNames")
String fieldNames)
throws Exception {
vulcanBatchEngineExportTaskResource.setContextAcceptLanguage(
contextAcceptLanguage);
vulcanBatchEngineExportTaskResource.setContextCompany(contextCompany);
vulcanBatchEngineExportTaskResource.setContextHttpServletRequest(
contextHttpServletRequest);
vulcanBatchEngineExportTaskResource.setContextUriInfo(contextUriInfo);
vulcanBatchEngineExportTaskResource.setContextUser(contextUser);
vulcanBatchEngineExportTaskResource.setGroupLocalService(
groupLocalService);
Response.ResponseBuilder responseBuilder = Response.accepted();
return responseBuilder.entity(
vulcanBatchEngineExportTaskResource.postExportTask(
StructuredContent.class.getName(), callbackURL, contentType,
fieldNames)
).build();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/structured-content-folders/{structuredContentFolderId}/structured-contents' -d $'{"contentFields": ___, "contentStructureId": ___, "customFields": ___, "dateExpired": ___, "datePublished": ___, "description": ___, "description_i18n": ___, "externalReferenceCode": ___, "friendlyUrlPath": ___, "friendlyUrlPath_i18n": ___, "keywords": ___, "neverExpire": ___, "permissions": ___, "priority": ___, "relatedContents": ___, "structuredContentFolderId": ___, "taxonomyCategoryIds": ___, "title": ___, "title_i18n": ___, "viewableBy": ___}' --header 'Content-Type: application/json' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Creates a new structured content in the folder."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentFolderId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path(
"/structured-content-folders/{structuredContentFolderId}/structured-contents"
)
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public StructuredContent postStructuredContentFolderStructuredContent(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentFolderId")
Long structuredContentFolderId,
StructuredContent structuredContent)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/structured-content-folders/{structuredContentFolderId}/structured-contents/batch' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentFolderId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "callbackURL"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes("application/json")
@jakarta.ws.rs.Path(
"/structured-content-folders/{structuredContentFolderId}/structured-contents/batch"
)
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces("application/json")
@Override
public Response postStructuredContentFolderStructuredContentBatch(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentFolderId")
Long structuredContentFolderId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("callbackURL")
String callbackURL,
Object object)
throws Exception {
vulcanBatchEngineImportTaskResource.setContextAcceptLanguage(
contextAcceptLanguage);
vulcanBatchEngineImportTaskResource.setContextCompany(contextCompany);
vulcanBatchEngineImportTaskResource.setContextHttpServletRequest(
contextHttpServletRequest);
vulcanBatchEngineImportTaskResource.setContextUriInfo(contextUriInfo);
vulcanBatchEngineImportTaskResource.setContextUser(contextUser);
Response.ResponseBuilder responseBuilder = Response.accepted();
return responseBuilder.entity(
vulcanBatchEngineImportTaskResource.postImportTask(
StructuredContent.class.getName(), callbackURL, null, object)
).build();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/structured-content-folders/{structuredContentFolderId}/structured-contents/export-batch' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentFolderId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "filter"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "search"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "sort"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "callbackURL"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "contentType"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "fieldNames"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes("application/json")
@jakarta.ws.rs.Path(
"/structured-content-folders/{structuredContentFolderId}/structured-contents/export-batch"
)
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces("application/json")
@Override
public Response
postStructuredContentFolderStructuredContentsPageExportBatch(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentFolderId")
Long structuredContentFolderId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("search")
String search,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.filter.Filter filter,
@jakarta.ws.rs.core.Context
com.liferay.portal.kernel.search.Sort[] sorts,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("callbackURL")
String callbackURL,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.DefaultValue("JSON")
@jakarta.ws.rs.QueryParam("contentType")
String contentType,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("fieldNames")
String fieldNames)
throws Exception {
vulcanBatchEngineExportTaskResource.setContextAcceptLanguage(
contextAcceptLanguage);
vulcanBatchEngineExportTaskResource.setContextCompany(contextCompany);
vulcanBatchEngineExportTaskResource.setContextHttpServletRequest(
contextHttpServletRequest);
vulcanBatchEngineExportTaskResource.setContextUriInfo(contextUriInfo);
vulcanBatchEngineExportTaskResource.setContextUser(contextUser);
vulcanBatchEngineExportTaskResource.setGroupLocalService(
groupLocalService);
Response.ResponseBuilder responseBuilder = Response.accepted();
return responseBuilder.entity(
vulcanBatchEngineExportTaskResource.postExportTask(
StructuredContent.class.getName(), callbackURL, contentType,
fieldNames)
).build();
}
/**
* Invoke this method with the command line:
*
* curl -X 'POST' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/my-rating' -d $'{"ratingValue": ___}' --header 'Content-Type: application/json' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Create a rating for the structured content."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path("/structured-contents/{structuredContentId}/my-rating")
@jakarta.ws.rs.POST
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@Override
public Rating postStructuredContentMyRating(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId,
Rating rating)
throws Exception {
return new Rating();
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/asset-libraries/{assetLibraryId}/structured-contents/by-external-reference-code/{externalReferenceCode}' -d $'{"contentFields": ___, "contentStructureId": ___, "customFields": ___, "dateExpired": ___, "datePublished": ___, "description": ___, "description_i18n": ___, "externalReferenceCode": ___, "friendlyUrlPath": ___, "friendlyUrlPath_i18n": ___, "keywords": ___, "neverExpire": ___, "permissions": ___, "priority": ___, "relatedContents": ___, "structuredContentFolderId": ___, "taxonomyCategoryIds": ___, "title": ___, "title_i18n": ___, "viewableBy": ___}' --header 'Content-Type: application/json' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Updates the asset library's structured content with the given external reference code, or creates it if it not exists."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "assetLibraryId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "externalReferenceCode"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path(
"/asset-libraries/{assetLibraryId}/structured-contents/by-external-reference-code/{externalReferenceCode}"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@jakarta.ws.rs.PUT
@Override
public StructuredContent
putAssetLibraryStructuredContentByExternalReferenceCode(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("assetLibraryId")
Long assetLibraryId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("externalReferenceCode")
String externalReferenceCode,
StructuredContent structuredContent)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/asset-libraries/{assetLibraryId}/structured-contents/permissions' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "assetLibraryId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path(
"/asset-libraries/{assetLibraryId}/structured-contents/permissions"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@jakarta.ws.rs.PUT
@Override
public Page putAssetLibraryStructuredContentPermissionsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("assetLibraryId")
Long assetLibraryId,
Permission[] permissions)
throws Exception {
String portletName = getPermissionCheckerPortletName(assetLibraryId);
PermissionServiceUtil.checkPermission(
assetLibraryId, portletName, assetLibraryId);
ModelPermissions modelPermissions =
ModelPermissionsUtil.toModelPermissions(
contextCompany.getCompanyId(), permissions, assetLibraryId,
portletName, resourceActionLocalService,
resourcePermissionLocalService, roleLocalService);
Collection roleNames = modelPermissions.getRoleNames();
for (ResourcePermission resourcePermission :
resourcePermissionLocalService.getResourcePermissions(
contextCompany.getCompanyId(), portletName,
ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(assetLibraryId))) {
com.liferay.portal.kernel.model.Role role =
roleLocalService.fetchRole(resourcePermission.getRoleId());
if ((role == null) || roleNames.contains(role.getName())) {
continue;
}
for (ResourceAction resourceAction :
resourceActionLocalService.getResourceActions(
portletName)) {
resourcePermissionLocalService.removeResourcePermission(
contextCompany.getCompanyId(), portletName,
ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(assetLibraryId), role.getRoleId(),
resourceAction.getActionId());
}
}
resourcePermissionLocalService.updateResourcePermissions(
contextCompany.getCompanyId(), assetLibraryId, portletName,
String.valueOf(assetLibraryId), modelPermissions);
return toPermissionPage(
HashMapBuilder.put(
"get",
addAction(
ActionKeys.PERMISSIONS,
"getAssetLibraryStructuredContentPermissionsPage",
portletName, assetLibraryId)
).put(
"replace",
addAction(
ActionKeys.PERMISSIONS,
"putAssetLibraryStructuredContentPermissionsPage",
portletName, assetLibraryId)
).build(),
assetLibraryId, portletName, null);
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents/by-external-reference-code/{externalReferenceCode}' -d $'{"contentFields": ___, "contentStructureId": ___, "customFields": ___, "dateExpired": ___, "datePublished": ___, "description": ___, "description_i18n": ___, "externalReferenceCode": ___, "friendlyUrlPath": ___, "friendlyUrlPath_i18n": ___, "keywords": ___, "neverExpire": ___, "permissions": ___, "priority": ___, "relatedContents": ___, "structuredContentFolderId": ___, "taxonomyCategoryIds": ___, "title": ___, "title_i18n": ___, "viewableBy": ___}' --header 'Content-Type: application/json' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Updates the site's structured content with the given external reference code, or creates it if it not exists."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
),
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "externalReferenceCode"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path(
"/sites/{siteId}/structured-contents/by-external-reference-code/{externalReferenceCode}"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@jakarta.ws.rs.PUT
@Override
public StructuredContent putSiteStructuredContentByExternalReferenceCode(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("externalReferenceCode")
String externalReferenceCode,
StructuredContent structuredContent)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/structured-contents/permissions' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "siteId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path("/sites/{siteId}/structured-contents/permissions")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@jakarta.ws.rs.PUT
@Override
public Page putSiteStructuredContentPermissionsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("siteId")
Long siteId,
Permission[] permissions)
throws Exception {
String portletName = getPermissionCheckerPortletName(siteId);
PermissionServiceUtil.checkPermission(siteId, portletName, siteId);
ModelPermissions modelPermissions =
ModelPermissionsUtil.toModelPermissions(
contextCompany.getCompanyId(), permissions, siteId, portletName,
resourceActionLocalService, resourcePermissionLocalService,
roleLocalService);
Collection roleNames = modelPermissions.getRoleNames();
for (ResourcePermission resourcePermission :
resourcePermissionLocalService.getResourcePermissions(
contextCompany.getCompanyId(), portletName,
ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(siteId))) {
com.liferay.portal.kernel.model.Role role =
roleLocalService.fetchRole(resourcePermission.getRoleId());
if ((role == null) || roleNames.contains(role.getName())) {
continue;
}
for (ResourceAction resourceAction :
resourceActionLocalService.getResourceActions(
portletName)) {
resourcePermissionLocalService.removeResourcePermission(
contextCompany.getCompanyId(), portletName,
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(siteId),
role.getRoleId(), resourceAction.getActionId());
}
}
resourcePermissionLocalService.updateResourcePermissions(
contextCompany.getCompanyId(), siteId, portletName,
String.valueOf(siteId), modelPermissions);
return toPermissionPage(
HashMapBuilder.put(
"get",
addAction(
ActionKeys.PERMISSIONS,
"getSiteStructuredContentPermissionsPage", portletName,
siteId)
).put(
"replace",
addAction(
ActionKeys.PERMISSIONS,
"putSiteStructuredContentPermissionsPage", portletName,
siteId)
).build(),
siteId, portletName, null);
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}' -d $'{"contentFields": ___, "contentStructureId": ___, "customFields": ___, "dateExpired": ___, "datePublished": ___, "description": ___, "description_i18n": ___, "externalReferenceCode": ___, "friendlyUrlPath": ___, "friendlyUrlPath_i18n": ___, "keywords": ___, "neverExpire": ___, "permissions": ___, "priority": ___, "relatedContents": ___, "structuredContentFolderId": ___, "taxonomyCategoryIds": ___, "title": ___, "title_i18n": ___, "viewableBy": ___}' --header 'Content-Type: application/json' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Replaces the structured content with the information sent in the request body. Any missing fields are deleted, unless they are required."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path("/structured-contents/{structuredContentId}")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@jakarta.ws.rs.PUT
@Override
public StructuredContent putStructuredContent(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId,
StructuredContent structuredContent)
throws Exception {
return new StructuredContent();
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/batch' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.QUERY,
name = "callbackURL"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes("application/json")
@jakarta.ws.rs.Path("/structured-contents/batch")
@jakarta.ws.rs.Produces("application/json")
@jakarta.ws.rs.PUT
@Override
public Response putStructuredContentBatch(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.ws.rs.QueryParam("callbackURL")
String callbackURL,
Object object)
throws Exception {
vulcanBatchEngineImportTaskResource.setContextAcceptLanguage(
contextAcceptLanguage);
vulcanBatchEngineImportTaskResource.setContextCompany(contextCompany);
vulcanBatchEngineImportTaskResource.setContextHttpServletRequest(
contextHttpServletRequest);
vulcanBatchEngineImportTaskResource.setContextUriInfo(contextUriInfo);
vulcanBatchEngineImportTaskResource.setContextUser(contextUser);
Response.ResponseBuilder responseBuilder = Response.accepted();
return responseBuilder.entity(
vulcanBatchEngineImportTaskResource.putImportTask(
StructuredContent.class.getName(), callbackURL, object)
).build();
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/my-rating' -d $'{"ratingValue": ___}' --header 'Content-Type: application/json' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Operation(
description = "Replaces the rating with the information sent in the request body. Any missing fields are deleted, unless they are required."
)
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path("/structured-contents/{structuredContentId}/my-rating")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@jakarta.ws.rs.PUT
@Override
public Rating putStructuredContentMyRating(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId,
Rating rating)
throws Exception {
return new Rating();
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/permissions' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Consumes({"application/json", "application/xml"})
@jakarta.ws.rs.Path(
"/structured-contents/{structuredContentId}/permissions"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@jakarta.ws.rs.PUT
@Override
public Page putStructuredContentPermissionsPage(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId,
Permission[] permissions)
throws Exception {
String resourceName = getPermissionCheckerResourceName(
structuredContentId);
Long resourceId = getPermissionCheckerResourceId(structuredContentId);
PermissionServiceUtil.checkPermission(
getPermissionCheckerGroupId(structuredContentId), resourceName,
resourceId);
ModelPermissions modelPermissions =
ModelPermissionsUtil.toModelPermissions(
contextCompany.getCompanyId(), permissions, resourceId,
resourceName, resourceActionLocalService,
resourcePermissionLocalService, roleLocalService);
Collection roleNames = modelPermissions.getRoleNames();
for (ResourcePermission resourcePermission :
resourcePermissionLocalService.getResourcePermissions(
contextCompany.getCompanyId(), resourceName,
ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(resourceId))) {
com.liferay.portal.kernel.model.Role role =
roleLocalService.fetchRole(resourcePermission.getRoleId());
if ((role == null) || roleNames.contains(role.getName())) {
continue;
}
for (ResourceAction resourceAction :
resourceActionLocalService.getResourceActions(
resourceName)) {
resourcePermissionLocalService.removeResourcePermission(
contextCompany.getCompanyId(), resourceName,
ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(resourceId), role.getRoleId(),
resourceAction.getActionId());
}
}
resourcePermissionLocalService.updateResourcePermissions(
contextCompany.getCompanyId(),
getPermissionCheckerGroupId(structuredContentId), resourceName,
String.valueOf(resourceId), modelPermissions);
return toPermissionPage(
HashMapBuilder.put(
"get",
addAction(
ActionKeys.PERMISSIONS,
"getStructuredContentPermissionsPage", resourceName,
resourceId)
).put(
"replace",
addAction(
ActionKeys.PERMISSIONS,
"putStructuredContentPermissionsPage", resourceName,
resourceId)
).build(),
resourceId, resourceName, null);
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/subscribe' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Path("/structured-contents/{structuredContentId}/subscribe")
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@jakarta.ws.rs.PUT
@Override
public void putStructuredContentSubscribe(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId)
throws Exception {
}
/**
* Invoke this method with the command line:
*
* curl -X 'PUT' 'http://localhost:8080/o/headless-delivery/v1.0/structured-contents/{structuredContentId}/unsubscribe' -u '[email protected]:test'
*/
@io.swagger.v3.oas.annotations.Parameters(
value = {
@io.swagger.v3.oas.annotations.Parameter(
in = io.swagger.v3.oas.annotations.enums.ParameterIn.PATH,
name = "structuredContentId"
)
}
)
@io.swagger.v3.oas.annotations.tags.Tags(
value = {
@io.swagger.v3.oas.annotations.tags.Tag(name = "StructuredContent")
}
)
@jakarta.ws.rs.Path(
"/structured-contents/{structuredContentId}/unsubscribe"
)
@jakarta.ws.rs.Produces({"application/json", "application/xml"})
@jakarta.ws.rs.PUT
@Override
public void putStructuredContentUnsubscribe(
@io.swagger.v3.oas.annotations.Parameter(hidden = true)
@jakarta.validation.constraints.NotNull
@jakarta.ws.rs.PathParam("structuredContentId")
Long structuredContentId)
throws Exception {
}
@Override
@SuppressWarnings("PMD.UnusedLocalVariable")
public void create(
Collection structuredContents,
Map parameters)
throws Exception {
UnsafeFunction
structuredContentUnsafeFunction = null;
String createStrategy = (String)parameters.getOrDefault(
"createStrategy", "INSERT");
if (StringUtil.equalsIgnoreCase(createStrategy, "INSERT")) {
if (parameters.containsKey("assetLibraryId")) {
structuredContentUnsafeFunction =
structuredContent -> postAssetLibraryStructuredContent(
(Long)parameters.get("assetLibraryId"),
structuredContent);
}
else if (parameters.containsKey("siteId")) {
structuredContentUnsafeFunction =
structuredContent -> postSiteStructuredContent(
(Long)parameters.get("siteId"), structuredContent);
}
else if (parameters.containsKey("structuredContentFolderId")) {
structuredContentUnsafeFunction = structuredContent ->
postStructuredContentFolderStructuredContent(
_parseLong(
(String)parameters.get(
"structuredContentFolderId")),
structuredContent);
}
else {
throw new NotSupportedException(
"One of the following parameters must be specified: [assetLibraryId, siteId, structuredContentFolderId]");
}
}
if (StringUtil.equalsIgnoreCase(createStrategy, "UPSERT")) {
String updateStrategy = (String)parameters.getOrDefault(
"updateStrategy", "UPDATE");
if (StringUtil.equalsIgnoreCase(updateStrategy, "PARTIAL_UPDATE")) {
structuredContentUnsafeFunction = structuredContent -> {
StructuredContent getStructuredContent = null;
StructuredContent persistedStructuredContent = null;
try {
if (parameters.containsKey("assetLibraryId")) {
getStructuredContent =
getAssetLibraryStructuredContentByExternalReferenceCode(
(Long)parameters.get("assetLibraryId"),
structuredContent.
getExternalReferenceCode());
}
else if (parameters.containsKey("siteId")) {
getStructuredContent =
getSiteStructuredContentByExternalReferenceCode(
(Long)parameters.get("siteId"),
structuredContent.
getExternalReferenceCode());
}
else {
throw new NotSupportedException(
"One of the following parameters must be specified: [assetLibraryId, siteId]");
}
persistedStructuredContent = patchStructuredContent(
getStructuredContent.getId(), structuredContent);
}
catch (NoSuchModelException noSuchModelException) {
if (parameters.containsKey("assetLibraryId")) {
persistedStructuredContent =
postAssetLibraryStructuredContent(
(Long)parameters.get("assetLibraryId"),
structuredContent);
}
else if (parameters.containsKey("siteId")) {
persistedStructuredContent =
postSiteStructuredContent(
(Long)parameters.get("siteId"),
structuredContent);
}
else if (parameters.containsKey(
"structuredContentFolderId")) {
persistedStructuredContent =
postStructuredContentFolderStructuredContent(
_parseLong(
(String)parameters.get(
"structuredContentFolderId")),
structuredContent);
}
else {
throw new NotSupportedException(
"One of the following parameters must be specified: [assetLibraryId, siteId, structuredContentFolderId]");
}
}
return persistedStructuredContent;
};
}
if (StringUtil.equalsIgnoreCase(updateStrategy, "UPDATE")) {
structuredContentUnsafeFunction = structuredContent -> {
StructuredContent persistedStructuredContent = null;
if (parameters.containsKey("assetLibraryId")) {
persistedStructuredContent =
putAssetLibraryStructuredContentByExternalReferenceCode(
(Long)parameters.get("assetLibraryId"),
structuredContent.getExternalReferenceCode(),
structuredContent);
}
else if (parameters.containsKey("siteId")) {
persistedStructuredContent =
putSiteStructuredContentByExternalReferenceCode(
(Long)parameters.get("siteId"),
structuredContent.getExternalReferenceCode(),
structuredContent);
}
else {
throw new NotSupportedException(
"One of the following parameters must be specified: [assetLibraryId, siteId]");
}
return persistedStructuredContent;
};
}
}
if (structuredContentUnsafeFunction == null) {
throw new NotSupportedException(
"Create strategy \"" + createStrategy +
"\" is not supported for StructuredContent");
}
if (contextBatchUnsafeBiConsumer != null) {
contextBatchUnsafeBiConsumer.accept(
structuredContents, structuredContentUnsafeFunction);
}
else if (contextBatchUnsafeConsumer != null) {
contextBatchUnsafeConsumer.accept(
structuredContents, structuredContentUnsafeFunction::apply);
}
else {
for (StructuredContent structuredContent : structuredContents) {
structuredContentUnsafeFunction.apply(structuredContent);
}
}
}
@Override
public void delete(
Collection structuredContents,
Map parameters)
throws Exception {
UnsafeFunction
structuredContentUnsafeFunction = structuredContent -> {
deleteStructuredContent(structuredContent.getId());
return structuredContent;
};
if (contextBatchUnsafeBiConsumer != null) {
contextBatchUnsafeBiConsumer.accept(
structuredContents, structuredContentUnsafeFunction);
}
else if (contextBatchUnsafeConsumer != null) {
contextBatchUnsafeConsumer.accept(
structuredContents, structuredContentUnsafeFunction::apply);
}
else {
for (StructuredContent structuredContent : structuredContents) {
structuredContentUnsafeFunction.apply(structuredContent);
}
}
}
public Set getAvailableCreateStrategies() {
return SetUtil.fromArray("INSERT", "UPSERT");
}
public Set getAvailableUpdateStrategies() {
return SetUtil.fromArray("PARTIAL_UPDATE", "UPDATE");
}
@Override
public EntityModel getEntityModel(Map> multivaluedMap)
throws Exception {
return getEntityModel(
new MultivaluedHashMap(multivaluedMap));
}
@Override
public EntityModel getEntityModel(MultivaluedMap multivaluedMap)
throws Exception {
return null;
}
public String getResourceName() {
return "StructuredContent";
}
public String getVersion() {
return "v1.0";
}
@Override
public Page read(
com.liferay.portal.kernel.search.filter.Filter filter,
Pagination pagination,
com.liferay.portal.kernel.search.Sort[] sorts,
Map parameters, String search)
throws Exception {
if (parameters.containsKey("assetLibraryId")) {
return getAssetLibraryStructuredContentsPage(
(Long)parameters.get("assetLibraryId"),
_parseBoolean((String)parameters.get("flatten")), search, null,
filter, pagination, sorts);
}
else if (parameters.containsKey("siteId")) {
return getSiteStructuredContentsPage(
(Long)parameters.get("siteId"),
_parseBoolean((String)parameters.get("flatten")), search, null,
filter, pagination, sorts);
}
else if (parameters.containsKey("contentStructureId")) {
return getContentStructureStructuredContentsPage(
_parseLong((String)parameters.get("contentStructureId")),
search, null, filter, pagination, sorts);
}
else if (parameters.containsKey("structuredContentFolderId")) {
return getStructuredContentFolderStructuredContentsPage(
_parseLong((String)parameters.get("structuredContentFolderId")),
_parseBoolean((String)parameters.get("flatten")), search, null,
filter, pagination, sorts);
}
else {
throw new NotSupportedException(
"One of the following parameters must be specified: [assetLibraryId, siteId, contentStructureId, structuredContentFolderId]");
}
}
@Override
public void setLanguageId(String languageId) {
this.contextAcceptLanguage = new AcceptLanguage() {
@Override
public List getLocales() {
return null;
}
@Override
public String getPreferredLanguageId() {
return languageId;
}
@Override
public Locale getPreferredLocale() {
return LocaleUtil.fromLanguageId(languageId);
}
};
}
@Override
public void update(
Collection structuredContents,
Map parameters)
throws Exception {
UnsafeFunction
structuredContentUnsafeFunction = null;
String updateStrategy = (String)parameters.getOrDefault(
"updateStrategy", "UPDATE");
if (StringUtil.equalsIgnoreCase(updateStrategy, "PARTIAL_UPDATE")) {
structuredContentUnsafeFunction =
structuredContent -> patchStructuredContent(
structuredContent.getId(), structuredContent);
}
if (StringUtil.equalsIgnoreCase(updateStrategy, "UPDATE")) {
structuredContentUnsafeFunction =
structuredContent -> putStructuredContent(
structuredContent.getId(), structuredContent);
}
if (structuredContentUnsafeFunction == null) {
throw new NotSupportedException(
"Update strategy \"" + updateStrategy +
"\" is not supported for StructuredContent");
}
if (contextBatchUnsafeBiConsumer != null) {
contextBatchUnsafeBiConsumer.accept(
structuredContents, structuredContentUnsafeFunction);
}
else if (contextBatchUnsafeConsumer != null) {
contextBatchUnsafeConsumer.accept(
structuredContents, structuredContentUnsafeFunction::apply);
}
else {
for (StructuredContent structuredContent : structuredContents) {
structuredContentUnsafeFunction.apply(structuredContent);
}
}
}
private Boolean _parseBoolean(String value) {
if (value != null) {
return Boolean.parseBoolean(value);
}
return null;
}
private Long _parseLong(String value) {
if (value != null) {
return Long.parseLong(value);
}
return null;
}
@Override
public StructuredContent getItem(Long id) throws Exception {
return getStructuredContent(id);
}
protected String getPermissionCheckerActionsResourceName(Object id)
throws Exception {
return getPermissionCheckerResourceName(id);
}
protected Long getPermissionCheckerGroupId(Object id) throws Exception {
throw new UnsupportedOperationException(
"This method needs to be implemented");
}
protected String getPermissionCheckerPortletName(Object id)
throws Exception {
throw new UnsupportedOperationException(
"This method needs to be implemented");
}
protected Long getPermissionCheckerResourceId(Object id) throws Exception {
return GetterUtil.getLong(id);
}
protected String getPermissionCheckerResourceName(Object id)
throws Exception {
throw new UnsupportedOperationException(
"This method needs to be implemented");
}
protected Page toPermissionPage(
Map> actions, long id,
String resourceName, String roleNames)
throws Exception {
List resourceActions =
resourceActionLocalService.getResourceActions(resourceName);
if (Validator.isNotNull(roleNames)) {
return Page.of(
actions,
_getPermissions(
contextCompany.getCompanyId(), resourceActions, id,
resourceName, StringUtil.split(roleNames)));
}
return Page.of(
actions,
_getPermissions(
contextCompany.getCompanyId(), resourceActions, id,
resourceName, null));
}
/**
* @see com.liferay.portal.vulcan.permission.PermissionUtil#getPermissions(long, List, long, String, String[])
*/
private Collection _getPermissions(
long companyId, List resourceActions,
long resourceId, String resourceName, String[] roleNames)
throws Exception {
Map permissions = new HashMap<>();
int count = resourcePermissionLocalService.getResourcePermissionsCount(
companyId, resourceName, ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(resourceId));
if (count == 0) {
ResourceLocalServiceUtil.addResources(
companyId, resourceId, 0, resourceName,
String.valueOf(resourceId), false, true, true);
}
List actionIds = transform(
resourceActions, resourceAction -> resourceAction.getActionId());
Set resourcePermissions = new HashSet<>();
resourcePermissions.addAll(
resourcePermissionLocalService.getResourcePermissions(
companyId, resourceName, ResourceConstants.SCOPE_COMPANY,
String.valueOf(companyId)));
resourcePermissions.addAll(
resourcePermissionLocalService.getResourcePermissions(
companyId, resourceName, ResourceConstants.SCOPE_GROUP,
String.valueOf(GroupThreadLocal.getGroupId())));
resourcePermissions.addAll(
resourcePermissionLocalService.getResourcePermissions(
companyId, resourceName, ResourceConstants.SCOPE_GROUP_TEMPLATE,
"0"));
resourcePermissions.addAll(
resourcePermissionLocalService.getResourcePermissions(
companyId, resourceName, ResourceConstants.SCOPE_INDIVIDUAL,
String.valueOf(resourceId)));
List resources = transform(
resourcePermissions,
resourcePermission -> ResourceLocalServiceUtil.getResource(
resourcePermission.getCompanyId(), resourcePermission.getName(),
resourcePermission.getScope(),
resourcePermission.getPrimKey()));
Set roles = new HashSet<>();
if (roleNames != null) {
for (String roleName : roleNames) {
roles.add(roleLocalService.getRole(companyId, roleName));
}
}
else {
for (ResourcePermission resourcePermission : resourcePermissions) {
com.liferay.portal.kernel.model.Role role =
roleLocalService.getRole(resourcePermission.getRoleId());
roles.add(role);
}
}
for (com.liferay.portal.kernel.model.Role role : roles) {
Set actionsIdsSet = new HashSet<>();
for (Resource resource : resources) {
actionsIdsSet.addAll(
resourcePermissionLocalService.
getAvailableResourcePermissionActionIds(
resource.getCompanyId(), resource.getName(),
ResourceConstants.SCOPE_COMPANY,
String.valueOf(resource.getCompanyId()),
role.getRoleId(), actionIds));
actionsIdsSet.addAll(
resourcePermissionLocalService.
getAvailableResourcePermissionActionIds(
resource.getCompanyId(), resource.getName(),
ResourceConstants.SCOPE_GROUP,
String.valueOf(GroupThreadLocal.getGroupId()),
role.getRoleId(), actionIds));
actionsIdsSet.addAll(
resourcePermissionLocalService.
getAvailableResourcePermissionActionIds(
resource.getCompanyId(), resource.getName(),
ResourceConstants.SCOPE_GROUP_TEMPLATE, "0",
role.getRoleId(), actionIds));
actionsIdsSet.addAll(
resourcePermissionLocalService.
getAvailableResourcePermissionActionIds(
resource.getCompanyId(), resource.getName(),
resource.getScope(), resource.getPrimKey(),
role.getRoleId(), actionIds));
}
if (actionsIdsSet.isEmpty()) {
continue;
}
Permission permission = new Permission() {
{
actionIds = actionsIdsSet.toArray(new String[0]);
roleName = role.getName();
}
};
permissions.put(role.getName(), permission);
}
return permissions.values();
}
public void setContextAcceptLanguage(AcceptLanguage contextAcceptLanguage) {
this.contextAcceptLanguage = contextAcceptLanguage;
}
public void setContextBatchUnsafeBiConsumer(
UnsafeBiConsumer
,
UnsafeFunction,
Exception> contextBatchUnsafeBiConsumer) {
this.contextBatchUnsafeBiConsumer = contextBatchUnsafeBiConsumer;
}
public void setContextBatchUnsafeConsumer(
UnsafeBiConsumer
,
UnsafeConsumer, Exception>
contextBatchUnsafeConsumer) {
this.contextBatchUnsafeConsumer = contextBatchUnsafeConsumer;
}
public void setContextCompany(
com.liferay.portal.kernel.model.Company contextCompany) {
this.contextCompany = contextCompany;
}
public void setContextHttpServletRequest(
HttpServletRequest contextHttpServletRequest) {
this.contextHttpServletRequest = contextHttpServletRequest;
}
public void setContextHttpServletResponse(
HttpServletResponse contextHttpServletResponse) {
this.contextHttpServletResponse = contextHttpServletResponse;
}
public void setContextUriInfo(UriInfo contextUriInfo) {
this.contextUriInfo = UriInfoUtil.getVulcanUriInfo(
getApplicationPath(), contextUriInfo);
}
public void setContextUser(
com.liferay.portal.kernel.model.User contextUser) {
this.contextUser = contextUser;
}
public void setExpressionConvert(
ExpressionConvert
expressionConvert) {
this.expressionConvert = expressionConvert;
}
public void setFilterParserProvider(
FilterParserProvider filterParserProvider) {
this.filterParserProvider = filterParserProvider;
}
public void setGroupLocalService(GroupLocalService groupLocalService) {
this.groupLocalService = groupLocalService;
}
public void setResourceActionLocalService(
ResourceActionLocalService resourceActionLocalService) {
this.resourceActionLocalService = resourceActionLocalService;
}
public void setResourcePermissionLocalService(
ResourcePermissionLocalService resourcePermissionLocalService) {
this.resourcePermissionLocalService = resourcePermissionLocalService;
}
public void setRoleLocalService(RoleLocalService roleLocalService) {
this.roleLocalService = roleLocalService;
}
public void setSortParserProvider(SortParserProvider sortParserProvider) {
this.sortParserProvider = sortParserProvider;
}
protected String getApplicationPath() {
return "headless-delivery";
}
public void setVulcanBatchEngineExportTaskResource(
VulcanBatchEngineExportTaskResource
vulcanBatchEngineExportTaskResource) {
this.vulcanBatchEngineExportTaskResource =
vulcanBatchEngineExportTaskResource;
}
public void setVulcanBatchEngineImportTaskResource(
VulcanBatchEngineImportTaskResource
vulcanBatchEngineImportTaskResource) {
this.vulcanBatchEngineImportTaskResource =
vulcanBatchEngineImportTaskResource;
}
@Override
public com.liferay.portal.kernel.search.filter.Filter toFilter(
String filterString, Map> multivaluedMap) {
try {
EntityModel entityModel = getEntityModel(multivaluedMap);
FilterParser filterParser = filterParserProvider.provide(
entityModel);
com.liferay.portal.odata.filter.Filter oDataFilter =
new com.liferay.portal.odata.filter.Filter(
filterParser.parse(filterString));
return expressionConvert.convert(
oDataFilter.getExpression(),
contextAcceptLanguage.getPreferredLocale(), entityModel);
}
catch (Exception exception) {
_log.error("Invalid filter " + filterString, exception);
return null;
}
}
@Override
public com.liferay.portal.kernel.search.Sort[] toSorts(String sortString) {
if (Validator.isNull(sortString)) {
return null;
}
try {
SortParser sortParser = sortParserProvider.provide(
getEntityModel(Collections.emptyMap()));
if (sortParser == null) {
return null;
}
com.liferay.portal.odata.sort.Sort oDataSort =
new com.liferay.portal.odata.sort.Sort(
sortParser.parse(sortString));
List sortFields = oDataSort.getSortFields();
com.liferay.portal.kernel.search.Sort[] sorts =
new com.liferay.portal.kernel.search.Sort[sortFields.size()];
for (int i = 0; i < sortFields.size(); i++) {
SortField sortField = sortFields.get(i);
sorts[i] = new com.liferay.portal.kernel.search.Sort(
sortField.getSortableFieldName(
contextAcceptLanguage.getPreferredLocale()),
!sortField.isAscending());
}
return sorts;
}
catch (Exception exception) {
_log.error("Invalid sort " + sortString, exception);
return new com.liferay.portal.kernel.search.Sort[0];
}
}
protected Map addAction(
String actionName,
com.liferay.portal.kernel.model.GroupedModel groupedModel,
String methodName) {
return ActionUtil.addAction(
actionName, getClass(), groupedModel, methodName,
contextScopeChecker, contextUriInfo);
}
protected Map addAction(
String actionName, Long id, String methodName, Long ownerId,
String permissionName, Long siteId) {
return ActionUtil.addAction(
actionName, getClass(), id, methodName, contextScopeChecker,
ownerId, permissionName, siteId, contextUriInfo);
}
protected Map addAction(
String actionName, Long id, String methodName,
ModelResourcePermission modelResourcePermission) {
return ActionUtil.addAction(
actionName, getClass(), id, methodName, contextScopeChecker,
modelResourcePermission, contextUriInfo);
}
protected Map addAction(
String actionName, String methodName, String permissionName,
Long siteId) {
return addAction(
actionName, siteId, methodName, null, permissionName, siteId);
}
protected void preparePatch(
StructuredContent structuredContent,
StructuredContent existingStructuredContent) {
}
protected List transform(
Collection collection, UnsafeFunction unsafeFunction) {
return TransformUtil.transform(collection, unsafeFunction);
}
protected R[] transform(
T[] array, UnsafeFunction unsafeFunction,
Class extends R> clazz) {
return TransformUtil.transform(array, unsafeFunction, clazz);
}
protected R[] transformToArray(
Collection collection, UnsafeFunction unsafeFunction,
Class extends R> clazz) {
return TransformUtil.transformToArray(
collection, unsafeFunction, clazz);
}
protected List transformToList(
T[] array, UnsafeFunction unsafeFunction) {
return TransformUtil.transformToList(array, unsafeFunction);
}
protected long[] transformToLongArray(
Collection collection, UnsafeFunction unsafeFunction) {
return TransformUtil.transformToLongArray(collection, unsafeFunction);
}
protected List unsafeTransform(
Collection collection, UnsafeFunction unsafeFunction)
throws E {
return TransformUtil.unsafeTransform(collection, unsafeFunction);
}
protected R[] unsafeTransform(
T[] array, UnsafeFunction unsafeFunction,
Class extends R> clazz)
throws E {
return TransformUtil.unsafeTransform(array, unsafeFunction, clazz);
}
protected R[] unsafeTransformToArray(
Collection collection, UnsafeFunction unsafeFunction,
Class extends R> clazz)
throws E {
return TransformUtil.unsafeTransformToArray(
collection, unsafeFunction, clazz);
}
protected List unsafeTransformToList(
T[] array, UnsafeFunction unsafeFunction)
throws E {
return TransformUtil.unsafeTransformToList(array, unsafeFunction);
}
protected long[] unsafeTransformToLongArray(
Collection collection, UnsafeFunction unsafeFunction)
throws E {
return TransformUtil.unsafeTransformToLongArray(
collection, unsafeFunction);
}
protected AcceptLanguage contextAcceptLanguage;
protected UnsafeBiConsumer
,
UnsafeFunction,
Exception> contextBatchUnsafeBiConsumer;
protected UnsafeBiConsumer
,
UnsafeConsumer, Exception>
contextBatchUnsafeConsumer;
protected com.liferay.portal.kernel.model.Company contextCompany;
protected HttpServletRequest contextHttpServletRequest;
protected HttpServletResponse contextHttpServletResponse;
protected Object contextScopeChecker;
protected UriInfo contextUriInfo;
protected com.liferay.portal.kernel.model.User contextUser;
protected ExpressionConvert
expressionConvert;
protected FilterParserProvider filterParserProvider;
protected GroupLocalService groupLocalService;
protected ResourceActionLocalService resourceActionLocalService;
protected ResourcePermissionLocalService resourcePermissionLocalService;
protected RoleLocalService roleLocalService;
protected SortParserProvider sortParserProvider;
protected VulcanBatchEngineExportTaskResource
vulcanBatchEngineExportTaskResource;
protected VulcanBatchEngineImportTaskResource
vulcanBatchEngineImportTaskResource;
private static final com.liferay.portal.kernel.log.Log _log =
LogFactoryUtil.getLog(BaseStructuredContentResourceImpl.class);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy