Class DeploymentPlanArchive
java.lang.Object
com.sun.enterprise.deployment.deploy.shared.JarArchive
com.sun.enterprise.deployment.deploy.shared.DeploymentPlanArchive
- All Implemented Interfaces:
AutoCloseable,org.glassfish.api.deployment.archive.Archive,org.glassfish.api.deployment.archive.ReadableArchive
public class DeploymentPlanArchive
extends JarArchive
implements org.glassfish.api.deployment.archive.ReadableArchive
This Archive offers an abstraction for jsr88
deployment plan as defined for the SJES Application
Server.
- Author:
- Jerome Dochez
-
Field Summary
Fields inherited from class com.sun.enterprise.deployment.deploy.shared.JarArchive
archiveMetaData, extraData, parentArchive -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of DeploymentPlanArchive package private -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the current jar filevoidCloses the output jar file entryvoidcloseEntry(org.glassfish.api.deployment.archive.ReadableArchive sub) Closes the output sub archive entrybooleandelete()Deletes the underlying jar fileentries()entries(Enumeration embeddedArchives) booleanexists()booleanReturns the existence of the given entry name The file name must be relative to the root of the module.longGet the size of the archivelonggetEntrySize(String name) Returns the entry size for a given entry name or 0 if not knowngetJarEntry(String name) org.glassfish.api.deployment.archive.ReadableArchivegetSubArchive(String name) getURI()Returns the path used to create or open the underlying archivevoidOpen an existing DeploymentPlan archive and return a abstraction for reading from it.booleanrename the underlying archiveMethods inherited from class com.sun.enterprise.deployment.deploy.shared.JarArchive
addArchiveMetaData, entries, getArchiveMetaData, getExtraData, getName, getParentArchive, isDirectory, removeArchiveMetaData, removeExtraData, setExtraData, setParentArchiveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.glassfish.api.deployment.archive.Archive
entries, getName, isDirectoryMethods inherited from interface org.glassfish.api.deployment.archive.ReadableArchive
addArchiveMetaData, getArchiveMetaData, getExtraData, getParentArchive, removeArchiveMetaData, removeExtraData, setExtraData, setParentArchive
-
Constructor Details
-
DeploymentPlanArchive
public DeploymentPlanArchive()Creates a new instance of DeploymentPlanArchive package private
-
-
Method Details
-
open
Open an existing DeploymentPlan archive and return a abstraction for reading from it.- Specified by:
openin interfaceorg.glassfish.api.deployment.archive.ReadableArchive- Parameters:
uri- the path to the archive- Throws:
IOException
-
getArchiveSize
Get the size of the archive- Specified by:
getArchiveSizein interfaceorg.glassfish.api.deployment.archive.Archive- Returns:
- tje the size of this archive or -1 on error
- Throws:
NullPointerExceptionSecurityException
-
close
Closes the current jar file- Specified by:
closein interfaceorg.glassfish.api.deployment.archive.Archive- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
closeEntry
Closes the output jar file entry- Throws:
IOException
-
closeEntry
Closes the output sub archive entry- Throws:
IOException
-
delete
public boolean delete()Deletes the underlying jar file- Specified by:
deletein interfaceorg.glassfish.api.deployment.archive.ReadableArchive
-
getJarEntry
- Specified by:
getJarEntryin classJarArchive
-
getDirectories
- Specified by:
getDirectoriesin interfaceorg.glassfish.api.deployment.archive.Archive- Throws:
IOException
-
entries
- Specified by:
entriesin interfaceorg.glassfish.api.deployment.archive.Archive- Returns:
- an Enumeration of entries for this archive
-
entries
- Returns:
- an Enumeration of entries not including entries from the subarchives
-
exists
public boolean exists()- Specified by:
existsin interfaceorg.glassfish.api.deployment.archive.ReadableArchive- Returns:
- true if the underlying archive exists
-
getSubArchive
public org.glassfish.api.deployment.archive.ReadableArchive getSubArchive(String name) throws IOException - Specified by:
getSubArchivein interfaceorg.glassfish.api.deployment.archive.ReadableArchive- Returns:
- a sub archive giving the name
- Throws:
IOException
-
exists
Returns the existence of the given entry name The file name must be relative to the root of the module.- Specified by:
existsin interfaceorg.glassfish.api.deployment.archive.ReadableArchive- Overrides:
existsin classJarArchive- Parameters:
name- the file name relative to the root of the module.- Returns:
- the existence the given entry name.
- Throws:
IOException
-
getEntry
- Specified by:
getEntryin interfaceorg.glassfish.api.deployment.archive.ReadableArchive- Returns:
- an input stream giving its entry name
- Throws:
IOException
-
getEntrySize
Returns the entry size for a given entry name or 0 if not known- Specified by:
getEntrySizein interfaceorg.glassfish.api.deployment.archive.ReadableArchive- Parameters:
name- the entry name- Returns:
- the entry size
-
getManifest
- Specified by:
getManifestin interfaceorg.glassfish.api.deployment.archive.Archive- Returns:
- the manifest
- Throws:
IOException
-
getURI
Returns the path used to create or open the underlying archive- Specified by:
getURIin interfaceorg.glassfish.api.deployment.archive.Archive- Returns:
- the path for this archive.
-
renameTo
rename the underlying archive- Specified by:
renameToin interfaceorg.glassfish.api.deployment.archive.ReadableArchive
-