
com.liferay.headless.delivery.dto.v1_0.RenderedContent Maven / Gradle / Ivy
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.dto.v1_0;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.liferay.petra.function.UnsafeSupplier;
import com.liferay.petra.string.StringBundler;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.vulcan.graphql.annotation.GraphQLField;
import com.liferay.portal.vulcan.graphql.annotation.GraphQLName;
import com.liferay.portal.vulcan.util.ObjectMapperUtil;
import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import jakarta.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Supplier;
/**
* @author Javier Gamarra
* @generated
*/
@Generated("")
@GraphQLName(
description = "Rendered content, which results from using a template or display page to process the content and return HTML.",
value = "RenderedContent"
)
@JsonFilter("Liferay.Vulcan")
@XmlRootElement(name = "RenderedContent")
public class RenderedContent implements Serializable {
public static RenderedContent toDTO(String json) {
return ObjectMapperUtil.readValue(RenderedContent.class, json);
}
public static RenderedContent unsafeToDTO(String json) {
return ObjectMapperUtil.unsafeReadValue(RenderedContent.class, json);
}
@io.swagger.v3.oas.annotations.media.Schema(
description = "The ID of the template or display page used to render the content."
)
public String getContentTemplateId() {
if (_contentTemplateIdSupplier != null) {
contentTemplateId = _contentTemplateIdSupplier.get();
_contentTemplateIdSupplier = null;
}
return contentTemplateId;
}
public void setContentTemplateId(String contentTemplateId) {
this.contentTemplateId = contentTemplateId;
_contentTemplateIdSupplier = null;
}
@JsonIgnore
public void setContentTemplateId(
UnsafeSupplier contentTemplateIdUnsafeSupplier) {
_contentTemplateIdSupplier = () -> {
try {
return contentTemplateIdUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(
description = "The ID of the template or display page used to render the content."
)
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected String contentTemplateId;
@JsonIgnore
private Supplier _contentTemplateIdSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The name of the template or display page used to render the content."
)
public String getContentTemplateName() {
if (_contentTemplateNameSupplier != null) {
contentTemplateName = _contentTemplateNameSupplier.get();
_contentTemplateNameSupplier = null;
}
return contentTemplateName;
}
public void setContentTemplateName(String contentTemplateName) {
this.contentTemplateName = contentTemplateName;
_contentTemplateNameSupplier = null;
}
@JsonIgnore
public void setContentTemplateName(
UnsafeSupplier contentTemplateNameUnsafeSupplier) {
_contentTemplateNameSupplier = () -> {
try {
return contentTemplateNameUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(
description = "The name of the template or display page used to render the content."
)
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected String contentTemplateName;
@JsonIgnore
private Supplier _contentTemplateNameSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The localized names of the template or display page used to render the content."
)
@Valid
public Map getContentTemplateName_i18n() {
if (_contentTemplateName_i18nSupplier != null) {
contentTemplateName_i18n = _contentTemplateName_i18nSupplier.get();
_contentTemplateName_i18nSupplier = null;
}
return contentTemplateName_i18n;
}
public void setContentTemplateName_i18n(
Map contentTemplateName_i18n) {
this.contentTemplateName_i18n = contentTemplateName_i18n;
_contentTemplateName_i18nSupplier = null;
}
@JsonIgnore
public void setContentTemplateName_i18n(
UnsafeSupplier
© 2015 - 2025 Weber Informatics LLC | Privacy Policy