@ProviderType
public interface PackageHelper
| Modifier and Type | Interface and Description |
|---|---|
static class |
PackageHelper.ConflictResolution
None: If conflicting package exists; fail to create a new package.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PACKAGE_THUMBNAIL_RESOURCE_PATH
JCR Path to default ACS thumbnail resource.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addThumbnail(org.apache.jackrabbit.vault.packaging.JcrPackage jcrPackage,
org.apache.sling.api.resource.Resource thumbnailResource)
Adds the thumbnail resource to the package as the package thumbnail.
|
org.apache.jackrabbit.vault.packaging.JcrPackage |
createPackage(Collection<org.apache.sling.api.resource.Resource> resources,
javax.jcr.Session session,
String groupName,
String name,
String version,
PackageHelper.ConflictResolution conflictResolution,
Map<String,String> packageDefinitionProperties) |
org.apache.jackrabbit.vault.packaging.JcrPackage |
createPackageForPaths(Collection<String> paths,
javax.jcr.Session session,
String groupName,
String name,
String version,
PackageHelper.ConflictResolution conflictResolution,
Map<String,String> packageDefinitionProperties) |
org.apache.jackrabbit.vault.packaging.JcrPackage |
createPackageFromPathFilterSets(Collection<org.apache.jackrabbit.vault.fs.api.PathFilterSet> pathFilterSets,
javax.jcr.Session session,
String groupName,
String name,
String version,
PackageHelper.ConflictResolution conflictResolution,
Map<String,String> packageDefinitionProperties) |
List<String> |
getContents(org.apache.jackrabbit.vault.packaging.JcrPackage jcrPackage)
returns a list of the JCR resource paths includes in the built JcrPackage
|
String |
getErrorJSON(String msg)
Returns the JSON to return in the event of an unsuccessful packaging.
|
org.apache.jackrabbit.vault.packaging.Version |
getNextVersion(org.apache.jackrabbit.vault.packaging.JcrPackageManager jcrPackageManager,
String groupName,
String name,
String version)
Derives the next package version to use based on the input params and the existing package versions matching
the input Package group and name.
|
String |
getPathFilterSetPreviewJSON(Collection<org.apache.jackrabbit.vault.fs.api.PathFilterSet> pathFilterSets)
Returns the JSON to return reporting what the packager definition will include for the filterSets.
|
String |
getPreviewJSON(Collection<org.apache.sling.api.resource.Resource> resources)
Returns the JSON to return reporting what the packager definition will include for filterSet roots.
|
String |
getPreviewJSONForPaths(Collection<String> paths)
Returns the JSON to return reporting what the packager definition will include for filterSet roots.
|
String |
getSuccessJSON(org.apache.jackrabbit.vault.packaging.JcrPackage jcrPackage)
Returns the JSON to return in the event of a successful packaging.
|
void |
removePackage(org.apache.jackrabbit.vault.packaging.JcrPackageManager jcrPackageManager,
String groupName,
String name,
String version)
Deletes the package node from the repository.
|
static final String DEFAULT_PACKAGE_THUMBNAIL_RESOURCE_PATH
void addThumbnail(org.apache.jackrabbit.vault.packaging.JcrPackage jcrPackage,
org.apache.sling.api.resource.Resource thumbnailResource)
jcrPackage - The package to add the thumbnail to.thumbnailResource - The JCR resource that is the thumbnail to be used as the package's thumbnailorg.apache.jackrabbit.vault.packaging.Version getNextVersion(org.apache.jackrabbit.vault.packaging.JcrPackageManager jcrPackageManager,
String groupName,
String name,
String version)
throws javax.jcr.RepositoryException
jcrPackageManager - JcrPackageManager objectgroupName - package group namename - package nameversion - package versionjavax.jcr.RepositoryExceptionvoid removePackage(org.apache.jackrabbit.vault.packaging.JcrPackageManager jcrPackageManager,
String groupName,
String name,
String version)
throws javax.jcr.RepositoryException
jcrPackageManager - JcrPackageManager objectgroupName - package group namename - package nameversion - package versionjavax.jcr.RepositoryExceptionorg.apache.jackrabbit.vault.packaging.JcrPackage createPackageFromPathFilterSets(Collection<org.apache.jackrabbit.vault.fs.api.PathFilterSet> pathFilterSets, javax.jcr.Session session, String groupName, String name, String version, PackageHelper.ConflictResolution conflictResolution, Map<String,String> packageDefinitionProperties) throws IOException, javax.jcr.RepositoryException
pathFilterSets - the pathFilterSets that define packagesession - JCR Session obj; must have access to create packages under /etc/packagesgroupName - package group namename - package nameversion - package versionconflictResolution - determines how package creation will be handled in the event of an existing package
of the same package group, package name, and version classpackageDefinitionProperties - properties that will be added to the package definitionIOExceptionjavax.jcr.RepositoryExceptionorg.apache.jackrabbit.vault.packaging.JcrPackage createPackage(Collection<org.apache.sling.api.resource.Resource> resources, javax.jcr.Session session, String groupName, String name, String version, PackageHelper.ConflictResolution conflictResolution, Map<String,String> packageDefinitionProperties) throws IOException, javax.jcr.RepositoryException
resources - the resources to include in the packagesession - JCR Session obj; must have access to create packages under /etc/packagesgroupName - package group namename - package nameversion - package versionconflictResolution - determines how package creation will be handled in the event of an existing package
of the same package group, package name, and version classpackageDefinitionProperties - properties that will be added to the package definitionIOExceptionjavax.jcr.RepositoryExceptionList<String> getContents(org.apache.jackrabbit.vault.packaging.JcrPackage jcrPackage) throws IOException, javax.jcr.RepositoryException, org.apache.jackrabbit.vault.packaging.PackageException
jcrPackage - the jcr packageIOExceptionjavax.jcr.RepositoryExceptionorg.apache.jackrabbit.vault.packaging.PackageExceptionString getSuccessJSON(org.apache.jackrabbit.vault.packaging.JcrPackage jcrPackage) throws javax.jcr.RepositoryException
jcrPackage - the successfully created jcr packagejavax.jcr.RepositoryExceptionString getPreviewJSON(Collection<org.apache.sling.api.resource.Resource> resources)
resources - the resources that represent the filterSet rootsString getPathFilterSetPreviewJSON(Collection<org.apache.jackrabbit.vault.fs.api.PathFilterSet> pathFilterSets)
pathFilterSets - the pathFilterSets of the packageString getErrorJSON(String msg)
msg - the error message to displayString getPreviewJSONForPaths(Collection<String> paths)
paths - the paths that represent the filterSet rootsorg.apache.jackrabbit.vault.packaging.JcrPackage createPackageForPaths(Collection<String> paths, javax.jcr.Session session, String groupName, String name, String version, PackageHelper.ConflictResolution conflictResolution, Map<String,String> packageDefinitionProperties) throws IOException, javax.jcr.RepositoryException
paths - the resources to include in the packagesession - JCR Session obj; must have access to create packages under /etc/packagesgroupName - package group namename - package nameversion - package versionconflictResolution - determines how package creation will be handled in the event of an existing package
of the same package group, package name, and version classpackageDefinitionProperties - properties that will be added to the package definitionIOExceptionjavax.jcr.RepositoryExceptionCopyright © 2013–2020 Adobe. All rights reserved.