public final class ContentLoader extends Object
ResourceResolver.commit() is called (when autocommit mode is active).| Constructor and Description |
|---|
ContentLoader(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver) |
ContentLoader(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@Nullable org.osgi.framework.BundleContext bundleContext) |
ContentLoader(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@Nullable org.osgi.framework.BundleContext bundleContext,
boolean autoCommit) |
ContentLoader(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@Nullable org.osgi.framework.BundleContext bundleContext,
boolean autoCommit,
@Nullable ResourceResolverType resourceResolverType) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull org.apache.sling.api.resource.Resource |
binaryFile(@NotNull InputStream inputStream,
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull String name)
Import binary file as nt:file binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryFile(@NotNull InputStream inputStream,
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull String name,
@NotNull String mimeType)
Import binary file as nt:file binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryFile(@NotNull InputStream inputStream,
@NotNull String path)
Import binary file as nt:file binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryFile(@NotNull InputStream inputStream,
@NotNull String path,
@NotNull String mimeType)
Import binary file as nt:file binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryFile(@NotNull String classpathResource,
@NotNull String path)
Import binary file as nt:file binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryFile(@NotNull String classpathResource,
@NotNull String path,
@NotNull String mimeType)
Import binary file as nt:file binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryResource(@NotNull InputStream inputStream,
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull String name)
Import binary file as nt:resource binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryResource(@NotNull InputStream inputStream,
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull String name,
@NotNull String mimeType)
Import binary file as nt:resource binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryResource(@NotNull InputStream inputStream,
@NotNull String path)
Import binary file as nt:resource binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryResource(@NotNull InputStream inputStream,
@NotNull String path,
@NotNull String mimeType)
Import binary file as nt:resource binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryResource(@NotNull String classpathResource,
@NotNull String path)
Import binary file as nt:resource binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
binaryResource(@NotNull String classpathResource,
@NotNull String path,
@NotNull String mimeType)
Import binary file as nt:resource binary node into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
json(@NotNull InputStream inputStream,
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull String childName)
Import content of JSON file into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
json(@NotNull InputStream inputStream,
@NotNull String destPath)
Import content of JSON file into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
json(@NotNull String classpathResource,
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull String childName)
Import content of JSON file into repository.
|
@NotNull org.apache.sling.api.resource.Resource |
json(@NotNull String classpathResource,
@NotNull String destPath)
Import content of JSON file into repository.
|
public ContentLoader(@NotNull
@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver)
resourceResolver - Resource resolverpublic ContentLoader(@NotNull
@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@Nullable
@Nullable org.osgi.framework.BundleContext bundleContext)
resourceResolver - Resource resolverbundleContext - Bundle contextpublic ContentLoader(@NotNull
@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@Nullable
@Nullable org.osgi.framework.BundleContext bundleContext,
boolean autoCommit)
resourceResolver - Resource resolverbundleContext - Bundle contextautoCommit - Automatically commit changes after loading content (default: true)public ContentLoader(@NotNull
@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver,
@Nullable
@Nullable org.osgi.framework.BundleContext bundleContext,
boolean autoCommit,
@Nullable
@Nullable ResourceResolverType resourceResolverType)
resourceResolver - Resource resolverbundleContext - Bundle contextautoCommit - Automatically commit changes after loading content (default: true)resourceResolverType - Resource resolver type.@NotNull
public @NotNull org.apache.sling.api.resource.Resource json(@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull
@NotNull String childName)
classpathResource - Classpath resource URL for JSON contentparentResource - Parent resourcechildName - Name of child resource to create with JSON content@NotNull
public @NotNull org.apache.sling.api.resource.Resource json(@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull String destPath)
classpathResource - Classpath resource URL for JSON contentdestPath - Path to import the JSON content to@NotNull
public @NotNull org.apache.sling.api.resource.Resource json(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull
@NotNull String childName)
inputStream - Input stream with JSON contentparentResource - Parent resourcechildName - Name of child resource to create with JSON content@NotNull
public @NotNull org.apache.sling.api.resource.Resource json(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull String destPath)
inputStream - Input stream with JSON contentdestPath - Path to import the JSON content to@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryFile(@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull String path)
classpathResource or path.classpathResource - Classpath resource URL for binary file.path - Path to mount binary data to (parent nodes created
automatically)@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryFile(@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull String path,
@NotNull
@NotNull 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 data@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryFile(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull String path)
inputStream - Input stream for binary datapath - Path to mount binary data to (parent nodes created
automatically)@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryFile(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull String path,
@NotNull
@NotNull String mimeType)
inputStream - Input stream for binary datapath - Path to mount binary data to (parent nodes created
automatically)mimeType - Mime type of binary data@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryFile(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull
@NotNull String name)
inputStream - Input stream for binary dataparentResource - Parent resourcename - Resource name for nt:file@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryFile(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull
@NotNull String name,
@NotNull
@NotNull String mimeType)
inputStream - Input stream for binary dataparentResource - Parent resourcename - Resource name for nt:filemimeType - Mime type of binary data@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryResource(@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull String path)
classpathResource or path.classpathResource - Classpath resource URL for binary file.path - Path to mount binary data to (parent nodes created
automatically)@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryResource(@NotNull
@NotNull String classpathResource,
@NotNull
@NotNull String path,
@NotNull
@NotNull 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 data@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryResource(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull String path)
inputStream - Input stream for binary datapath - Path to mount binary data to (parent nodes created
automatically)@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryResource(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull String path,
@NotNull
@NotNull String mimeType)
inputStream - Input stream for binary datapath - Path to mount binary data to (parent nodes created
automatically)mimeType - Mime type of binary data@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryResource(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull
@NotNull String name)
inputStream - Input stream for binary dataparentResource - Parent resourcename - Resource name for nt:resource@NotNull
public @NotNull org.apache.sling.api.resource.Resource binaryResource(@NotNull
@NotNull InputStream inputStream,
@NotNull
@NotNull org.apache.sling.api.resource.Resource parentResource,
@NotNull
@NotNull String name,
@NotNull
@NotNull 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.