Package | Description |
---|---|
org.apache.sling.resourcebuilder.api |
ResourceBuilder API.
|
org.apache.sling.testing.mock.sling.context |
Sling context implementation for unit tests.
|
Modifier and Type | Method and Description |
---|---|
@NotNull ResourceBuilder |
ResourceBuilder.atParent()
Reset the current parent Resource to the original one.
|
@NotNull ResourceBuilder |
ResourceBuilder.commit()
Commit created resources
|
@NotNull ResourceBuilder |
ResourceBuilder.file(@NotNull java.lang.String filename,
@NotNull java.io.InputStream data)
Create a file under the current parent resource.
|
@NotNull ResourceBuilder |
ResourceBuilder.file(@NotNull java.lang.String filename,
@NotNull java.io.InputStream data,
@Nullable java.lang.String mimeType,
long lastModified)
Create a file under the current parent resource
|
@NotNull ResourceBuilder |
ResourceBuilderFactory.forParent(@NotNull org.apache.sling.api.resource.Resource parent)
Start a ResourceBuilder using the supplied parent resource
|
@NotNull ResourceBuilder |
ResourceBuilderFactory.forResolver(@NotNull org.apache.sling.api.resource.ResourceResolver r)
Start a ResourceBuilder using the supplied ResourceResolver,
starting with the root resource as the builder's parent resource.
|
@NotNull ResourceBuilder |
ResourceBuilder.hierarchyMode()
Set hierarchy mode (as opposed to siblings mode) where creating a resource
sets it as the current parent.
|
@NotNull ResourceBuilder |
ResourceBuilder.resource(@NotNull java.lang.String path,
@NotNull java.util.Map<java.lang.String,java.lang.Object> properties)
Create a Resource, which optionally becomes the current
parent Resource.
|
@NotNull ResourceBuilder |
ResourceBuilder.resource(@NotNull java.lang.String path,
java.lang.Object... properties)
Create a Resource, which optionally becomes the current
parent Resource.
|
@NotNull ResourceBuilder |
ResourceBuilder.siblingsMode()
Set siblings mode (as opposed to hierarchy mode) where creating a resource
doesn't change the current parent.
|
@NotNull ResourceBuilder |
ResourceBuilder.withIntermediatePrimaryType(@Nullable java.lang.String primaryType)
Set the primary type for intermediate resources created
when the parent of resource being created does not exist.
|
Modifier and Type | Field and Description |
---|---|
protected ResourceBuilder |
SlingContextImpl.resourceBuilder |
Modifier and Type | Method and Description |
---|---|
@NotNull ResourceBuilder |
SlingContextImpl.build()
Creates a
ResourceBuilder object for easily creating test content. |
Copyright © 2014–2021 wcm.io. All rights reserved.