bundles/org.eclipse.packagedrone.repo.channel.impl/src/org/eclipse/packagedrone/repo/channel/impl/transfer/TransferServiceImpl.java
private void exportChannel ( final By by, final OutputStream stream ) throws IOException
    {
        final ZipOutputStream zos = new ZipOutputStream ( stream );

        initExportFile ( zos );

        this.channelService.accessRun ( by, ReadableChannel.class, channel -> {

            putDataEntry ( zos, "names", makeNames ( channel.getId () ) );
            putDataEntry ( zos, "description", channel.getId ().getDescription () );
            putDirEntry ( zos, "artifacts" );
            putProperties ( zos, "properties.xml", channel.getContext ().getProvidedMetaData () );
            putAspects ( zos, channel.getContext ().getAspectStates ().keySet () );

            // the first run receives all artifacts and filters for the root elements

            putArtifacts ( zos, "artifacts/", channel, channel.getArtifacts (), true );
        } );

        this.channelService.accessRun ( by, TriggeredChannel.class, channel -> {
            putTriggers ( zos, channel );
        } );

        zos.finish (); // don't close stream, since there might be other channels following
    }
private void exportChannel ( final By by, final OutputStream stream ) throws IOException
    {
        final ZipOutputStream zos = new ZipOutputStream ( stream );

        initExportFile ( zos );

        this.channelService.accessRun ( by, ReadableChannel.class, channel -> {

            putDataEntry ( zos, "names", makeNames ( channel.getId () ) );
            putDataEntry ( zos, "description", channel.getId ().getDescription () );
            putDirEntry ( zos, "artifacts" );
            putProperties ( zos, "properties.xml", channel.getContext ().getProvidedMetaData () );
            putAspects ( zos, channel.getContext ().getAspectStates ().keySet () );

            // the first run receives all artifacts and filters for the root elements

            putArtifacts ( zos, "artifacts/", channel, channel.getArtifacts (), true );
        } );

        this.channelService.accessRun ( by, TriggeredChannel.class, channel -> {
            putTriggers ( zos, channel );
        } );

        zos.finish (); // don't close stream, since there might be other channels following
    }
Export the content of a channel

@param by
the channel to export
@param stream
the stream to write the export file to
@throws IOException
if the export cannot be performed