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