Class VaultPackageAssembler

    • Method Detail

      • create

        @NotNull
        public static @NotNull VaultPackageAssembler create​(@NotNull
                                                            @NotNull File baseTempDir,
                                                            @NotNull
                                                            @NotNull org.apache.jackrabbit.vault.packaging.VaultPackage vaultPackage,
                                                            boolean removeInstallHooks)
        Creates a new package assembler based on an existing package. Takes over properties and filter rules from existing package.
        Parameters:
        baseTempDir - the temp dir
        vaultPackage - the package to take as blueprint
        removeInstallHooks - whether to remove install hooks or not
        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 dir
        packageId - the package id from which to generate a minimal properties.xml
        description - the description which should end up in the package properties
        Returns:
        the package assembler
      • getPackageProperties

        @NotNull
        public @NotNull Properties 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
      • getEntry

        @NotNull
        public @NotNull File getEntry​(@NotNull
                                      @NotNull String path)
      • recordEntryPath

        public boolean recordEntryPath​(@NotNull
                                       @NotNull String entryPath)
        Records an entry path as it is processed by the ContentPackage2FeatureModelConverter. 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 updated WorkspaceFilter 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

        public void updateDependencies​(@NotNull
                                       @NotNull Map<org.apache.jackrabbit.vault.packaging.PackageId,​Set<org.apache.jackrabbit.vault.packaging.Dependency>> mutableContentsIds)
      • addDependency

        public void addDependency​(@NotNull
                                  @NotNull org.apache.jackrabbit.vault.packaging.Dependency dependency)