Class BundleEntryHandler
- java.lang.Object
-
- org.apache.sling.feature.cpconverter.handlers.BundleEntryHandler
-
- All Implemented Interfaces:
EntryHandler
- Direct Known Subclasses:
SlingInitialContentBundleHandler
public class BundleEntryHandler extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
logger
static String
NAMESPACES_BUNDLE_HEADER
static String
NODETYPES_BUNDLE_HEADER
-
Constructor Summary
Constructors Constructor Description BundleEntryHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected @NotNull org.apache.sling.feature.ArtifactId
extractArtifactId(@NotNull String bundleName, @NotNull JarFile jarFile)
protected @NotNull Pattern
getPattern()
void
handle(@NotNull String path, @NotNull org.apache.jackrabbit.vault.fs.io.Archive archive, @NotNull org.apache.jackrabbit.vault.fs.io.Archive.Entry entry, @NotNull ContentPackage2FeatureModelConverter converter)
VaultPackageAssembler
initPackageAssemblerForPath(@NotNull org.apache.sling.feature.ArtifactId bundleArtifactId, @NotNull String repositoryPath, @NotNull org.apache.sling.jcr.contentloader.PathEntry pathEntry, @NotNull Map<org.apache.jackrabbit.vault.packaging.PackageType,VaultPackageAssembler> cache, @NotNull ContentPackage2FeatureModelConverter converter)
Lazily initializes the cache with the necessary VaultPackageAssemblersboolean
matches(@NotNull String path)
void
setSlingInitialContentPolicy(@NotNull ContentPackage2FeatureModelConverter.SlingInitialContentPolicy slingInitialContentPolicy)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.sling.feature.cpconverter.handlers.EntryHandler
withConfig
-
-
-
-
Field Detail
-
NODETYPES_BUNDLE_HEADER
public static final String NODETYPES_BUNDLE_HEADER
- See Also:
- Constant Field Values
-
NAMESPACES_BUNDLE_HEADER
public static final String NAMESPACES_BUNDLE_HEADER
- See Also:
- Constant Field Values
-
logger
protected final org.slf4j.Logger logger
-
-
Method Detail
-
setSlingInitialContentPolicy
public void setSlingInitialContentPolicy(@NotNull @NotNull ContentPackage2FeatureModelConverter.SlingInitialContentPolicy slingInitialContentPolicy)
-
handle
public void handle(@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, @NotNull @NotNull ContentPackage2FeatureModelConverter converter) throws Exception
- Throws:
Exception
-
initPackageAssemblerForPath
public VaultPackageAssembler initPackageAssemblerForPath(@NotNull @NotNull org.apache.sling.feature.ArtifactId bundleArtifactId, @NotNull @NotNull String repositoryPath, @NotNull @NotNull org.apache.sling.jcr.contentloader.PathEntry pathEntry, @NotNull @NotNull Map<org.apache.jackrabbit.vault.packaging.PackageType,VaultPackageAssembler> cache, @NotNull @NotNull ContentPackage2FeatureModelConverter converter)
Lazily initializes the cache with the necessary VaultPackageAssemblers- Parameters:
bundleArtifactId
-repositoryPath
-cache
-converter
-- Returns:
- the VaultPackageAssembler from the cache to use for the given repository path
-
extractArtifactId
@NotNull protected @NotNull org.apache.sling.feature.ArtifactId extractArtifactId(@NotNull @NotNull String bundleName, @NotNull @NotNull JarFile jarFile) throws IOException
- Throws:
IOException
-
matches
public final boolean matches(@NotNull @NotNull String path)
- Specified by:
matches
in interfaceEntryHandler
-
getPattern
@NotNull protected final @NotNull Pattern getPattern()
-
-