public class ContentBuilder extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.sling.api.resource.ResourceResolver |
resourceResolver |
Constructor and Description |
---|
ContentBuilder(org.apache.sling.api.resource.ResourceResolver resourceResolver) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.sling.api.resource.Resource |
ensureResourceExists(String path)
Ensure that a resource exists at the given path.
|
org.apache.sling.api.resource.Resource |
resource(String path)
Create resource.
|
org.apache.sling.api.resource.Resource |
resource(String path,
Map<String,Object> properties)
Create resource.
|
org.apache.sling.api.resource.Resource |
resource(String path,
Object... properties)
Create resource.
|
protected final org.apache.sling.api.resource.ResourceResolver resourceResolver
public ContentBuilder(org.apache.sling.api.resource.ResourceResolver resourceResolver)
resourceResolver
- Resource resolverpublic final org.apache.sling.api.resource.Resource resource(String path)
nt:unstructured
nodes.path
- Page pathpublic final org.apache.sling.api.resource.Resource resource(String path, Map<String,Object> properties)
nt:unstructured
nodes.path
- Page pathproperties
- Properties for resource.public final org.apache.sling.api.resource.Resource resource(String path, Object... properties)
nt:unstructured
nodes.path
- Page pathproperties
- Properties for resource.protected final org.apache.sling.api.resource.Resource ensureResourceExists(String path)
nt:unstructured
node type.path
- Resource pathCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.