com.tivoli.twg.alertmgr
Class TWGPublishEventType

java.lang.Object
  extended bycom.tivoli.twg.alertmgr.TWGPublish
      extended bycom.tivoli.twg.alertmgr.TWGPublishEventType
All Implemented Interfaces:
java.lang.Cloneable

public class TWGPublishEventType
extends TWGPublish
implements java.lang.Cloneable


Field Summary
static int ALL_KEYWORDS
          Bit-mask helper values.
static int KEYWORD_0_ISA_LITERAL
           
static int KEYWORD_1_ISA_LITERAL
           
static int KEYWORD_2_ISA_LITERAL
           
static int KEYWORD_3_ISA_LITERAL
           
static int KEYWORD_4_ISA_LITERAL
           
static int KEYWORD_5_ISA_LITERAL
           
static int KEYWORD_6_ISA_LITERAL
           
static int KEYWORD_7_ISA_LITERAL
           
static int KEYWORD_8_ISA_LITERAL
           
static int KEYWORD_9_ISA_LITERAL
           
 
Fields inherited from class com.tivoli.twg.alertmgr.TWGPublish
VERSION_ONE
 
Constructor Summary
TWGPublishEventType(IntelByteBuffer buf)
          Constructor for interpreting a provided IntelByteBuffer.
TWGPublishEventType(IntelByteBuffer buf, int off)
          Constructor for interpreting a provided IntelByteBuffer at a given offset.
TWGPublishEventType(java.lang.String family, java.lang.String[] qualifiers, int version, java.util.Locale locale, java.lang.String[] replacementQualifiers)
          Constructor - Publish new event type.
TWGPublishEventType(java.lang.String family, java.lang.String[] qualifiers, int version, java.lang.String[] keywords, java.lang.String bundleName, int mask)
          Constructor - Publish a new event type.
TWGPublishEventType(java.lang.String family, java.lang.String[] qualifiers, java.util.Locale locale, java.lang.String[] replacementQualifiers)
          Constructor with default version.
TWGPublishEventType(java.lang.String family, java.lang.String[] qualifiers, short version, java.util.Locale locale, java.lang.String[] replacementQualifiers)
          Constructor with short version (used for migration purposes only).
TWGPublishEventType(TWGPublishEventType pet)
          Copy Constructor.
 
Method Summary
 java.lang.Object clone()
          Copy object.
 java.lang.String getBundleName()
          Get bundle name.
 java.lang.String[] getKeywords()
          Get the keywords defined by this publication.
 int getMask()
          Get keyword mask.
 int getNumReplacementQualifiers()
          Get the number of presentational qualifiers.
 java.lang.String getReplacementQualifier(int index)
          Get the presentational qualifier refernced by index.
 java.lang.String[] getReplacementQualifiers()
          Get the presentational qualifiers defined by this publication.
 int getTypeId()
          Get type ID.
static void main(java.lang.String[] argv)
           
 int readTWGPublishEventType(IntelByteBuffer buf, int off)
          Method for interpreting a provided IntelByteBuffer at a given offset.
 int sizeOf()
          Determine the size of the entire TWGPublishEventType object.
static int sizeOfHdr()
          Determine the size of the TWGPublishEventType header.
 int sizeOfTWGPublishEventType()
          Determine the size of the entire TWGPublishEventType object.
 IntelByteBuffer toIntelByteBuffer()
          Convert the TWGPublishEventType into IntelByteBuffer representation.
 int writeIntelByteBuffer(IntelByteBuffer buf)
          Write contents of this object into an IntelByteBuffer.
 int writeIntelByteBuffer(IntelByteBuffer buf, int off)
          Write contents of this object into provided IntelByteBuffer starting at a given offset.
 
Methods inherited from class com.tivoli.twg.alertmgr.TWGPublish
getLocale, getNumTypeQualifiers, getType, getTypeArray, getTypeFamily, getTypeQualifiers, getVersion, print, readTWGPublish, setLocale, setVersion, sizeOfTWGPublish
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_KEYWORDS

public static final int ALL_KEYWORDS
Bit-mask helper values. Use the bit mask to turn off keyword search in bundle (ie. a literal string).

See Also:
Constant Field Values

KEYWORD_0_ISA_LITERAL

public static final int KEYWORD_0_ISA_LITERAL
See Also:
Constant Field Values

KEYWORD_1_ISA_LITERAL

public static final int KEYWORD_1_ISA_LITERAL
See Also:
Constant Field Values

KEYWORD_2_ISA_LITERAL

public static final int KEYWORD_2_ISA_LITERAL
See Also:
Constant Field Values

KEYWORD_3_ISA_LITERAL

public static final int KEYWORD_3_ISA_LITERAL
See Also:
Constant Field Values

KEYWORD_4_ISA_LITERAL

public static final int KEYWORD_4_ISA_LITERAL
See Also:
Constant Field Values

KEYWORD_5_ISA_LITERAL

public static final int KEYWORD_5_ISA_LITERAL
See Also:
Constant Field Values

KEYWORD_6_ISA_LITERAL

public static final int KEYWORD_6_ISA_LITERAL
See Also:
Constant Field Values

KEYWORD_7_ISA_LITERAL

public static final int KEYWORD_7_ISA_LITERAL
See Also:
Constant Field Values

KEYWORD_8_ISA_LITERAL

public static final int KEYWORD_8_ISA_LITERAL
See Also:
Constant Field Values

KEYWORD_9_ISA_LITERAL

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

TWGPublishEventType

public TWGPublishEventType(java.lang.String family,
                           java.lang.String[] qualifiers,
                           int version,
                           java.util.Locale locale,
                           java.lang.String[] replacementQualifiers)
                    throws TWGPublishException
Constructor - Publish new event type. Use display strings for the given locale.

Parameters:
family - String representing the highest level qualifier of the event type
qualifiers - Array of strings comprising the remainder of the event type
version - Version of data being published
locale - Locale of data being published
replacementQualifiers - Presentational qualifiers for given locale and type

TWGPublishEventType

public TWGPublishEventType(java.lang.String family,
                           java.lang.String[] qualifiers,
                           short version,
                           java.util.Locale locale,
                           java.lang.String[] replacementQualifiers)
                    throws TWGPublishException
Constructor with short version (used for migration purposes only).

Parameters:
family - String representing the highest level qualifier of the event type
qualifiers - Array of strings comprising the remainder of the event type
version - Version of data being published
locale - Locale of data being published
replacementQualifiers - Presentational qualifiers for given locale and type

TWGPublishEventType

public TWGPublishEventType(java.lang.String family,
                           java.lang.String[] qualifiers,
                           java.util.Locale locale,
                           java.lang.String[] replacementQualifiers)
                    throws TWGPublishException
Constructor with default version.

Parameters:
family - String representing the highest level qualifier of the event type
qualifiers - Array of strings comprising the remainder of the event type
locale - Locale of data being published
replacementQualifiers - Presentational qualifiers for given locale and type

TWGPublishEventType

public TWGPublishEventType(java.lang.String family,
                           java.lang.String[] qualifiers,
                           int version,
                           java.lang.String[] keywords,
                           java.lang.String bundleName,
                           int mask)
                    throws TWGPublishException
Constructor - Publish a new event type. Use keyword/bundle for display strings.

Parameters:
family - String representing the highest level qualifier of the event type
qualifiers - Array of strings comprising the remainder of the event type
version - Version of data being published
keywords - Array of keywords/qualifiers
bundleName - Name of bundle containing keywords
mask - Bit-wise mask of keyword vs literal (0=keyword, 1=literal)

TWGPublishEventType

public TWGPublishEventType(TWGPublishEventType pet)
Copy Constructor.

Parameters:
pet - TWGPublishEventType object to be copied

TWGPublishEventType

public TWGPublishEventType(IntelByteBuffer buf)
Constructor for interpreting a provided IntelByteBuffer. Use the current offset and start ptrs within the provided IntelByteBuffer; upon return the buffer's offset ptr is advanced to reflect the number of bytes read.

Parameters:
buf - IntelByteBuffer from which data should be read

TWGPublishEventType

public TWGPublishEventType(IntelByteBuffer buf,
                           int off)
Constructor for interpreting a provided IntelByteBuffer at a given offset.

Parameters:
buf - IntelByteBuffer from which data should be read
off - offset from the current relative start of the provided IntelByteBuffer
Method Detail

clone

public java.lang.Object clone()
Copy object.

Overrides:
clone in class TWGPublish
Returns:
copy of the TWGPublishEventType object

getReplacementQualifier

public java.lang.String getReplacementQualifier(int index)
                                         throws java.lang.ArrayIndexOutOfBoundsException
Get the presentational qualifier refernced by index.

Parameters:
index - index of requested qualifier
Returns:
presentational qualifier referenced by index
Throws:
java.lang.ArrayIndexOutOfBoundsException

getNumReplacementQualifiers

public int getNumReplacementQualifiers()
Get the number of presentational qualifiers.

Returns:
number of presentational qualifiers

getKeywords

public java.lang.String[] getKeywords()
Get the keywords defined by this publication.

Returns:
array of qualifier keywords

getReplacementQualifiers

public java.lang.String[] getReplacementQualifiers()
Get the presentational qualifiers defined by this publication.

Returns:
array of presentational qualifiers

getMask

public int getMask()
Get keyword mask.

Returns:
int reprsenting the mask

getBundleName

public java.lang.String getBundleName()
Get bundle name.


toIntelByteBuffer

public IntelByteBuffer toIntelByteBuffer()
Convert the TWGPublishEventType into IntelByteBuffer representation.

Overrides:
toIntelByteBuffer in class TWGPublish
Returns:
IntelByteBuffer representing the encoded object

writeIntelByteBuffer

public int writeIntelByteBuffer(IntelByteBuffer buf)
Write contents of this object into an IntelByteBuffer. Use the current offset and start ptrs within the provided IntelByteBuffer; upon return the buffer's offset ptr is advanced to reflect the number of bytes written.

Overrides:
writeIntelByteBuffer in class TWGPublish
Parameters:
buf - IntelByteBuffer into which data should be written
Returns:
original offset plus number of bytes written

writeIntelByteBuffer

public int writeIntelByteBuffer(IntelByteBuffer buf,
                                int off)
Write contents of this object into provided IntelByteBuffer starting at a given offset. Use the current offset and start ptrs within the provided IntelByteBuffer to determine a relative start ptr and begin writing off bytes from that location. Return the buffer's offset ptr advanced to reflect the number of bytes written.

Overrides:
writeIntelByteBuffer in class TWGPublish
Parameters:
buf - IntelByteBuffer into which data should be written
off - offset from the current relative start of the provided IntelByteBuffer
Returns:
number of bytes written

readTWGPublishEventType

public int readTWGPublishEventType(IntelByteBuffer buf,
                                   int off)
Method for interpreting a provided IntelByteBuffer at a given offset.

Parameters:
buf - IntelByteBuffer from which data should be read
off - offset from the current relative start of the provided IntelByteBuffer
Returns:
number of bytes read while interpreting the buffer

sizeOfHdr

public static int sizeOfHdr()
Determine the size of the TWGPublishEventType header.

Returns:
number of bytes that comprise the header

sizeOfTWGPublishEventType

public int sizeOfTWGPublishEventType()
Determine the size of the entire TWGPublishEventType object.

Returns:
number of bytes that comprise the object

sizeOf

public int sizeOf()
Determine the size of the entire TWGPublishEventType object.

Overrides:
sizeOf in class TWGPublish
Returns:
number of bytes that comprise the object

getTypeId

public int getTypeId()
Get type ID. Used by engine to match publish and unpublish.

Overrides:
getTypeId in class TWGPublish
Returns:
an ID.

main

public static void main(java.lang.String[] argv)