@ProviderType
public final class ContentBuilder
extends org.apache.sling.testing.mock.sling.builder.ContentBuilder
| 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 String path,
@NotNull InputStream inputStream,
@NotNull String mimeType)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull String path,
@NotNull InputStream inputStream,
@NotNull String mimeType,
@Nullable Map<String,Object> metadata)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull String path,
@NotNull InputStream inputStream,
@NotNull String mimeType,
Object... metadata)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull String path,
int width,
int height,
@NotNull String mimeType)
Create DAM asset with a generated dummy image.
|
com.day.cq.dam.api.Asset |
asset(@NotNull String path,
int width,
int height,
@NotNull String mimeType,
@Nullable Map<String,Object> metadata)
Create DAM asset with a generated dummy image.
|
com.day.cq.dam.api.Asset |
asset(@NotNull String path,
int width,
int height,
@NotNull String mimeType,
Object... metadata)
Create DAM asset with a generated dummy image.
|
com.day.cq.dam.api.Asset |
asset(@NotNull String path,
@NotNull String classpathResource,
@NotNull String mimeType)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull String path,
@NotNull String classpathResource,
@NotNull String mimeType,
@Nullable Map<String,Object> metadata)
Create DAM asset.
|
com.day.cq.dam.api.Asset |
asset(@NotNull String path,
@NotNull String classpathResource,
@NotNull String mimeType,
Object... metadata)
Create DAM asset.
|
com.day.cq.dam.api.Rendition |
assetRendition(@NotNull com.day.cq.dam.api.Asset asset,
String name,
@NotNull InputStream inputStream,
@NotNull String mimeType)
Adds an rendition to DAM asset.
|
com.day.cq.dam.api.Rendition |
assetRendition(@NotNull com.day.cq.dam.api.Asset asset,
@NotNull String name,
int width,
int height,
@NotNull String mimeType)
Adds an 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 String name,
@NotNull String classpathResource,
@NotNull String mimeType)
Adds an rendition to DAM asset.
|
com.adobe.cq.dam.cfm.ContentFragment |
contentFragmentStructured(@NotNull String path,
@Nullable Map<String,Object> data)
Create DAM content fragment.
|
com.adobe.cq.dam.cfm.ContentFragment |
contentFragmentStructured(@NotNull String path,
Object... data)
Create DAM content fragment.
|
com.adobe.cq.dam.cfm.ContentFragment |
contentFragmentText(@NotNull String path,
@NotNull String text,
@NotNull String mimeType)
Create DAM content fragment.
|
static @NotNull InputStream |
createDummyImage(int width,
int height,
String mimeType)
Create dummy image
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull String name)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull String name,
@Nullable String template)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull String name,
@Nullable String template,
@NotNull Map<String,Object> pageProperties)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull String name,
@Nullable String template,
Object... pageProperties)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull com.day.cq.wcm.api.Page parentPage,
@NotNull String name,
@Nullable String template,
@NotNull String title)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull String path)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull String path,
@Nullable String template)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull String path,
@Nullable String template,
@NotNull Map<String,Object> pageProperties)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull String path,
@Nullable String template,
Object... pageProperties)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull String path,
@Nullable String template,
@NotNull String title)
Create content page.
|
@NotNull org.apache.sling.api.resource.Resource |
resource(@NotNull com.day.cq.wcm.api.Page page,
@NotNull 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 String name,
@NotNull Map<String,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 String name,
Object... properties)
Create child resource below the page's
jcr:content resource. |
com.day.cq.tagging.Tag |
tag(@NotNull String tagId)
Adds a tag definition.
|
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 String path)
nt:unstructured nodes.path - Page pathpublic com.day.cq.wcm.api.Page page(@NotNull
@NotNull String path,
@Nullable
@Nullable String template)
nt:unstructured nodes.path - Page pathtemplate - Templatepublic com.day.cq.wcm.api.Page page(@NotNull
@NotNull String path,
@Nullable
@Nullable String template,
@NotNull
@NotNull String title)
nt:unstructured nodes.path - Page pathtemplate - Templatetitle - Page titlepublic com.day.cq.wcm.api.Page page(@NotNull
@NotNull String path,
@Nullable
@Nullable String template,
@NotNull
@NotNull Map<String,Object> pageProperties)
nt:unstructured nodes.path - Page pathtemplate - TemplatepageProperties - Properties for jcr:content node.public com.day.cq.wcm.api.Page page(@NotNull
@NotNull String path,
@Nullable
@Nullable String template,
@NotNull
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 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 String name,
@Nullable
@Nullable 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 String name,
@Nullable
@Nullable String template,
@NotNull
@NotNull 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 String name,
@Nullable
@Nullable String template,
@NotNull
@NotNull Map<String,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 String name,
@Nullable
@Nullable String template,
@NotNull
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 String path,
@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull String mimeType)
path - Asset pathclasspathResource - Classpath resource URL for binary file.mimeType - Mime typepublic com.day.cq.dam.api.Asset asset(@NotNull
@NotNull String path,
@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull String mimeType,
@Nullable
@Nullable Map<String,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 String path,
@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull String mimeType,
@NotNull
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 String path,
int width,
int height,
@NotNull
@NotNull String mimeType)
path - Asset pathwidth - Dummy image widthheight - Dummy image heightmimeType - Mime typepublic com.day.cq.dam.api.Asset asset(@NotNull
@NotNull String path,
int width,
int height,
@NotNull
@NotNull String mimeType,
@Nullable
@Nullable Map<String,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 String path,
int width,
int height,
@NotNull
@NotNull String mimeType,
@NotNull
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 String path,
@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull String mimeType)
path - Asset pathinputStream - Binary data for original renditionmimeType - Mime typepublic com.day.cq.dam.api.Asset asset(@NotNull
@NotNull String path,
@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull String mimeType,
@Nullable
@Nullable Map<String,Object> metadata)
path - Asset pathinputStream - Binary data for original renditionmimeType - Mime typemetadata - Asset metadata propertiespublic com.day.cq.dam.api.Asset asset(@NotNull
@NotNull String path,
@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull String mimeType,
@NotNull
Object... metadata)
path - Asset pathinputStream - Binary data for original renditionmimeType - Mime typemetadata - Asset metadata properties@NotNull public static @NotNull InputStream createDummyImage(int width, int height, 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 String name,
@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull 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 String name,
int width,
int height,
@NotNull
@NotNull 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,
String name,
@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull String mimeType)
asset - DAM assetname - Rendition nameinputStream - Binary data for original renditionmimeType - Mime typepublic com.adobe.cq.dam.cfm.ContentFragment contentFragmentStructured(@NotNull
@NotNull String path,
@Nullable
@Nullable Map<String,Object> data)
path - Content fragment asset pathdata - Content fragment structured datapublic com.adobe.cq.dam.cfm.ContentFragment contentFragmentStructured(@NotNull
@NotNull String path,
@NotNull
Object... data)
path - Content fragment asset pathdata - Content fragment structured datapublic com.adobe.cq.dam.cfm.ContentFragment contentFragmentText(@NotNull
@NotNull String path,
@NotNull
@NotNull String text,
@NotNull
@NotNull String mimeType)
path - Content fragment asset pathtext - Text valuemimeType - Mime type of the valuepublic com.day.cq.tagging.Tag tag(@NotNull
@NotNull 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 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 String name,
@NotNull
@NotNull Map<String,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 String name,
@NotNull
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–2020 wcm.io. All rights reserved.