Class DefaultPackagerFactory

    • Constructor Detail

      • DefaultPackagerFactory

        public DefaultPackagerFactory()
        Register default deployers.
    • Method Detail

      • registerPackager

        public void registerPackager​(String containerId,
                                     PackagerType packagerType,
                                     Class<? extends Packager> packagerClass)
        Registers a Packager implementation.
        Specified by:
        registerPackager in interface PackagerFactory
        Parameters:
        containerId - the container attached to this packager
        packagerType - the packager's type (directory, zip, etc)
        packagerClass - the packager implementation class to register
      • registerPackager

        public void registerPackager​(String containerId,
                                     PackagerType packagerType,
                                     String packagerClassName)
        Registers a packager using a class specified as a String.
        Parameters:
        containerId - Container id.
        packagerType - Packager type.
        packagerClassName - Packager implementation class to register as a String
      • isPackagerRegistered

        public boolean isPackagerRegistered​(String containerId,
                                            PackagerType packagerType)
        Specified by:
        isPackagerRegistered in interface PackagerFactory
        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

        public Packager createPackager​(String containerId,
                                       PackagerType packagerType,
                                       String outputLocation)
        Create a Packager instance matching the specified container id.
        Specified by:
        createPackager in interface PackagerFactory
        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