Class VaultPackageAssembler
java.lang.Object
org.apache.sling.feature.cpconverter.vltpkg.VaultPackageAssembler
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependency
(@NotNull org.apache.jackrabbit.vault.packaging.Dependency dependency) void
void
addEntry
(@NotNull String path, @NotNull InputStream input) void
addEntry
(@NotNull String path, @NotNull org.apache.jackrabbit.vault.fs.io.Archive archive, @NotNull org.apache.jackrabbit.vault.fs.io.Archive.Entry entry) static @NotNull VaultPackageAssembler
create
(@NotNull File baseTempDir, @NotNull org.apache.jackrabbit.vault.packaging.PackageId packageId, String description) Creates a new package assembler.static @NotNull VaultPackageAssembler
create
(@NotNull File baseTempDir, @NotNull org.apache.jackrabbit.vault.packaging.VaultPackage vaultPackage, boolean removeInstallHooks, boolean disablePackageTypeRecalculation) Creates a new package assembler based on an existing package.@NotNull OutputStream
createEntry
(@NotNull String path) @NotNull File
@NotNull File
getFileEntry
(@NotNull String relativePath) The incoming path must be relative, using slashes as separators, and start with a slash.org.apache.jackrabbit.vault.fs.config.DefaultWorkspaceFilter
@NotNull Properties
void
mergeFilters
(@NotNull org.apache.jackrabbit.vault.fs.api.WorkspaceFilter filter) boolean
recordEntryPath
(@NotNull String entryPath) Records an entry path as it is processed by theContentPackage2FeatureModelConverter
.void
updateDependencies
(@NotNull Map<org.apache.jackrabbit.vault.packaging.PackageId, Set<org.apache.jackrabbit.vault.packaging.Dependency>> mutableContentsIds)
-
Field Details
-
VERSION_SUFFIX
- See Also:
-
-
Method Details
-
create
@NotNull public static @NotNull VaultPackageAssembler create(@NotNull @NotNull File baseTempDir, @NotNull @NotNull org.apache.jackrabbit.vault.packaging.VaultPackage vaultPackage, boolean removeInstallHooks, boolean disablePackageTypeRecalculation) Creates a new package assembler based on an existing package. Takes over properties and filter rules from existing package.- Parameters:
baseTempDir
- the temp dirvaultPackage
- the package to take as blueprintremoveInstallHooks
- whether to remove install hooks or notdisablePackageTypeRecalculation
- disables the package recalculation and uses the parent source type- Returns:
- the package assembler
-
create
@NotNull public static @NotNull VaultPackageAssembler create(@NotNull @NotNull File baseTempDir, @NotNull @NotNull org.apache.jackrabbit.vault.packaging.PackageId packageId, String description) Creates a new package assembler.- Parameters:
baseTempDir
- the temp dirpackageId
- the package id from which to generate a minimal properties.xmldescription
- the description which should end up in the package properties- Returns:
- the package assembler
-
getPackageProperties
-
mergeFilters
public void mergeFilters(@NotNull @NotNull org.apache.jackrabbit.vault.fs.api.WorkspaceFilter filter) -
getFilter
public org.apache.jackrabbit.vault.fs.config.DefaultWorkspaceFilter getFilter() -
addEntry
public void addEntry(@NotNull @NotNull String path, @NotNull @NotNull org.apache.jackrabbit.vault.fs.io.Archive archive, @NotNull @NotNull org.apache.jackrabbit.vault.fs.io.Archive.Entry entry) throws IOException - Throws:
IOException
-
addEntry
- Throws:
IOException
-
addEntry
public void addEntry(@NotNull @NotNull String path, @NotNull @NotNull InputStream input) throws IOException - Throws:
IOException
-
createEntry
- Throws:
IOException
-
getFileEntry
The incoming path must be relative, using slashes as separators, and start with a slash. The parts of the relative path must use characters which work on every platform filesystem.- Parameters:
relativePath
- relative path- Returns:
- The file
-
recordEntryPath
Records an entry path as it is processed by theContentPackage2FeatureModelConverter
. The path of all original entries that got processed will later be compared to the paths of those entries written back to this assembler to build the converted content package and generate an updatedWorkspaceFilter
that no longer refers to paths that got moved out to the feature model (see also https://issues.apache.org/jira/browse/SLING-10467)- Parameters:
entryPath
- The path of a content package entry processed by the converter.- Returns:
true
if the given path was successfully added to the internal set,false
otherwise.
-
updateDependencies
-
addDependency
public void addDependency(@NotNull @NotNull org.apache.jackrabbit.vault.packaging.Dependency dependency) -
createPackage
- Throws:
IOException
-