Class DeploymentPlanArchive

  • All Implemented Interfaces:
    Archive, ReadableArchive

    public class DeploymentPlanArchive
    extends JarArchive
    implements ReadableArchive
    This Archive offers an abstraction for jsr88 deployment plan as defined for the SJES Application Server.
    Author:
    Jerome Dochez
    • Constructor Detail

      • DeploymentPlanArchive

        public DeploymentPlanArchive()
        Creates a new instance of DeploymentPlanArchive package private
    • Method Detail

      • open

        public void open​(URI uri)
                  throws IOException
        Open an existing DeploymentPlan archive and return a abstraction for reading from it.
        Specified by:
        open in interface ReadableArchive
        Parameters:
        uri - the path to the archive
        Throws:
        IOException
      • closeEntry

        public void closeEntry()
                        throws IOException
        Closes the output jar file entry
        Throws:
        IOException
      • delete

        public boolean delete()
        Deletes the underlying jar file
        Specified by:
        delete in interface ReadableArchive
      • getDirectories

        public Collection<String> getDirectories()
                                          throws IOException
        Description copied from interface: Archive
        Returns the enumeration of first level directories in this archive
        Specified by:
        getDirectories in interface Archive
        Returns:
        enumeration of directories under the root of this archive
        Throws:
        IOException
      • entries

        public Enumeration entries()
        Description copied from interface: Archive
        Returns an enumeration of the module file entries. All elements in the enumeration are of type String. Each String represents a file name relative to the root of the module.
        Specified by:
        entries in interface Archive
        Returns:
        an Enumeration of entries for this archive
      • entries

        public Enumeration entries​(Enumeration embeddedArchives)
        Returns:
        an Enumeration of entries not including entries from the subarchives
      • exists

        public boolean exists()
        Specified by:
        exists in interface ReadableArchive
        Returns:
        true if the underlying archive exists
      • exists

        public boolean exists​(String name)
                       throws IOException
        Returns the existence of the given entry name The file name must be relative to the root of the module.
        Specified by:
        exists in interface ReadableArchive
        Overrides:
        exists in class JarArchive
        Parameters:
        name - the file name relative to the root of the module. * @return the existence the given entry name.
        Returns:
        the existence the given entry name.
        Throws:
        IOException
      • getEntry

        public InputStream getEntry​(String name)
                             throws IOException
        Description copied from interface: ReadableArchive
        Returns the InputStream for the given entry name The file name must be relative to the root of the module.
        Specified by:
        getEntry in interface ReadableArchive
        Parameters:
        name - the file name relative to the root of the module.
        Returns:
        an input stream giving its entry name
        Throws:
        IOException
      • getEntrySize

        public long getEntrySize​(String name)
        Returns the entry size for a given entry name or 0 if not known
        Specified by:
        getEntrySize in interface ReadableArchive
        Parameters:
        name - the entry name
        Returns:
        the entry size
      • getURI

        public URI getURI()
        Returns the path used to create or open the underlying archive
        Specified by:
        getURI in interface Archive
        Returns:
        the path for this archive.
      • renameTo

        public boolean renameTo​(String name)
        rename the underlying archive
        Specified by:
        renameTo in interface ReadableArchive
        Parameters:
        name - the archive name