com.tivoli.twg.alertmgr
Class TWGEvent

java.lang.Object
  extended bycom.tivoli.twg.alertmgr.TWGPartialEvent
      extended bycom.tivoli.twg.alertmgr.TWGBaseEvent
          extended bycom.tivoli.twg.alertmgr.TWGEvent
All Implemented Interfaces:
java.io.Serializable

public class TWGEvent
extends TWGBaseEvent
implements java.io.Serializable

TWGEvent extends the information contained in TWGBaseEvent class to include the locale specific data needed for display on the Director console.

See Also:
Serialized Form

Field Summary
static int STATE_COUNT
           
 
Fields inherited from class com.tivoli.twg.alertmgr.TWGPartialEvent
ACTION, BOSSMAN, CATEGORY_COUNT, EVENT_CATEGORY_ALERT, EVENT_CATEGORY_RESOLUTION, EVENT_FLAGS_ALERT, EVENT_FLAGS_CHILD, EVENT_FLAGS_FAILOVER_COPY, EVENT_FLAGS_FORWARDED, EVENT_FLAGS_OUT_OF_BAND, EVENT_FLAGS_QUEUED, EVENT_FLAGS_RESENT, EVENT_FLAGS_RESOLUTION, EVENT_SEVERITY_CRITICAL, EVENT_SEVERITY_FATAL, EVENT_SEVERITY_HARMLESS, EVENT_SEVERITY_MINOR, EVENT_SEVERITY_UNKNOWN, EVENT_SEVERITY_WARNING, EVENT_TYPE_DELIMITER, SEVERITY_COUNT, SNMP, TEC, TEST
 
Constructor Summary
TWGEvent(IntelByteBuffer buf)
          Constructor for interpreting a provided IntelByteBuffer.
TWGEvent(IntelByteBuffer buf, int off)
          Constructor for interpreting a provided IntelByteBuffer.
TWGEvent(TWGBaseEvent baseEvent)
          Deprecated.  
TWGEvent(TWGBaseEvent baseEvent, java.util.Locale locale)
          Constructer
TWGEvent(TWGEvent event)
          Copy Constructer
 
Method Summary
 java.lang.String expandString(java.lang.String input)
          Expand all the ampersanded words for the event data it represents.
 java.lang.String expandString(java.lang.String input, java.util.TimeZone timeZone)
          Expand all the ampersanded words for the event data it represents.
static java.lang.String expandString(TWGEvent event, java.lang.String input, java.util.Locale locale)
          Deprecated. replaced with instance method expandString(String input)
static java.lang.String expandString(TWGEvent event, java.lang.String input, java.util.Locale locale, java.util.TimeZone timeZone)
          Deprecated. replaced with instance method expandString(String input, TimeZone timeZone)
 java.util.Locale getLocale()
          Get the event locale
 java.lang.String getLocalizedTextTemplate()
          Get the localized vesrion of the event text template
 java.lang.String getLocalizedTypeFamily()
          Get the localized vesrion of the event type family
 int getState()
          Get the state of the event (This method is has been retired)
 java.lang.String getText()
          Get the localized vesrion of the formatted event text
 java.lang.String getType()
          Get the localized version of the event type
 void print()
          Print the contents of the TWGEvent object
 int readTWGEvent(IntelByteBuffer buf, int off)
          Constructor for interpreting a provided IntelByteBuffer at a given offset.
 void setLocalizedTextTemplate(java.lang.String textTemplate)
          Set the localized vesrion of the event text template
 void setLocalizedTypeFamily(java.lang.String typeFamily)
          Set the localized vesrion of the event type family
 void setReplacementQualifiers(java.lang.String[] qualifiers)
          Set the localized version of the event type qualifiers
 void setState(int state)
          Set the state of the event (This method is has been retired)
 int sizeOf()
          Determine the size of the entire TWGEvent object
static int sizeOfHdr()
          Determine the size of the TWGEvent header
 int sizeOfTWGEvent()
          Determine the size of the entire TWGEvent object
 IntelByteBuffer toIntelByteBuffer()
          Convert the TWGEvent into IntelByteBuffer representation.
 java.lang.String toString()
           
 int writeIntelByteBuffer(IntelByteBuffer buf)
          Write contents of this object into an IntelByteBuffer.
 int writeIntelByteBuffer(IntelByteBuffer buf, int off)
          Write contents of this object into an IntelByteBuffer.
 
Methods inherited from class com.tivoli.twg.alertmgr.TWGBaseEvent
addEventDetail, byteToLong, byteToLong, getCorrelator, getDetails, getEventCorrelator, getEventDetail, getEventDetail, getEventDetails, getManagedObjectFingerprint, getManagedObjectUniqueId, getNumDetails, getRawData, getSenderFingerprint, getSenderPath, getSenderUniqueId, readTWGBaseEvent, removeEventDetail, setCorrelator, setEventCorrelator, setManagedObjectFingerprint, setManagedObjectUniqueId, setRawData, setSenderFingerprint, setSenderPath, setSenderUniqueId, sizeOfRawData, sizeOfTWGBaseEvent
 
Methods inherited from class com.tivoli.twg.alertmgr.TWGPartialEvent
bytesToLong, bytesToLong, generateEventId, getCategory, getCategoryCount, getChildEventIds, getDate, getDateAsLong, getDaysIndex, getEventId, getFlags, getGroupId, getGroupName, getKey, getManagedObjectId, getManagedObjectName, getNumChildEventIds, getNumSubVars, getNumTypeQualifiers, getSenderName, getSeverity, getSeverityCount, getSourceLocale, getSubVar, getSubVars, getTextBundleName, getTextKeyword, getTextLocale, getTextTemplate, getTypeArray, getTypeFamily, getTypeQualifier, getTypeQualifiers, getUglyType, isaChildEvent, isaFailoverCopy, isaForwardedEvent, isanOutOfBandEvent, isaQueuedEvent, isaSummaryEvent, isResent, readTWGPartialEvent, setChildEvent, setChildEventIds, setDate, setEventId, setFailoverCopy, setForwardedEvent, setForwardedEvent, setGroupId, setGroupName, setKey, setManagedObjectId, setManagedObjectName, setOutOfBandEvent, setOutOfBandEvent, setQueuedEvent, setQueuedEvent, setResent, setSenderName, setServerId, setSeverity, setSourceLocale, setSubVars, setTextBundleName, setTextKeyword, setTextKeywordAndBundleName, setTextLocale, setTextTemplate, setTypeQualifiers, sizeOfTWGPartialEvent, toStringCategory, toStringCategory, toStringCategory, toStringFlags, toStringSeverity, toStringSeverity, toStringSeverity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATE_COUNT

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

TWGEvent

public TWGEvent(TWGEvent event)
Copy Constructer


TWGEvent

public TWGEvent(TWGBaseEvent baseEvent)
Deprecated.  

Constructer

Parameters:
baseEvent - base event

TWGEvent

public TWGEvent(TWGBaseEvent baseEvent,
                java.util.Locale locale)
Constructer

Parameters:
baseEvent - base event
locale - desired locale

TWGEvent

public TWGEvent(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

TWGEvent

public TWGEvent(IntelByteBuffer buf,
                int off)
Constructor for interpreting a provided IntelByteBuffer.

Method Detail

sizeOf

public int sizeOf()
Determine the size of the entire TWGEvent object

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

sizeOfHdr

public static int sizeOfHdr()
Determine the size of the TWGEvent header

Returns:
number of bytes that comprise the header

sizeOfTWGEvent

public int sizeOfTWGEvent()
Determine the size of the entire TWGEvent object

Returns:
number of bytes that comprise the object

toIntelByteBuffer

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

Overrides:
toIntelByteBuffer in class TWGBaseEvent
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 TWGBaseEvent
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 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 TWGBaseEvent
Parameters:
buf - IntelByteBuffer into which data should be written
off - offset from the current relative start of the provided IntelByteBuffer
Returns:
original offset plus number of bytes written

readTWGEvent

public int readTWGEvent(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

getType

public java.lang.String getType()
Get the localized version of the event type

Overrides:
getType in class TWGPartialEvent
Returns:
localized version of event type as a delimited string

setReplacementQualifiers

public void setReplacementQualifiers(java.lang.String[] qualifiers)
Set the localized version of the event type qualifiers

Overrides:
setReplacementQualifiers in class TWGPartialEvent
Parameters:
qualifiers - array of localized event qualifier strings

getText

public java.lang.String getText()
Get the localized vesrion of the formatted event text

Overrides:
getText in class TWGPartialEvent
Returns:
localized version of the formated event text

getLocalizedTextTemplate

public java.lang.String getLocalizedTextTemplate()
Get the localized vesrion of the event text template

Returns:
localized version of the event text template

setLocalizedTextTemplate

public void setLocalizedTextTemplate(java.lang.String textTemplate)
Set the localized vesrion of the event text template

Parameters:
textTemplate - localized version of the event text template

getLocalizedTypeFamily

public java.lang.String getLocalizedTypeFamily()
Get the localized vesrion of the event type family

Returns:
localized version of the event type family

setLocalizedTypeFamily

public void setLocalizedTypeFamily(java.lang.String typeFamily)
Set the localized vesrion of the event type family

Overrides:
setLocalizedTypeFamily in class TWGPartialEvent

getState

public int getState()
Get the state of the event (This method is has been retired)

Returns:
integer representing the state of an event

setState

public void setState(int state)
Set the state of the event (This method is has been retired)


getLocale

public java.util.Locale getLocale()
Get the event locale

Returns:
event locale

expandString

public static java.lang.String expandString(TWGEvent event,
                                            java.lang.String input,
                                            java.util.Locale locale)
Deprecated. replaced with instance method expandString(String input)

Expand all the ampersanded words for the event data it represents.

Parameters:
event - - source event to use when resolving ampersanded words
input - - string containing ampersanded words
locale - - locale of desired expanded ampersanded words
Returns:
- local specific expanded string

expandString

public static java.lang.String expandString(TWGEvent event,
                                            java.lang.String input,
                                            java.util.Locale locale,
                                            java.util.TimeZone timeZone)
Deprecated. replaced with instance method expandString(String input, TimeZone timeZone)

Expand all the ampersanded words for the event data it represents.

Parameters:
event - - source event to use when resolving ampersanded words
input - - string containing ampersanded words
locale - - locale of desired expanded ampersanded words
timeZone - - time zone relative to desired expanded ampersanded words
Returns:
- local specific expanded string

expandString

public java.lang.String expandString(java.lang.String input)
Expand all the ampersanded words for the event data it represents.

Parameters:
input - - string containing ampersanded words
Returns:
- local specific expanded string

expandString

public java.lang.String expandString(java.lang.String input,
                                     java.util.TimeZone timeZone)
Expand all the ampersanded words for the event data it represents.

Parameters:
input - - string containing ampersanded words
timeZone - - time zone relative to desired expanded ampersanded words
Returns:
- local specific expanded string

print

public void print()
Print the contents of the TWGEvent object

Overrides:
print in class TWGBaseEvent

toString

public java.lang.String toString()
Overrides:
toString in class TWGBaseEvent