Package org.apache.sling.feature.cpconverter.handlers.slinginitialcontent

## Class BundleSlingInitialContentExtractor

- java.lang.Object
- - org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.BundleSlingInitialContentExtractor

    public class BundleSlingInitialContentExtractor
    extends Object

Extracts the sling initial content from a bundle to an java.io.InputStream.

### Field Summary

Fields
`protected AssemblerProvider` `assemblerProvider`
`protected org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.ContentReaderProvider` `contentReaderProvider`
`protected org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.ParentFolderRepoInitHandler` `parentFolderRepoInitHandler`

### Constructor Summary

Constructors
`BundleSlingInitialContentExtractor()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addRepoInitExtension​(@NotNull List<VaultPackageAssembler> assemblers, @NotNull FeaturesManager featureManager)`
`@Nullable InputStream` `extract​(@NotNull BundleSlingInitialContentExtractContext context)` Extract the bundle sling initial content, assemble it into package assemblers into a different package, And strip the bundle of all the sling initial content.
`protected void` `finalizePackageAssembly​(@NotNull BundleSlingInitialContentExtractContext context)`
`void` `reset()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### assemblerProvider

    protected final AssemblerProvider assemblerProvider

#### contentReaderProvider

    protected final org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.ContentReaderProvider contentReaderProvider

#### parentFolderRepoInitHandler

    protected final org.apache.sling.feature.cpconverter.handlers.slinginitialcontent.ParentFolderRepoInitHandler parentFolderRepoInitHandler

### Constructor Detail

#### BundleSlingInitialContentExtractor

    public BundleSlingInitialContentExtractor()

### Method Detail

#### extract

    @Nullable
    public @Nullable InputStream extract​(@NotNull
                                         @NotNull BundleSlingInitialContentExtractContext context)
                                  throws IOException,
                                         ConverterException

Extract the bundle sling initial content, assemble it into package assemblers into a different package, And strip the bundle of all the sling initial content.

Parameters:
  `context` - all context variables needed to perform the extraction.
Returns:
  stripped bundle inputstream
Throws:
  `IOException`
  `ConverterException`

#### reset

    public void reset()

#### addRepoInitExtension

    public void addRepoInitExtension​(@NotNull
                                     @NotNull List<VaultPackageAssembler> assemblers,
                                     @NotNull
                                     @NotNull FeaturesManager featureManager)
                              throws IOException,
                                     ConverterException

Throws:
  `IOException`
  `ConverterException`

#### finalizePackageAssembly

    protected void finalizePackageAssembly​(@NotNull
                                           @NotNull BundleSlingInitialContentExtractContext context)
                                    throws IOException,
                                           ConverterException

Throws:
  `IOException`
  `ConverterException`