Package org.apache.sling.feature.cpconverter.vltpkg

## Class DefaultPackagesEventsEmitter

- java.lang.Object
- - org.apache.sling.feature.cpconverter.vltpkg.DefaultPackagesEventsEmitter

All Implemented Interfaces:
  `PackagesEventsEmitter`

    public final class DefaultPackagesEventsEmitter
    extends Object
    implements PackagesEventsEmitter

Writes a CSV file `containerFile,packageId,packageType[,parentId,pathInParent]`

### Constructor Summary

Constructors
`protected` `DefaultPackagesEventsEmitter​(@NotNull Writer writer)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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`.
`static @NotNull DefaultPackagesEventsEmitter` `open​(@NotNull File featureModelsOutputDirectory)`
`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.

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

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

### Constructor Detail

#### DefaultPackagesEventsEmitter

    protected DefaultPackagesEventsEmitter​(@NotNull
                                           @NotNull Writer writer)

### Method Detail

#### open

    @NotNull
    public static @NotNull DefaultPackagesEventsEmitter open​(@NotNull
                                                             @NotNull File featureModelsOutputDirectory)
                                                      throws IOException

Throws:
  `IOException`

#### start

    public void start()

Description copied from interface: `PackagesEventsEmitter`
Package converter starts

Specified by:
  `start` in interface `PackagesEventsEmitter`

#### end

    public void end()

Description copied from interface: `PackagesEventsEmitter`
Package converter ends

Specified by:
  `end` in interface `PackagesEventsEmitter`

#### startPackage

    public void startPackage​(@NotNull
                             @NotNull org.apache.jackrabbit.vault.packaging.VaultPackage originalPackage)

Description copied from interface: `PackagesEventsEmitter`
Marks the start of the given original package.

Specified by:
  `startPackage` in interface `PackagesEventsEmitter`
Parameters:
  `originalPackage` - the package to be converted.

#### endPackage

    public void endPackage​(@NotNull
                           @NotNull org.apache.jackrabbit.vault.packaging.PackageId originalPackageId,
                           @NotNull
                           @NotNull org.apache.jackrabbit.vault.packaging.VaultPackage convertedPackage)

Description copied from interface: `PackagesEventsEmitter`
Marks the end of the conversion of the package with `originalPackageId`.

Specified by:
  `endPackage` in interface `PackagesEventsEmitter`
Parameters:
  `originalPackageId` - The id of the original package as passed to `PackagesEventsEmitter.startPackage(VaultPackage)`.
  `convertedPackage` - the converted package.

#### startSubPackage

    public void startSubPackage​(@NotNull
                                @NotNull String path,
                                @NotNull
                                @NotNull org.apache.jackrabbit.vault.packaging.VaultPackage originalPackage)

Description copied from interface: `PackagesEventsEmitter`
Marks the start of the given sub package.

Specified by:
  `startSubPackage` in interface `PackagesEventsEmitter`
Parameters:
  `path` - The path of the sub package in the original parent package
  `originalPackage` - the sub package to be converted.

#### endSubPackage

    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)

Description copied from interface: `PackagesEventsEmitter`
Marks the end of the conversion of the sub package with `originalPackageId`.

Specified by:
  `endSubPackage` in interface `PackagesEventsEmitter`
Parameters:
  `path` - The path of the original sub package in the parent package
  `originalPackageId` - The id of the original sub package as passed to `PackagesEventsEmitter.startSubPackage(String, VaultPackage)`.
  `convertedPackage` - the converted package