@ProviderType
public final class ContentBuilder
extends org.apache.sling.testing.mock.sling.builder.ContentBuilder
| Constructor and Description |
|---|
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,
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,
@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.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.
|
static @NotNull InputStream |
createDummyImage(int width,
int height,
String mimeType)
Create dummy image
|
com.day.cq.wcm.api.Page |
page(@NotNull String path)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull String path,
@NotNull String template)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull String path,
@NotNull String template,
@NotNull Map<String,Object> contentProperties)
Create content page.
|
com.day.cq.wcm.api.Page |
page(@NotNull String path,
@NotNull String template,
@NotNull String title)
Create content page.
|
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 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,
@NotNull
@NotNull String template)
nt:unstructured nodes.path - Page pathtemplate - Templatepublic com.day.cq.wcm.api.Page page(@NotNull
@NotNull String path,
@NotNull
@NotNull 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,
@NotNull
@NotNull String template,
@NotNull
@NotNull Map<String,Object> contentProperties)
nt:unstructured nodes.path - Page pathtemplate - TemplatecontentProperties - 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 metadatapublic 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 metadatapublic 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@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.day.cq.tagging.Tag tag(@NotNull
@NotNull String tagId)
tagId - Tag ID. May include namespace (separated by ":"). May include nested levels (separated by "/").Copyright © 2014–2018 wcm.io. All rights reserved.