public final class ContentLoader extends Object
ResourceResolver.commit()
is called (when autocommit mode is active).Constructor and Description |
---|
ContentLoader(org.apache.sling.api.resource.ResourceResolver resourceResolver) |
ContentLoader(org.apache.sling.api.resource.ResourceResolver resourceResolver,
org.osgi.framework.BundleContext bundleContext) |
ContentLoader(org.apache.sling.api.resource.ResourceResolver resourceResolver,
org.osgi.framework.BundleContext bundleContext,
boolean autoCommit) |
Modifier and Type | Method and Description |
---|---|
org.apache.sling.api.resource.Resource |
binaryFile(InputStream inputStream,
org.apache.sling.api.resource.Resource parentResource,
String name)
Import binary file as nt:file binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryFile(InputStream inputStream,
org.apache.sling.api.resource.Resource parentResource,
String name,
String mimeType)
Import binary file as nt:file binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryFile(InputStream inputStream,
String path)
Import binary file as nt:file binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryFile(InputStream inputStream,
String path,
String mimeType)
Import binary file as nt:file binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryFile(String classpathResource,
String path)
Import binary file as nt:file binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryFile(String classpathResource,
String path,
String mimeType)
Import binary file as nt:file binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryResource(InputStream inputStream,
org.apache.sling.api.resource.Resource parentResource,
String name)
Import binary file as nt:resource binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryResource(InputStream inputStream,
org.apache.sling.api.resource.Resource parentResource,
String name,
String mimeType)
Import binary file as nt:resource binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryResource(InputStream inputStream,
String path)
Import binary file as nt:resource binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryResource(InputStream inputStream,
String path,
String mimeType)
Import binary file as nt:resource binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryResource(String classpathResource,
String path)
Import binary file as nt:resource binary node into repository.
|
org.apache.sling.api.resource.Resource |
binaryResource(String classpathResource,
String path,
String mimeType)
Import binary file as nt:resource binary node into repository.
|
org.apache.sling.api.resource.Resource |
json(InputStream inputStream,
org.apache.sling.api.resource.Resource parentResource,
String childName)
Import content of JSON file into repository.
|
org.apache.sling.api.resource.Resource |
json(InputStream inputStream,
String destPath)
Import content of JSON file into repository.
|
org.apache.sling.api.resource.Resource |
json(String classpathResource,
org.apache.sling.api.resource.Resource parentResource,
String childName)
Import content of JSON file into repository.
|
org.apache.sling.api.resource.Resource |
json(String classpathResource,
String destPath)
Import content of JSON file into repository.
|
public ContentLoader(org.apache.sling.api.resource.ResourceResolver resourceResolver)
resourceResolver
- Resource resolverpublic ContentLoader(org.apache.sling.api.resource.ResourceResolver resourceResolver, org.osgi.framework.BundleContext bundleContext)
resourceResolver
- Resource resolverbundleContext
- Bundle contextpublic ContentLoader(org.apache.sling.api.resource.ResourceResolver resourceResolver, org.osgi.framework.BundleContext bundleContext, boolean autoCommit)
resourceResolver
- Resource resolverbundleContext
- Bundle contextautoCommit
- Automatically commit changes after loading content (default: true)public org.apache.sling.api.resource.Resource json(String classpathResource, org.apache.sling.api.resource.Resource parentResource, String childName)
classpathResource
- Classpath resource URL for JSON contentparentResource
- Parent resourcechildName
- Name of child resource to create with JSON contentpublic org.apache.sling.api.resource.Resource json(String classpathResource, String destPath)
classpathResource
- Classpath resource URL for JSON contentdestPath
- Path to import the JSON content topublic org.apache.sling.api.resource.Resource json(InputStream inputStream, org.apache.sling.api.resource.Resource parentResource, String childName)
inputStream
- Input stream with JSON contentparentResource
- Parent resourcechildName
- Name of child resource to create with JSON contentpublic org.apache.sling.api.resource.Resource json(InputStream inputStream, String destPath)
inputStream
- Input stream with JSON contentdestPath
- Path to import the JSON content topublic org.apache.sling.api.resource.Resource binaryFile(String classpathResource, String path)
classpathResource
or path
.classpathResource
- Classpath resource URL for binary file.path
- Path to mount binary data to (parent nodes created
automatically)public org.apache.sling.api.resource.Resource binaryFile(String classpathResource, String path, String mimeType)
classpathResource
- Classpath resource URL for binary file.path
- Path to mount binary data to (parent nodes created
automatically)mimeType
- Mime type of binary datapublic org.apache.sling.api.resource.Resource binaryFile(InputStream inputStream, String path)
inputStream
- Input stream for binary datapath
- Path to mount binary data to (parent nodes created
automatically)public org.apache.sling.api.resource.Resource binaryFile(InputStream inputStream, String path, String mimeType)
inputStream
- Input stream for binary datapath
- Path to mount binary data to (parent nodes created
automatically)mimeType
- Mime type of binary datapublic org.apache.sling.api.resource.Resource binaryFile(InputStream inputStream, org.apache.sling.api.resource.Resource parentResource, String name)
inputStream
- Input stream for binary dataparentResource
- Parent resourcename
- Resource name for nt:filepublic org.apache.sling.api.resource.Resource binaryFile(InputStream inputStream, org.apache.sling.api.resource.Resource parentResource, String name, String mimeType)
inputStream
- Input stream for binary dataparentResource
- Parent resourcename
- Resource name for nt:filemimeType
- Mime type of binary datapublic org.apache.sling.api.resource.Resource binaryResource(String classpathResource, String path)
classpathResource
or path
.classpathResource
- Classpath resource URL for binary file.path
- Path to mount binary data to (parent nodes created
automatically)public org.apache.sling.api.resource.Resource binaryResource(String classpathResource, String path, String mimeType)
classpathResource
- Classpath resource URL for binary file.path
- Path to mount binary data to (parent nodes created
automatically)mimeType
- Mime type of binary datapublic org.apache.sling.api.resource.Resource binaryResource(InputStream inputStream, String path)
inputStream
- Input stream for binary datapath
- Path to mount binary data to (parent nodes created
automatically)public org.apache.sling.api.resource.Resource binaryResource(InputStream inputStream, String path, String mimeType)
inputStream
- Input stream for binary datapath
- Path to mount binary data to (parent nodes created
automatically)mimeType
- Mime type of binary datapublic org.apache.sling.api.resource.Resource binaryResource(InputStream inputStream, org.apache.sling.api.resource.Resource parentResource, String name)
inputStream
- Input stream for binary dataparentResource
- Parent resourcename
- Resource name for nt:resourcepublic org.apache.sling.api.resource.Resource binaryResource(InputStream inputStream, org.apache.sling.api.resource.Resource parentResource, String name, String mimeType)
inputStream
- Input stream for binary dataparentResource
- Parent resourcename
- Resource name for nt:resourcemimeType
- Mime type of binary dataCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.