| java.lang.Object java.util.jar.Manifest com.sun.portal.desktop.deployment.ParManifest
ParManifest | public class ParManifest extends Manifest (Code) | | Specialized manifest used in .par files (portal server specialized .jar files).
The .par file contains three types of files:
1 - class files
2 - XML display profile files, which use the psdp.dtd to express properties
for installing providers and/or channels.
3 - other files, presumed to be "rooted" via some property name on the
target server, the applicable property being part of the path in the
.par file
The manifest allows us to determine what the .par file contains, and unpack this
stuff. This class translates between the portal server concepts, and manifest headers
Most importantly, it hides the top level directory structure contained in the archive.
Manifests contain "main" attribute sections, and "entry" attribute sections, which are
associated with specific files in the archive.
For .par files, the "entries" correspond to files of type 2 above - the DP XML files.
Each file of this type should have an entry, and corresponds to a single channel and/or
provider.
Main attributes:
.par file manifests contain specialized headers providing a version, which also
serves as a sanity check that an archive is really a .par file.
There are also headers which provide the names of the top level archive directories
for each of the three files listed above. At most one of these may be null, indicating
that those files are realized at the root of the entire archive. By default, this is
done with the class files, so that the .par file may be used as a normal .jar file in
class paths, and it will work.
However, this class is intended to allow arbitrary assignment of the root directories
for the 3 file types, provided that at most one is null, and the specified ones are distinct.
Entry attributes:
The entry corresponds to a particular XML describing a "relocatable" channel and/or
provider. Three headers are defined for each entry:
An "include" header, which defines the other files of the archive which go with this
particular entry, and for which particular types of extractions (provider vs. channel)
An optional "Autoextract" operation. This header describes an automatic operation which may
be done with this entry of the archive. It uses the same format as would be used to specify
the operation as a command line argument.
Default Entry:
The first entry made to the manifest will become the "default" entry, which may be accessed
with a null entry name. If the .par file only contains one entry, this means that the user
does not need to know an explicit entry name to access it.
.par file pacakaging below the root directory
class files - normal .jar file packaging, with a directory structure reflecting the java packages
dp files - xml files directly under the root.
prop driven files - first component is the property name used to locate the file, the rest is
the file name relative to that directory.
ParManifest API usage:
This class provides the translation for ZipEntry's and manipulation of path information for these
file types. The ZipEntry is the way in which standard .jar file API's reference contents of
a jar. The caller view these files the following ways:
class files - either full class name or package name + class name.
prop drive files - a property name plus a path.
DP XML files - a simple name, usually corresponding to the name given by the "name" attribute
of the psdp:parentry tag of the XML file, though it technically doesn't have to.
When the caller is building up a manifest, they call addDPEntry(), addDPEntryInclude*() and
addDPEntryAutoExtract() to register the files and operations they are going to package in the
.par file.
When the caller is reading a .par file, they obtain the normal Manifest object, and call
static makeManifest() to obtain a ParManifest, which can handle the header information appropriately.
API calls allow the user to find the entry names contained in the manifest, and get the included
files and automated operations defined with each entry.
In all cases, the ParManifest get*Zip() methods may be used to obtain the appropriate ZipEntry
structures that allow the caller to stream in and out of the archive through the normal .jar file
I/O mechanisms.
author: yabob version: |
Method Summary | |
public void | addDPEntry(String name) | public void | addDPEntryAttrProps(String name, Set keys) | public void | addDPEntryAutoExtract(String name, ExtractOp op) | public void | addDPEntryDPDocs(String name, Set keys) | public void | addDPEntryIncludeClass(String name, String pkg, String classname, int types) | public void | addDPEntryIncludeClass(String name, String fullclassname, int types) | public void | addDPEntryIncludeConf(String name, String path, int types) | public void | addDPEntryIncludePBFile(String name, String prop, String path, int types) | public void | addDPEntryIncludeStat(String name, String path, int types) | public void | addDPEntryIncludeWar(String name, String path, int types) | public void | describe(PrintStream out, ParFile pf) | public String | describeAll(ParFile pf) | public String | describeAll(ParFile pf, Map types) | public String | getBackupVersion() | public ZipEntry | getClassZip(String pkg, String classname) | public ZipEntry | getClassZip(String fullclassname) | public ZipEntry | getConfZip(String name) | public ZipEntry | getDPDocZip(String name) | public Vector | getDPEntryAttrPropList(String name) | public ExtractOp | getDPEntryAutoExtract(String name) | public Vector | getDPEntryDPDocList(String name) | public Vector | getDPEntryIncludeList(String name, int types) | public void | getDPEntryIncludeList(String name, int types, Vector v, Vector vt) | public Vector | getDPEntryList() | public ZipEntry | getDPZip(String name) | public String | getFullFromClassPath(String path) | public ZipEntry | getPBFileZip(String prop, String path) | public String | getPathFromConfPath(String path) | public String | getPathFromPBFPath(String path) | public String | getPathFromStaticPath(String path) | public String | getPathFromWarPath(String path) | public int | getPathRootType(String path) | public ZipEntry | getPropertiesZip(String name) | public String | getPropertyFromPBFPath(String path) | public ZipEntry | getStatZip(String path) | public ZipEntry | getWarZip(String name) | public static ParManifest | makeManifest(Manifest man) | public void | transferFileEntries(ParFileBuilder pfb, ParFile oldpf) |
CLASSFILE | final public static int CLASSFILE(Code) | | |
CONFFILE | final public static int CONFFILE(Code) | | |
DEF_CONFIG_STR | final public static String DEF_CONFIG_STR(Code) | | |
DEF_PBFILES_STR | final public static String DEF_PBFILES_STR(Code) | | |
DEF_STATIC_STR | final public static String DEF_STATIC_STR(Code) | | |
DPFILE | final public static int DPFILE(Code) | | |
PBFILE | final public static int PBFILE(Code) | | |
STATFILE | final public static int STATFILE(Code) | | |
WARFILE | final public static int WARFILE(Code) | | |
ParManifest | public ParManifest()(Code) | | |
|
|