public class DefaultFeaturesManager extends Object implements FeaturesManager, PackagesEventsEmitter
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultFeaturesManager.ConfigurationHandling |
| Constructor and Description |
|---|
DefaultFeaturesManager(boolean mergeConfigurations,
int bundlesStartOrder,
@NotNull File featureModelsOutputDirectory,
@Nullable String artifactIdOverride,
@Nullable String prefix,
@NotNull Map<String,String> properties,
@Nullable AclManager aclManager) |
DefaultFeaturesManager(@NotNull DefaultFeaturesManager.ConfigurationHandling configurationHandling,
int bundlesStartOrder,
@NotNull File featureModelsOutputDirectory,
@Nullable String artifactIdOverride,
@Nullable String prefix,
@NotNull Map<String,String> properties,
@Nullable AclManager aclManager) |
DefaultFeaturesManager(@NotNull File tempDir) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAPIRegionExport(@Nullable String runMode,
@NotNull String exportedPackage) |
void |
addArtifact(@Nullable String runMode,
@NotNull org.apache.sling.feature.ArtifactId id) |
void |
addArtifact(@Nullable String runMode,
@NotNull org.apache.sling.feature.Artifact artifact,
@Nullable Integer startOrder) |
void |
addConfiguration(@Nullable String runMode,
@NotNull org.apache.sling.feature.Configuration cfg,
@NotNull String path,
@NotNull Dictionary<String,Object> configurationProperties)
Add a configuration
|
void |
addOrAppendRepoInitExtension(@NotNull String source,
@NotNull String text,
@Nullable String runMode)
Add repoinit instructions
|
void |
addSeed(@NotNull org.apache.sling.feature.Feature seed) |
void |
end()
Package converter ends
|
void |
endPackage(@NotNull org.apache.jackrabbit.vault.packaging.PackageId originalPackageId,
@NotNull org.apache.jackrabbit.vault.packaging.VaultPackage convertedPackage)
Marks the end of the conversion of the package with
originalPackageId. |
void |
endSubPackage(@NotNull String path,
@NotNull org.apache.jackrabbit.vault.packaging.PackageId originalPackageId,
@NotNull org.apache.jackrabbit.vault.packaging.VaultPackage convertedPackage)
Marks the end of the conversion of the sub package with
originalPackageId. |
@NotNull Map<String,String> |
getNamespaceUriByPrefix() |
@NotNull org.apache.sling.feature.Feature |
getRunMode(@Nullable String runMode) |
@Nullable org.apache.sling.feature.Feature |
getTargetFeature() |
void |
init(@NotNull org.apache.sling.feature.ArtifactId packageId) |
void |
serialize() |
void |
setAclManager(AclManager aclManager) |
@NotNull DefaultFeaturesManager |
setAPIRegions(@NotNull List<String> regions) |
void |
setEnforceServiceMappingByPrincipal(boolean enforceServiceMappingByPrincipal) |
@NotNull DefaultFeaturesManager |
setExportToAPIRegion(@NotNull String region) |
void |
start()
Package converter starts
|
void |
startPackage(@NotNull org.apache.jackrabbit.vault.packaging.VaultPackage originalPackage)
Marks the start of the given original package.
|
void |
startSubPackage(@NotNull String path,
@NotNull org.apache.jackrabbit.vault.packaging.VaultPackage originalPackage)
Marks the start of the given sub package.
|
public DefaultFeaturesManager(@NotNull
@NotNull File tempDir)
public DefaultFeaturesManager(boolean mergeConfigurations,
int bundlesStartOrder,
@NotNull
@NotNull File featureModelsOutputDirectory,
@Nullable
@Nullable String artifactIdOverride,
@Nullable
@Nullable String prefix,
@NotNull
@NotNull Map<String,String> properties,
@Nullable
@Nullable AclManager aclManager)
public DefaultFeaturesManager(@NotNull
@NotNull DefaultFeaturesManager.ConfigurationHandling configurationHandling,
int bundlesStartOrder,
@NotNull
@NotNull File featureModelsOutputDirectory,
@Nullable
@Nullable String artifactIdOverride,
@Nullable
@Nullable String prefix,
@NotNull
@NotNull Map<String,String> properties,
@Nullable
@Nullable AclManager aclManager)
public void init(@NotNull
@NotNull org.apache.sling.feature.ArtifactId packageId)
init in interface FeaturesManager@Nullable public @Nullable org.apache.sling.feature.Feature getTargetFeature()
getTargetFeature in interface FeaturesManager@NotNull
public @NotNull org.apache.sling.feature.Feature getRunMode(@Nullable
@Nullable String runMode)
getRunMode in interface FeaturesManagerpublic void addArtifact(@Nullable
@Nullable String runMode,
@NotNull
@NotNull org.apache.sling.feature.ArtifactId id)
addArtifact in interface FeaturesManagerpublic void addArtifact(@Nullable
@Nullable String runMode,
@NotNull
@NotNull org.apache.sling.feature.Artifact artifact,
@Nullable
@Nullable Integer startOrder)
addArtifact in interface FeaturesManagerpublic void addAPIRegionExport(@Nullable
@Nullable String runMode,
@NotNull
@NotNull String exportedPackage)
addAPIRegionExport in interface FeaturesManagerpublic void setEnforceServiceMappingByPrincipal(boolean enforceServiceMappingByPrincipal)
public void addSeed(@NotNull
@NotNull org.apache.sling.feature.Feature seed)
throws IOException,
ConverterException
IOExceptionConverterException@NotNull public @NotNull Map<String,String> getNamespaceUriByPrefix()
getNamespaceUriByPrefix in interface FeaturesManagerpublic void setAclManager(AclManager aclManager)
public void addConfiguration(@Nullable
@Nullable String runMode,
@NotNull
@NotNull org.apache.sling.feature.Configuration cfg,
@NotNull
@NotNull String path,
@NotNull
@NotNull Dictionary<String,Object> configurationProperties)
throws IOException,
ConverterException
FeaturesManageraddConfiguration in interface FeaturesManagerrunMode - Optional runmodecfg - The configuration object for the pid and factory pid, name - no propertiespath - The path for the configurationconfigurationProperties - The configuration propertiesIOException - if an error occursConverterException - if conversion failspublic void serialize()
throws IOException
serialize in interface FeaturesManagerIOException@NotNull public @NotNull DefaultFeaturesManager setAPIRegions(@NotNull @NotNull List<String> regions)
@NotNull public @NotNull DefaultFeaturesManager setExportToAPIRegion(@NotNull @NotNull String region)
public void addOrAppendRepoInitExtension(@NotNull
@NotNull String source,
@NotNull
@NotNull String text,
@Nullable
@Nullable String runMode)
FeaturesManageraddOrAppendRepoInitExtension in interface FeaturesManagersource - An identifier for the source, for example the configuration pidtext - The repoinit instructionsrunMode - Optional runmodepublic void start()
PackagesEventsEmitterstart in interface PackagesEventsEmitterpublic void end()
PackagesEventsEmitterend in interface PackagesEventsEmitterpublic void startPackage(@NotNull
@NotNull org.apache.jackrabbit.vault.packaging.VaultPackage originalPackage)
PackagesEventsEmitterstartPackage in interface PackagesEventsEmitteroriginalPackage - the package to be converted.public void endPackage(@NotNull
@NotNull org.apache.jackrabbit.vault.packaging.PackageId originalPackageId,
@NotNull
@NotNull org.apache.jackrabbit.vault.packaging.VaultPackage convertedPackage)
PackagesEventsEmitteroriginalPackageId.endPackage in interface PackagesEventsEmitteroriginalPackageId - The id of the original package as passed to PackagesEventsEmitter.startPackage(VaultPackage).convertedPackage - the converted package.public void startSubPackage(@NotNull
@NotNull String path,
@NotNull
@NotNull org.apache.jackrabbit.vault.packaging.VaultPackage originalPackage)
PackagesEventsEmitterstartSubPackage in interface PackagesEventsEmitterpath - The path of the sub package in the original parent packageoriginalPackage - the sub package to be converted.public void endSubPackage(@NotNull
@NotNull String path,
@NotNull
@NotNull org.apache.jackrabbit.vault.packaging.PackageId originalPackageId,
@NotNull
@NotNull org.apache.jackrabbit.vault.packaging.VaultPackage convertedPackage)
PackagesEventsEmitteroriginalPackageId.endSubPackage in interface PackagesEventsEmitterpath - The path of the original sub package in the parent packageoriginalPackageId - The id of the original sub package as passed to PackagesEventsEmitter.startSubPackage(String, VaultPackage).convertedPackage - the converted packageCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.