com.ibm.cics.bundle
Class ManifestImpl

java.lang.Object
  extended by com.ibm.cics.bundle.Manifest
      extended by com.ibm.cics.bundle.ManifestImpl

public class ManifestImpl
extends Manifest

Usage:
This class is used to create and update the bundle manifest file.

Class level design/service information:
This class provides the functionality for the user to create, update, marshall and unmarshall (between JAVA instance and XML) a manifest instance.

Version:
%E%
Author:
Pradeep Gohil
See Also:
ManifestImpl

Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.cics.bundle.Manifest
Manifest.Define, Manifest.Export, Manifest.Import, Manifest.MetaDirectives
 
Field Summary
static int ATOMSERVICE_TYPE
           
static int DB2ENTRY_TYPE
           
static int DB2TRAN_TYPE
           
static int DOCTEMPLATE_TYPE
           
static int ENQMODEL_TYPE
           
static int EVENTBINDING_TYPE
           
static int FILE_TYPE
           
static int JOURNALMODEL_TYPE
           
static int MAPSET_TYPE
           
static int PARTITIONSET_TYPE
           
static int PIPELINE_TYPE
           
static int PROCESSTYPE_TYPE
           
static int PROGRAM_TYPE
           
static int SCACOMPOSITE_TYPE
           
static int TRANSACTION_TYPE
           
static int TSQMODEL_TYPE
           
static int URIMAP_TYPE
           
static int WEBSERVICE_TYPE
           
static int XMLTRANSFORM_TYPE
           
 
Constructor Summary
ManifestImpl()
           
ManifestImpl(java.io.InputStream manifestInStream)
           
 
Method Summary
 void addDefine(Manifest.Define defElement)
           
 void addDefine(java.lang.String name, int type, java.lang.String path)
           
 void addDefine(java.lang.String name, int type, java.lang.String path, boolean optional, boolean warn)
           
 void addDefine(java.lang.String name, java.lang.String type, java.lang.String path)
          Usage:
To add a DEFINE element to the manifest.
Any existing Manifest DEFINE element with the same name and type is overwritten.
 void addDefine(java.lang.String name, java.lang.String type, java.lang.String path, boolean optional, boolean warn)
          Usage:
To add a DEFINE element to the manifest.
Any existing Manifest DEFINE element with the same name and type is overwritten.
 void addExport(Manifest.Export expElement)
           
 void addExport(java.lang.String name, int type)
           
 void addExport(java.lang.String name, java.lang.String type)
          Usage:
To add an EXPORT element to the manifest.
Any existing EXPORT with the same name and type is overwritten.
 void addImport(Manifest.Import impElement)
           
 void addImport(java.lang.String name, int type)
           
 void addImport(java.lang.String name, int type, boolean optional, boolean warn)
           
 void addImport(java.lang.String name, java.lang.String type)
          Usage:
To add an IMPORT element to the manifest.
Any existing IMPORT with the same name and type is overwritten.
 void addImport(java.lang.String name, java.lang.String type, boolean optional, boolean warn)
          Usage:
To add an IMPORT element to the manifest.
Any existing IMPORT with the same name and type is overwritten.
 void addMetaDirectiveSimple(java.lang.String elementName, java.lang.String content)
          Usage:
To add a simple element (name and text content) to the meta-directive in the any section of the manifest.
 ManifestImpl createManifest()
          Function to return a new Manifest instance.
 void deleteDefine(java.lang.String name, int type)
           
 void deleteDefine(java.lang.String name, java.lang.String type)
          Usage:
To delete a DEFINE element from the Manifest instance.
Existing DEFINE element with the supplied name and type is deleted from the Manifest.
 void deleteExport(java.lang.String name, int type)
           
 void deleteExport(java.lang.String name, java.lang.String type)
          Usage:
To delete an EXPORT element from the manifest.
Existing EXPORT with the supplied name and type is deleted.
 void deleteImport(java.lang.String name, int type)
           
 void deleteImport(java.lang.String name, java.lang.String type)
          Usage:
To delete an IMPORT element from the manifest.
Existing IMPORT with the supplied name and type is deleted.
 void deleteMetaDirective(java.lang.String elementName)
          Usage:
To remove the first occurrence of an element with the given name in the meta-directive section of the manifest.
 ManifestImpl getManifest()
           
 java.lang.String getMetaDirectiveSimpleContent(java.lang.String elementName)
          Usage:
To get the text content of a simple element (name and text content) in the meta-directive section of the manifest.
 java.lang.String getType(int type)
          function to return the URI style "type"
 void readInManifest(java.io.InputStream manifestInStream)
           
 void setManifest(ManifestImpl man)
           
 void writeManifest(java.io.OutputStream manifestOutStream)
          Usage:
This function should be called after all entries (DEFINEs, IMPORTs and EXPORTs) have been added to the Manifest.
Only returns the Manifest file
 
Methods inherited from class com.ibm.cics.bundle.Manifest
getBuild, getBundleRelease, getBundleVersion, getDefine, getExport, getImport, getMetaDirectives, setBuild, setBundleRelease, setBundleVersion, setMetaDirectives
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATOMSERVICE_TYPE

public static final int ATOMSERVICE_TYPE
See Also:
Constant Field Values

DB2ENTRY_TYPE

public static final int DB2ENTRY_TYPE
See Also:
Constant Field Values

DB2TRAN_TYPE

public static final int DB2TRAN_TYPE
See Also:
Constant Field Values

DOCTEMPLATE_TYPE

public static final int DOCTEMPLATE_TYPE
See Also:
Constant Field Values

ENQMODEL_TYPE

public static final int ENQMODEL_TYPE
See Also:
Constant Field Values

EVENTBINDING_TYPE

public static final int EVENTBINDING_TYPE
See Also:
Constant Field Values

FILE_TYPE

public static final int FILE_TYPE
See Also:
Constant Field Values

JOURNALMODEL_TYPE

public static final int JOURNALMODEL_TYPE
See Also:
Constant Field Values

MAPSET_TYPE

public static final int MAPSET_TYPE
See Also:
Constant Field Values

PARTITIONSET_TYPE

public static final int PARTITIONSET_TYPE
See Also:
Constant Field Values

PIPELINE_TYPE

public static final int PIPELINE_TYPE
See Also:
Constant Field Values

PROCESSTYPE_TYPE

public static final int PROCESSTYPE_TYPE
See Also:
Constant Field Values

PROGRAM_TYPE

public static final int PROGRAM_TYPE
See Also:
Constant Field Values

SCACOMPOSITE_TYPE

public static final int SCACOMPOSITE_TYPE
See Also:
Constant Field Values

TRANSACTION_TYPE

public static final int TRANSACTION_TYPE
See Also:
Constant Field Values

TSQMODEL_TYPE

public static final int TSQMODEL_TYPE
See Also:
Constant Field Values

URIMAP_TYPE

public static final int URIMAP_TYPE
See Also:
Constant Field Values

WEBSERVICE_TYPE

public static final int WEBSERVICE_TYPE
See Also:
Constant Field Values

XMLTRANSFORM_TYPE

public static final int XMLTRANSFORM_TYPE
See Also:
Constant Field Values
Constructor Detail

ManifestImpl

public ManifestImpl()

ManifestImpl

public ManifestImpl(java.io.InputStream manifestInStream)
             throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException
Method Detail

readInManifest

public void readInManifest(java.io.InputStream manifestInStream)
                    throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

setManifest

public void setManifest(ManifestImpl man)

getManifest

public ManifestImpl getManifest()

createManifest

public ManifestImpl createManifest()
Function to return a new Manifest instance.

Returns:
Manifest instance.

getType

public java.lang.String getType(int type)
function to return the URI style "type"

Parameters:
type - ATOMSERVICE_TYPE, DB2ENTRY_TYPE, DB2TRAN_TYPE, DOCTEMPLATE_TYPE, ENQMODEL_TYPE, EVENTBINDING_TYPE, FILE_TYPE, JOURNALMODEL_TYPE, MAPSET_TYPE, PARTITIONSET_TYPE, PIPELINE_TYPE, PROCESSTYPE_TYPE, PROGRAM_TYPE, SCACOMPOSITE_TYPE, TRANSACTION_TYPE, TSQMODEL_TYPE, URIMAP_TYPE, WEBSERVICE_TYPE, XMLTRANSFORM_TYPE
Returns:
URI style string of the type as defined in CICS

addMetaDirectiveSimple

public void addMetaDirectiveSimple(java.lang.String elementName,
                                   java.lang.String content)
Usage:
To add a simple element (name and text content) to the meta-directive in the any section of the manifest.

Parameters:
elementName - the name of the element.
content - the content of the element.

deleteMetaDirective

public void deleteMetaDirective(java.lang.String elementName)
Usage:
To remove the first occurrence of an element with the given name in the meta-directive section of the manifest.

Parameters:
elementName - the name of the element.

getMetaDirectiveSimpleContent

public java.lang.String getMetaDirectiveSimpleContent(java.lang.String elementName)
Usage:
To get the text content of a simple element (name and text content) in the meta-directive section of the manifest.

Parameters:
elementName - the name of the element.
Returns:
content the content of the element.

addExport

public void addExport(java.lang.String name,
                      java.lang.String type)
Usage:
To add an EXPORT element to the manifest.
Any existing EXPORT with the same name and type is overwritten.

Parameters:
name - the name of the element.
type - the type of the element.

addExport

public void addExport(java.lang.String name,
                      int type)

addExport

public void addExport(Manifest.Export expElement)

deleteExport

public void deleteExport(java.lang.String name,
                         java.lang.String type)
Usage:
To delete an EXPORT element from the manifest.
Existing EXPORT with the supplied name and type is deleted. If no element exists then there is no change.

Parameters:
name - the name of the element.
type - the type of the element.

deleteExport

public void deleteExport(java.lang.String name,
                         int type)

addImport

public void addImport(java.lang.String name,
                      java.lang.String type,
                      boolean optional,
                      boolean warn)
Usage:
To add an IMPORT element to the manifest.
Any existing IMPORT with the same name and type is overwritten.

Parameters:
name - the name of the element.
type - the type of the element.
optional - indicator set true for optional element.
warn - indicator for when optional is true. Value is ignored when optional is false.

addImport

public void addImport(java.lang.String name,
                      int type,
                      boolean optional,
                      boolean warn)

addImport

public void addImport(java.lang.String name,
                      java.lang.String type)
Usage:
To add an IMPORT element to the manifest.
Any existing IMPORT with the same name and type is overwritten.

Parameters:
name - the name of the element.
type - the type of the element.

addImport

public void addImport(java.lang.String name,
                      int type)

addImport

public void addImport(Manifest.Import impElement)

deleteImport

public void deleteImport(java.lang.String name,
                         java.lang.String type)
Usage:
To delete an IMPORT element from the manifest.
Existing IMPORT with the supplied name and type is deleted. If no element exists then there is no change.

Parameters:
name - the name of the element.
type - the type of the element.

deleteImport

public void deleteImport(java.lang.String name,
                         int type)

addDefine

public void addDefine(java.lang.String name,
                      java.lang.String type,
                      java.lang.String path,
                      boolean optional,
                      boolean warn)
Usage:
To add a DEFINE element to the manifest.
Any existing Manifest DEFINE element with the same name and type is overwritten.

Parameters:
name - the name of the element.
type - the type of the element.
path - the relative path of the stream to be added to the Bundle archive (Including filename).
optional - indicator set true for optional element.
warn - indicator for when optional is true. Value is ignored when optional is false.

addDefine

public void addDefine(java.lang.String name,
                      int type,
                      java.lang.String path,
                      boolean optional,
                      boolean warn)

addDefine

public void addDefine(java.lang.String name,
                      java.lang.String type,
                      java.lang.String path)
Usage:
To add a DEFINE element to the manifest.
Any existing Manifest DEFINE element with the same name and type is overwritten.

Parameters:
name - the name of the element.
type - the type of the element.
path - the relative path of the stream to be added to the Bundle archive (Including filename).

addDefine

public void addDefine(java.lang.String name,
                      int type,
                      java.lang.String path)

addDefine

public void addDefine(Manifest.Define defElement)

deleteDefine

public void deleteDefine(java.lang.String name,
                         java.lang.String type)
Usage:
To delete a DEFINE element from the Manifest instance.
Existing DEFINE element with the supplied name and type is deleted from the Manifest. If no element exists then there is no change.

Parameters:
name - the name of the element.
type - the type of the element.

deleteDefine

public void deleteDefine(java.lang.String name,
                         int type)

writeManifest

public void writeManifest(java.io.OutputStream manifestOutStream)
                   throws javax.xml.bind.JAXBException,
                          java.io.IOException
Usage:
This function should be called after all entries (DEFINEs, IMPORTs and EXPORTs) have been added to the Manifest.
Only returns the Manifest file

Throws:
javax.xml.bind.JAXBException
java.io.IOException