@ProviderType public final class ContentBuilder extends ContentBuilder
resourceResolver
Constructor and Description |
---|
ContentBuilder(@NotNull AemContextImpl context) |
ContentBuilder(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver) |
Modifier and Type | Method and Description |
---|---|
com.day.cq.dam.api.Asset |
asset(@NotNull java.lang.String path,
@NotNull java.io.InputStream inputStream,
@NotNull java.lang.String mimeType)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull java.lang.String path,
@NotNull java.io.InputStream inputStream,
@NotNull java.lang.String mimeType,
@Nullable java.util.Map<java.lang.String,java.lang.Object> metadata)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull java.lang.String path,
@NotNull java.io.InputStream inputStream,
@NotNull java.lang.String mimeType,
java.lang.Object... metadata)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull java.lang.String path,
long width,
long height,
@NotNull java.lang.String mimeType)
Create DAM asset with a generated dummy image.
|
com.day.cq.dam.api.Asset |
asset(@NotNull java.lang.String path,
long width,
long height,
@NotNull java.lang.String mimeType,
@Nullable java.util.Map<java.lang.String,java.lang.Object> metadata)
Create DAM asset with a generated dummy image.
|
com.day.cq.dam.api.Asset |
asset(@NotNull java.lang.String path,
long width,
long height,
@NotNull java.lang.String mimeType,
java.lang.Object... metadata)
Create DAM asset with a generated dummy image.
|
com.day.cq.dam.api.Asset |
asset(@NotNull java.lang.String path,
@NotNull java.lang.String classpathResource,
@NotNull java.lang.String mimeType)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull java.lang.String path,
@NotNull java.lang.String classpathResource,
@NotNull java.lang.String mimeType,
@Nullable java.util.Map<java.lang.String,java.lang.Object> metadata)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull java.lang.String path,
@NotNull java.lang.String classpathResource,
@NotNull java.lang.String mimeType,
java.lang.Object... metadata)
Create DAM asset.
|
com.day.cq.dam.api.Rendition |
assetRendition(@NotNull com.day.cq.dam.api.Asset asset,
java.lang.String name,
@NotNull java.io.InputStream inputStream,
@NotNull java.lang.String mimeType)
Adds a rendition to DAM asset.
|
com.day.cq.dam.api.Rendition |
assetRendition(@NotNull com.day.cq.dam.api.Asset asset,
@NotNull java.lang.String name,
long width,
long height,
@NotNull java.lang.String mimeType)
Adds a rendition with a generated dummy image to DAM asset.
|
com.day.cq.dam.api.Rendition |
assetRendition(@NotNull com.day.cq.dam.api.Asset asset,
@NotNull java.lang.String name,
@NotNull java.lang.String classpathResource,
@NotNull java.lang.String mimeType)
Adds a rendition to DAM asset.
|
com.day.cq.dam.api.Rendition |
assetRenditionWebEnabled(@NotNull com.day.cq.dam.api.Asset asset)
Adds a web-enabled rendition to DAM asset.
|
com.day.cq.dam.api.Rendition |
assetRenditionWebEnabled(@NotNull com.day.cq.dam.api.Asset asset,
long maxWidth,
long maxHeight)
Adds a web-enabled rendition to DAM asset.
|
com.adobe.cq.dam.cfm.ContentFragment |
contentFragmentStructured(@NotNull java.lang.String path,
@Nullable java.util.Map<java.lang.String,java.lang.Object> data)
Create DAM content fragment.
|
com.adobe.cq.dam.cfm.ContentFragment |
contentFragmentStructured(@NotNull java.lang.String path,
java.lang.Object... data)
Create DAM content fragment.
|
com.adobe.cq.dam.cfm.ContentFragment |
contentFragmentText(@NotNull java.lang.String path,
@NotNull java.lang.String text,
@NotNull java.lang.String mimeType)
Create DAM content fragment.
|
static @NotNull java.io.InputStream |
createDummyImage(long width,
long height,
java.lang.String mimeType)
Create dummy image
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull java.lang.String name)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull java.lang.String name,
@Nullable java.lang.String template)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull java.lang.String name,
@Nullable java.lang.String template,
@NotNull java.util.Map<java.lang.String,java.lang.Object> pageProperties)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull java.lang.String name,
@Nullable java.lang.String template,
java.lang.Object... pageProperties)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull java.lang.String name,
@Nullable java.lang.String template,
@NotNull java.lang.String title)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull java.lang.String path)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull java.lang.String path,
@Nullable java.lang.String template)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull java.lang.String path,
@Nullable java.lang.String template,
@NotNull java.util.Map<java.lang.String,java.lang.Object> pageProperties)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull java.lang.String path,
@Nullable java.lang.String template,
java.lang.Object... pageProperties)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull java.lang.String path,
@Nullable java.lang.String template,
@NotNull java.lang.String title)
Create content page.
|
@NotNull org.apache.sling.api.resource.Resource |
resource(@NotNull com.day.cq.wcm.api.Page page,
@NotNull java.lang.String name)
Create child resource below the page's
jcr:content resource. |
@NotNull org.apache.sling.api.resource.Resource |
resource(@NotNull com.day.cq.wcm.api.Page page,
@NotNull java.lang.String name,
@NotNull java.util.Map<java.lang.String,java.lang.Object> properties)
Create child resource below the page's
jcr:content resource. |
@NotNull org.apache.sling.api.resource.Resource |
resource(@NotNull com.day.cq.wcm.api.Page page,
@NotNull java.lang.String name,
java.lang.Object... properties)
Create child resource below the page's
jcr:content resource. |
com.day.cq.tagging.Tag |
tag(@NotNull java.lang.String tagId)
Adds a tag definition.
|
ensureResourceExists, resource, resource, resource, resource, resource, resource
public ContentBuilder(@NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver)
resourceResolver
- Resource resolverpublic ContentBuilder(@NotNull @NotNull AemContextImpl context)
context
- Contextpublic com.day.cq.wcm.api.Page page(@NotNull @NotNull java.lang.String path)
nt:unstructured
nodes.path
- Page pathpublic com.day.cq.wcm.api.Page page(@NotNull @NotNull java.lang.String path, @Nullable @Nullable java.lang.String template)
nt:unstructured
nodes.path
- Page pathtemplate
- Templatepublic com.day.cq.wcm.api.Page page(@NotNull @NotNull java.lang.String path, @Nullable @Nullable java.lang.String template, @NotNull @NotNull java.lang.String title)
nt:unstructured
nodes.path
- Page pathtemplate
- Templatetitle
- Page titlepublic com.day.cq.wcm.api.Page page(@NotNull @NotNull java.lang.String path, @Nullable @Nullable java.lang.String template, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> pageProperties)
nt:unstructured
nodes.path
- Page pathtemplate
- TemplatepageProperties
- Properties for jcr:content
node.public com.day.cq.wcm.api.Page page(@NotNull @NotNull java.lang.String path, @Nullable @Nullable java.lang.String template, @NotNull java.lang.Object... pageProperties)
nt:unstructured
nodes.path
- Page pathtemplate
- TemplatepageProperties
- Properties for jcr:content
node.public com.day.cq.wcm.api.Page page(@NotNull @NotNull com.day.cq.wcm.api.Page parentPage, @NotNull @NotNull java.lang.String name)
nt:unstructured
nodes.parentPage
- Parent page of the newp agename
- Child page namepublic com.day.cq.wcm.api.Page page(@NotNull @NotNull com.day.cq.wcm.api.Page parentPage, @NotNull @NotNull java.lang.String name, @Nullable @Nullable java.lang.String template)
nt:unstructured
nodes.parentPage
- Parent page of the newp agename
- Child page nametemplate
- Templatepublic com.day.cq.wcm.api.Page page(@NotNull @NotNull com.day.cq.wcm.api.Page parentPage, @NotNull @NotNull java.lang.String name, @Nullable @Nullable java.lang.String template, @NotNull @NotNull java.lang.String title)
nt:unstructured
nodes.parentPage
- Parent page of the newp agename
- Child page nametemplate
- Templatetitle
- Page titlepublic com.day.cq.wcm.api.Page page(@NotNull @NotNull com.day.cq.wcm.api.Page parentPage, @NotNull @NotNull java.lang.String name, @Nullable @Nullable java.lang.String template, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> pageProperties)
nt:unstructured
nodes.parentPage
- Parent page of the newp agename
- Child page nametemplate
- TemplatepageProperties
- Properties for jcr:content
node.public com.day.cq.wcm.api.Page page(@NotNull @NotNull com.day.cq.wcm.api.Page parentPage, @NotNull @NotNull java.lang.String name, @Nullable @Nullable java.lang.String template, @NotNull java.lang.Object... pageProperties)
nt:unstructured
nodes.parentPage
- Parent page of the newp agename
- Child page nametemplate
- TemplatepageProperties
- Properties for jcr:content
node.public com.day.cq.dam.api.Asset asset(@NotNull @NotNull java.lang.String path, @NotNull @NotNull java.lang.String classpathResource, @NotNull @NotNull java.lang.String mimeType)
path
- Asset pathclasspathResource
- Classpath resource URL for binary file.mimeType
- Mime typepublic com.day.cq.dam.api.Asset asset(@NotNull @NotNull java.lang.String path, @NotNull @NotNull java.lang.String classpathResource, @NotNull @NotNull java.lang.String mimeType, @Nullable @Nullable java.util.Map<java.lang.String,java.lang.Object> metadata)
path
- Asset pathclasspathResource
- Classpath resource URL for binary file.mimeType
- Mime typemetadata
- Asset metadata propertiespublic com.day.cq.dam.api.Asset asset(@NotNull @NotNull java.lang.String path, @NotNull @NotNull java.lang.String classpathResource, @NotNull @NotNull java.lang.String mimeType, @NotNull java.lang.Object... metadata)
path
- Asset pathclasspathResource
- Classpath resource URL for binary file.mimeType
- Mime typemetadata
- Asset metadata propertiespublic com.day.cq.dam.api.Asset asset(@NotNull @NotNull java.lang.String path, long width, long height, @NotNull @NotNull java.lang.String mimeType)
path
- Asset pathwidth
- Dummy image widthheight
- Dummy image heightmimeType
- Mime typepublic com.day.cq.dam.api.Asset asset(@NotNull @NotNull java.lang.String path, long width, long height, @NotNull @NotNull java.lang.String mimeType, @Nullable @Nullable java.util.Map<java.lang.String,java.lang.Object> metadata)
path
- Asset pathwidth
- Dummy image widthheight
- Dummy image heightmimeType
- Mime typemetadata
- Asset metadata propertiespublic com.day.cq.dam.api.Asset asset(@NotNull @NotNull java.lang.String path, long width, long height, @NotNull @NotNull java.lang.String mimeType, @NotNull java.lang.Object... metadata)
path
- Asset pathwidth
- Dummy image widthheight
- Dummy image heightmimeType
- Mime typemetadata
- Asset metadata propertiespublic com.day.cq.dam.api.Asset asset(@NotNull @NotNull java.lang.String path, @NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull java.lang.String mimeType)
path
- Asset pathinputStream
- Binary data for original renditionmimeType
- Mime typepublic com.day.cq.dam.api.Asset asset(@NotNull @NotNull java.lang.String path, @NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull java.lang.String mimeType, @Nullable @Nullable java.util.Map<java.lang.String,java.lang.Object> metadata)
path
- Asset pathinputStream
- Binary data for original renditionmimeType
- Mime typemetadata
- Asset metadata propertiespublic com.day.cq.dam.api.Asset asset(@NotNull @NotNull java.lang.String path, @NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull java.lang.String mimeType, @NotNull java.lang.Object... metadata)
path
- Asset pathinputStream
- Binary data for original renditionmimeType
- Mime typemetadata
- Asset metadata properties@NotNull public static @NotNull java.io.InputStream createDummyImage(long width, long height, java.lang.String mimeType)
width
- Widthheight
- heightmimeType
- Mime typepublic com.day.cq.dam.api.Rendition assetRendition(@NotNull @NotNull com.day.cq.dam.api.Asset asset, @NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String classpathResource, @NotNull @NotNull java.lang.String mimeType)
asset
- DAM assetname
- Rendition nameclasspathResource
- Classpath resource URL for binary file.mimeType
- Mime typepublic com.day.cq.dam.api.Rendition assetRendition(@NotNull @NotNull com.day.cq.dam.api.Asset asset, @NotNull @NotNull java.lang.String name, long width, long height, @NotNull @NotNull java.lang.String mimeType)
asset
- DAM assetname
- Rendition namewidth
- Dummy image widthheight
- Dummy image heightmimeType
- Mime typepublic com.day.cq.dam.api.Rendition assetRendition(@NotNull @NotNull com.day.cq.dam.api.Asset asset, java.lang.String name, @NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull java.lang.String mimeType)
asset
- DAM assetname
- Rendition nameinputStream
- Binary data for original renditionmimeType
- Mime typepublic com.day.cq.dam.api.Rendition assetRenditionWebEnabled(@NotNull @NotNull com.day.cq.dam.api.Asset asset)
asset
- DAM assetpublic com.day.cq.dam.api.Rendition assetRenditionWebEnabled(@NotNull @NotNull com.day.cq.dam.api.Asset asset, long maxWidth, long maxHeight)
asset
- DAM assetmaxWidth
- Max. widthmaxHeight
- Max. widthpublic com.adobe.cq.dam.cfm.ContentFragment contentFragmentStructured(@NotNull @NotNull java.lang.String path, @Nullable @Nullable java.util.Map<java.lang.String,java.lang.Object> data)
path
- Content fragment asset pathdata
- Content fragment structured datapublic com.adobe.cq.dam.cfm.ContentFragment contentFragmentStructured(@NotNull @NotNull java.lang.String path, @NotNull java.lang.Object... data)
path
- Content fragment asset pathdata
- Content fragment structured datapublic com.adobe.cq.dam.cfm.ContentFragment contentFragmentText(@NotNull @NotNull java.lang.String path, @NotNull @NotNull java.lang.String text, @NotNull @NotNull java.lang.String mimeType)
path
- Content fragment asset pathtext
- Text valuemimeType
- Mime type of the valuepublic com.day.cq.tagging.Tag tag(@NotNull @NotNull java.lang.String tagId)
tagId
- Tag ID. May include namespace (separated by ":"). May include nested levels (separated by "/").@NotNull public @NotNull org.apache.sling.api.resource.Resource resource(@NotNull @NotNull com.day.cq.wcm.api.Page page, @NotNull @NotNull java.lang.String name)
jcr:content
resource. If parent resource(s) do not exist they
are created automatically using nt:unstructured
nodes.page
- Page to create resource inname
- Child resource name@NotNull public @NotNull org.apache.sling.api.resource.Resource resource(@NotNull @NotNull com.day.cq.wcm.api.Page page, @NotNull @NotNull java.lang.String name, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> properties)
jcr:content
resource. If parent resource(s) do not exist they
are created automatically using nt:unstructured
nodes.page
- Page to create resource inname
- Child resource nameproperties
- Properties for resource.@NotNull public @NotNull org.apache.sling.api.resource.Resource resource(@NotNull @NotNull com.day.cq.wcm.api.Page page, @NotNull @NotNull java.lang.String name, @NotNull java.lang.Object... properties)
jcr:content
resource. If parent resource(s) do not exist they
are created automatically using nt:unstructured
nodes.page
- Page to create resource inname
- Child resource nameproperties
- Properties for resource.Copyright © 2014–2021 wcm.io. All rights reserved.