raccoon.tibco.tibrv.badhnati.descriptors
Class Message

java.lang.Object
  extended by raccoon.tibco.tibrv.badhnati.descriptors.Message

public class Message
extends java.lang.Object

Contains the various descriptors required to generate the descriptors of an ActiveEnterprise v3.0 compliant message

Since:
Raccoon v0.5
Version:
$Id: Message.java,v 1.3 2003/07/01 19:19:56 crouvrais Exp $
Author:
Cedric ROUVRAIS

Constructor Summary
Message()
          Default constructor, does nothing.
Message(IRepoGenerator pRepoGenerator)
          Convenience constructor for assigning the TIB/Repository generator
 
Method Summary
 java.lang.Integer addPackage(java.lang.String pClassPackage)
          Adds a given java package to the list of the currently referenced packages, if necessary.
 int addReference(java.lang.String pClassName)
          Add a class reference that isn't a collection.
 int addReference(java.lang.String pClassName, java.lang.String pCollectionType)
          Add a class reference that is a collection.
static java.lang.String extractClassName(java.lang.String pClassName)
          Extracts the name of a given fully qualified java class name.
static java.lang.String extractPackage(java.lang.String pClassName)
          Extracts the name of a given fully qualified package.
 java.lang.String get(int pPosition)
          Extract the nth element from the contained references.
 java.lang.String get(java.lang.Integer pPosition)
          Extract the nth element from the contained references.
 ClassElement get(java.lang.String pClassName)
          Searches for a element given it's name.
 ClassElement get(java.lang.String pClassName, java.lang.String pCollectionType)
          Searches for a element given it's name.
 int getNbPackages()
          The number of different TIB/Repository directories identified.
 java.util.HashMap getReferencedClasses()
          All the classes contained within this message
 IRepoGenerator getRepoGenerator()
          Retrieves the utility component in relation with the TIB/Repository.
 void setReferencedClasses(java.util.HashMap pReferencedClasses)
          Assign directly the class contained by this message
 void setRepoGenerator(IRepoGenerator pRepoGenerator)
          Defines the utility component in relation with the TIB/Repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message()
Default constructor, does nothing.


Message

public Message(IRepoGenerator pRepoGenerator)
Convenience constructor for assigning the TIB/Repository generator

Parameters:
pRepoGenerator - the repository generator instance.
Method Detail

getRepoGenerator

public IRepoGenerator getRepoGenerator()
Retrieves the utility component in relation with the TIB/Repository.

Returns:
the repository generator instance.

setRepoGenerator

public void setRepoGenerator(IRepoGenerator pRepoGenerator)
Defines the utility component in relation with the TIB/Repository.

Parameters:
pRepoGenerator - the repository generator instance.

getReferencedClasses

public java.util.HashMap getReferencedClasses()
All the classes contained within this message

Returns:
the list of class currently contained by this message

setReferencedClasses

public void setReferencedClasses(java.util.HashMap pReferencedClasses)
                          throws RaccoonException
Assign directly the class contained by this message

Parameters:
pReferencedClasses - the hash map of ClassElement
Throws:
RaccoonException - if the reference classes contained by this instance isn't an empty list

addReference

public int addReference(java.lang.String pClassName)
                 throws RaccoonException
Add a class reference that isn't a collection.

Parameters:
pClassName - the fully qualified name of the class obtained via getClass().getName()
Returns:
the index of the element that was added.
Throws:
RaccoonException - if the RepoGenerator throws an error or if the reference couldn't be added

addPackage

public java.lang.Integer addPackage(java.lang.String pClassPackage)
Adds a given java package to the list of the currently referenced packages, if necessary.

Parameters:
pClassPackage - the java package to add to the list.
Returns:
the key as an Integer of the java package.

addReference

public int addReference(java.lang.String pClassName,
                        java.lang.String pCollectionType)
                 throws RaccoonException
Add a class reference that is a collection.

Parameters:
pClassName - the fully qualified name of the class obtained via getClass().getName()
pCollectionType - the fully qualified name of the elements contained by the class pClassName obtained via getClass().getName() on an element.
Returns:
the index of the element that was added.
Throws:
RaccoonException - if the RepoGenerator throws an error or if the reference couldn't be added

get

public java.lang.String get(int pPosition)
Extract the nth element from the contained references.

Parameters:
pPosition - the element to retrieve, where 0 is the first element.
Returns:
the corresponding element, null if not present

get

public java.lang.String get(java.lang.Integer pPosition)
Extract the nth element from the contained references.

Parameters:
pPosition - the element to retrieve, where 0 is the first element.
Returns:
the corresponding element, null if not present

getNbPackages

public int getNbPackages()
The number of different TIB/Repository directories identified.

Returns:
number of dirs.

get

public ClassElement get(java.lang.String pClassName)
Searches for a element given it's name. The element has to be a java class that isn't a collection

Parameters:
pClassName - the element to retrieve, a none collection element
Returns:
the corresponding element, null if not present

get

public ClassElement get(java.lang.String pClassName,
                        java.lang.String pCollectionType)
Searches for a element given it's name. The element has to be a java class that is a collection

Parameters:
pClassName - the element to retrieve, a none collection element
pCollectionType - the type of element this collections contains.
Returns:
the corresponding element, null if not present

extractClassName

public static java.lang.String extractClassName(java.lang.String pClassName)
Extracts the name of a given fully qualified java class name.

Parameters:
pClassName - the fully qualified java class name
Returns:
the name of the class, without the package definition

extractPackage

public static java.lang.String extractPackage(java.lang.String pClassName)
Extracts the name of a given fully qualified package.

Parameters:
pClassName - the fully qualified java class name
Returns:
the package where the given class can be found


Copyright null null. All Rights Reserved.