@ConsumerType public class UniqueRoot extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
uniquePathPart |
| Modifier | Constructor and Description |
|---|---|
protected |
UniqueRoot(@NotNull SlingContextImpl context) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull String |
apps()
Gets (and creates if required) a unique path at
/apps/xxx. |
protected void |
cleanUp()
Cleanup is called when the unit test rule completes a unit test run.
|
@NotNull String |
content()
Gets (and creates if required) a unique path at
/content/xxx. |
protected void |
deleteResources(org.apache.sling.api.resource.Resource... resources)
Deletes the given set of resources and commits afterwards.
|
protected org.apache.sling.api.resource.Resource |
getOrCreateResource(@NotNull String path,
@NotNull String primaryType)
Get or create resource with given JCR primary type
|
@NotNull String |
libs()
Gets (and creates if required) a unique path at
/libs/xxx. |
protected final String uniquePathPart
protected UniqueRoot(@NotNull
@NotNull SlingContextImpl context)
protected final org.apache.sling.api.resource.Resource getOrCreateResource(@NotNull
@NotNull String path,
@NotNull
@NotNull String primaryType)
path - PathprimaryType - JCR primary type@NotNull public final @NotNull String content()
/content/xxx.
The path (incl. all children) is automatically removed when the unit test completes.@NotNull public final @NotNull String apps()
/apps/xxx.
The path (incl. all children) is automatically removed when the unit test completes.@NotNull public final @NotNull String libs()
/libs/xxx.
The path (incl. all children) is automatically removed when the unit test completes.protected void cleanUp()
protected final void deleteResources(@Nullable
org.apache.sling.api.resource.Resource... resources)
resources - Resources to be deletedCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.