org.codehaus.cargo.generic.packager
Interface PackagerFactory

All Known Implementing Classes:
DefaultPackagerFactory

public interface PackagerFactory

Create a Packager instance for a given container.

Version:
$Id: $

Method Summary
 Packager createPackager(java.lang.String containerId, PackagerType packagerType, java.lang.String outputLocation)
          Create a Packager instance matching the specified container id.
 boolean isPackagerRegistered(java.lang.String containerId, PackagerType packagerType)
           
 void registerPackager(java.lang.String containerId, PackagerType packagerType, java.lang.Class packagerClass)
          Registers a Packager implementation.
 

Method Detail

registerPackager

void registerPackager(java.lang.String containerId,
                      PackagerType packagerType,
                      java.lang.Class packagerClass)
Registers a Packager implementation.

Parameters:
containerId - the container attached to this packager
packagerType - the packager's type (directory, zip, etc)
packagerClass - the packager implementation class to register

isPackagerRegistered

boolean isPackagerRegistered(java.lang.String containerId,
                             PackagerType packagerType)
Parameters:
containerId - the container attached to this packager class
packagerType - the type to differentiate this packager from others for the specified container
Returns:
true if the specified packager is already registered or false otherwise

createPackager

Packager createPackager(java.lang.String containerId,
                        PackagerType packagerType,
                        java.lang.String outputLocation)
Create a Packager instance matching the specified container id.

Parameters:
containerId - the container for which we need to create a packager instance
packagerType - the packager's type (directory, zip, etc)
outputLocation - the location where the package will be generated. For example for a Directory Packager this will be the directory into which the package will be generated.
Returns:
the packager instance


Copyright © 2004-2011 Codehaus. All Rights Reserved.