All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.mb.MBManifest
java.lang.Object
|
+----com.ibm.beans.mb.MBManifest
- public final class MBManifest
- extends Object
- implements Serializable
A class that reads and writes manifest files.
Don't even think about subclassing it.
MBManifest is for use only by persons who intend to subclass
RepositoryModel to handle a custom repository type.
If you are not writing a new RepositoryModel, please hit the
Back button on your browser now and kindly attempt to
forget that this class even exists. Thank you.
-
MBManifest()
- Constructs a new MBManifest.
-
add(int)
- Creates a new empty MBManifestSection with the specifed ID
and adds it to the manifest.
-
add(int, String, String)
- Adds the given
<key, value> pair to the MBManifestSection indicated by id.
-
add(String)
- Adds an MBManifestSection for the given nameValue.
-
add(String, byte[])
- Adds an ObjectByteArray
to the MBManifestSection that contains the <"Name", nameValue>
pair.
-
add(String, String, String)
- Adds the given
<key, value> pair to the MBManifestSection that has a "Name"
of nameValue.
-
checkSigningInformation()
- Determine whether this MBManifest contains a moniker of the
form "META-INF/XXXXX.SF", in which case this is a Signed Repository.
-
elements()
- Gets an Enumeration of the sections Vector.
-
findSectionByKey(String)
- Finds the first MBManifestSection that
contains the key.
-
findSectionByValue(String)
- Finds the first MBManifestSection that
contains nameValue as the value for
the key "Name".
-
findSectionsByKey(String)
- Gets a Vector of all MBManifestSections that
contain key.
-
getBeanElement(String)
- Gets MBManifestSection
that has moniker that matches beanName according
to the JavaBean coding and naming specs.
-
getBeanElements(String)
- Gets a Vector of all MBManifestSections
that have monikers that match beanName according
to the JavaBean coding and naming specs.
-
getCommonMBElements()
- Gets a Vector of all MBManifestSections
that contain Name keys but do not contain MBInstN keys.
-
getDependsOnElements(String)
- Gets a Vector of all MBManifestSections
that have monikers listed in the Depends-On tag in the section
specified by beanMoniker.
-
getJavaBeans()
- Gets a Vector of Strings of the nameValues from the
<"Name", nameValue> pairs of all
MBManifestSections that are contain the <"Java-Bean", "True">
pair.
-
getNextID()
- Gets the next ID number.
-
getNextMBInst()
- Gets the next MBInstN key.
-
getObjectByteArray(String)
- Gets the ObjectByteArray reference
from the MBManifestSection that contains the <"Name", nameValue>
pair.
-
initializeManifest()
- Initializes the manifest.
-
isDependsOnManifest()
- Determine whether this MBManifest contains any Depends-On:
tags.
-
isIBMBeanExtenderManifest()
- Determine whether this MBManifest has
IBM Bean Extender manifest extensions.
-
outputManifest(OutputStream)
- Writes the manifest to the given OutputStream.
-
parseManifest(InputStream)
-
-
query(int, String)
- Gets the value from the <key, value> pair in the MBManifestSection
identified by id.
-
updateDigests()
- Adds new SHA-1 and MD5 MessageDigest information to
the manifest for this MBElement.
MBManifest
protected MBManifest()
- Constructs a new MBManifest.
parseManifest
protected boolean parseManifest(InputStream is) throws IOException
outputManifest
protected boolean outputManifest(OutputStream os)
- Writes the manifest to the given OutputStream.
The caller must close the OutputStream.
- Parameters:
- os - The OutputStream that receives the manifest.
- Returns:
- true if successful, false otherwise.
add
protected void add(int id)
- Creates a new empty MBManifestSection with the specifed ID
and adds it to the manifest.
- Parameters:
- id - The ID of the new Section.
- See Also:
- MBManifestSection
add
protected MBManifestSection add(int id,
String key,
String value)
- Adds the given
<key, value> pair to the MBManifestSection indicated by id. If a
section with that ID doesn't exist, this method creates
a new MBManifestSection and adds the specified pair.
- Parameters:
- ID - The id of the MBManifestSection.
- key - The key to be added.
- value - The value to be added.
- Returns:
- The MBManifestSection that has been created and/or modified.
- See Also:
- MBManifestSection
add
protected MBManifestSection add(String nameValue,
String key,
String value)
- Adds the given
<key, value> pair to the MBManifestSection that has a "Name"
of nameValue.
If the nameValue is not found, an MBManifestSection will be
created with a <"Name", nameValue> pair, and the <key, value>
pair will be added to that MBManifestSection.
- Parameters:
- nameValue - The value of the "Name" key in the desired
MBManifestSection.
- key - The key to be added.
- value - The value to be added.
- Returns:
- The MBManifestSection that has been created and/or modified.
add
protected MBManifestSection add(String nameValue)
- Adds an MBManifestSection for the given nameValue. The section
will be created with a <"Name", nameValue> pair. If a section
with this <"Name", nameValue> pair already exists, do nothing.
- Parameters:
- nameValue - The value to be used with the "Name" key in the
created MBManifestSection.
- Returns:
- The MBManifestSection that has been added.
add
protected void add(String nameValue,
byte b[])
- Adds an ObjectByteArray
to the MBManifestSection that contains the <"Name", nameValue>
pair. If a section
with the <"Name", nameValue> pair does not exist, do nothing.
- Parameters:
- nameValue - The value of the "Name" key in the target
MBManifestSection.
- b - The ObjectByteArray to be set.
getObjectByteArray
protected byte[] getObjectByteArray(String nameValue)
- Gets the ObjectByteArray reference
from the MBManifestSection that contains the <"Name", nameValue>
pair. If a section
with the <"Name", nameValue> pair does not exist, do nothing.
- Parameters:
- nameValue - The value of the "Name" key in the target
MBManifestSection.
- Returns:
- The ObjectByteArray.
getJavaBeans
protected Vector getJavaBeans()
- Gets a Vector of Strings of the nameValues from the
<"Name", nameValue> pairs of all
MBManifestSections that are contain the <"Java-Bean", "True">
pair.
- Returns:
- Vector of Strings containing the names of the Java Beans.
query
protected String query(int id,
String key)
- Gets the value from the <key, value> pair in the MBManifestSection
identified by id.
- Parameters:
- id - The ID of the MBManifestSection.
- key - The key whose value is being obtained.
- Returns:
- The desired value or null if the value could not be
found.
elements
protected Enumeration elements()
- Gets an Enumeration of the sections Vector.
The Enumeration can be used to step through the MBManifestSections
of this MBManifest.
- Returns:
- An Enumeration of the MBManifest sections Vector.
findSectionByValue
protected MBManifestSection findSectionByValue(String nameValue)
- Finds the first MBManifestSection that
contains nameValue as the value for
the key "Name".
- Parameters:
- nameValue - The value to be matched.
- Returns:
- The first MBManifestSection that contains the nameValue
argument.
findSectionByKey
protected MBManifestSection findSectionByKey(String key)
- Finds the first MBManifestSection that
contains the key.
- Parameters:
- key - The key to be matched.
- Returns:
- The first MBManifestSection that contains key.
findSectionsByKey
protected Vector findSectionsByKey(String key)
- Gets a Vector of all MBManifestSections that
contain key.
- Parameters:
- key - The key to be matched.
- Returns:
- A Vector of all MBManifestSections that contain key.
getBeanElements
protected Vector getBeanElements(String beanName)
- Gets a Vector of all MBManifestSections
that have monikers that match beanName according
to the JavaBean coding and naming specs.
- Parameters:
- beanName - The bean name to be matched.
- Returns:
- A Vector of all matching MBManifestSections.
- See Also:
- MBManifestSection
getBeanElement
protected MBManifestSection getBeanElement(String beanName)
- Gets MBManifestSection
that has moniker that matches beanName according
to the JavaBean coding and naming specs.
- Parameters:
- beanName - The bean name to be matched.
- Returns:
- A matching MBManifestSection.
- See Also:
- MBManifestSection
getDependsOnElements
protected Vector getDependsOnElements(String beanMoniker)
- Gets a Vector of all MBManifestSections
that have monikers listed in the Depends-On tag in the section
specified by beanMoniker. Also includes the section that has
the Depends-On tag.
- Parameters:
- beanMoniker - The bean moniker whose Depends-On tag we're using.
- Returns:
- A Vector of all matching MBManifestSections.
- See Also:
- MBManifestSection
getCommonMBElements
protected Vector getCommonMBElements()
- Gets a Vector of all MBManifestSections
that contain Name keys but do not contain MBInstN keys.
- Returns:
- A Vector of all matching MBManifestSections.
- See Also:
- MBManifestSection
isIBMBeanExtenderManifest
protected boolean isIBMBeanExtenderManifest()
- Determine whether this MBManifest has
IBM Bean Extender manifest extensions.
- Returns:
- true if this MBManifest has IBM Bean Extender manifest
extensions; false otherwise.
isDependsOnManifest
protected boolean isDependsOnManifest()
- Determine whether this MBManifest contains any Depends-On:
tags.
- Returns:
- true if this MBManifest contains any Depends-On:
tags; false otherwise.
checkSigningInformation
protected boolean checkSigningInformation()
- Determine whether this MBManifest contains a moniker of the
form "META-INF/XXXXX.SF", in which case this is a Signed Repository.
This method also cleans up any META-INF files that might have
slipped into the Manifest (ie, when opening a DirectoryModelRepository).
- Returns:
- true if this Repository is Signed, false otherwise.
getNextID
protected int getNextID()
- Gets the next ID number.
- Returns:
- The next ID number.
getNextMBInst
protected String getNextMBInst()
- Gets the next MBInstN key.
- Returns:
- The next MBInstN key.
initializeManifest
protected void initializeManifest()
- Initializes the manifest. This method assumes that
the manifest is indeed empty.
updateDigests
protected synchronized void updateDigests()
- Adds new SHA-1 and MD5 MessageDigest information to
the manifest for this MBElement. This method is called immediately
before writing a manifest.
- See Also:
- MessageDigest
All Packages Class Hierarchy This Package Previous Next Index