com.tivoli.twg.alertmgr
Class TWGActionInfo

java.lang.Object
  extended bycom.tivoli.twg.alertmgr.TWGActionInfo

public class TWGActionInfo
extends java.lang.Object

Class for providing two-communication between the Director Event server and individual Event Handlers. Event Handlers use this structure to describe information about the Event Action. This information includes things like the title, the user customizable parameters, and what options they support. At runtime, this same object is used to the now customized instances of action parameters back into the handler during a specific invocation.


Constructor Summary
TWGActionInfo()
          Default Constructor for initial construction of the object prior to requesting information from Event Handler.
TWGActionInfo(long userObjectId, java.util.Locale conLocale)
          Constructor for initializing info with console's Locale and User context.
TWGActionInfo(long conUserId, java.util.Locale conLocale, java.lang.String tgtTimeZoneId, java.util.Locale tgtLocale)
          Constructor for initializing info with all console related settings.
 
Method Summary
 void addParm(TWGActionParm ap)
          Add an user customizable parameter to this Event Action.
 void disableTesting()
          Indicate that Event Handler is not Testable.
 void enableTesting()
          Indicate that Event Handler is Testable.
 java.util.Locale getConsoleLocale()
          Get the locale of the console where Event Action was customized.
 long getConsoleUserId()
          Get the userid of the console where Event Action was customized.
 long getCustomizationKey()
          Get the customization key associated with a particular instance of the handler's data.
 long getLogKey()
          Get the action log key for current invocation of the Event Handler's ProcessEvent method.
 int getNumParms()
          Get the number of parameters for this Event Action.
 TWGActionParm getParm(int index)
          Get the action parameter referenced by provided index.
 java.util.Locale getTargetLocale()
          Get the designated locale of this target system.
 java.util.TimeZone getTargetTimeZone()
          Get the time zone of this target system.
 java.lang.String getTargetTimeZoneID()
          Get the time zone ID of this target system.
 java.lang.String getTitle()
          Get the Event Handler's title (or associated bundle keyword if bundle non-null).
 java.lang.String getTitleBundle()
          Get the bundle name associated with the Event Handler's title.
 void print()
          Print the current contents of the ActionInfo object.
 void printFlags()
          Print the current settings within the ActionInfo flags.
 void setConsoleLocale(java.util.Locale locale)
          Set the locale of the console where Event Action was being customized.
 void setConsoleUserId(long userid)
          Set the userid of the console where Event Action was customized.
 void setCustomizationKey(long key)
          Set the customization key associated with a particular instance of the handler's data.
 void setExtendedLogging()
          Indicate that Event Handler supports Action Logging.
 void setLogKey(long key)
          Set the action log key for current invocation of the Event Handler's ProcessEvent method.
 void setPersistent()
          Indicate that Event Handler should remain loaded after initialization.
 void setTargetLocale(java.util.Locale locale)
          Set the desired locale of this target system.
 void setTargetTimeZoneID(java.lang.String tzID)
          Set the time zone of this target system.
 void setTitle(java.lang.String t, java.lang.String b)
          Set the keyword and bundle name associated with the Event Handler's title.
 void setTitleBundle(java.lang.String b)
          Set the bundle name associated with the Event Handler's title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWGActionInfo

public TWGActionInfo()
Default Constructor for initial construction of the object prior to requesting information from Event Handler.


TWGActionInfo

public TWGActionInfo(long userObjectId,
                     java.util.Locale conLocale)
Constructor for initializing info with console's Locale and User context.

Parameters:
conLocale - locale of console user

TWGActionInfo

public TWGActionInfo(long conUserId,
                     java.util.Locale conLocale,
                     java.lang.String tgtTimeZoneId,
                     java.util.Locale tgtLocale)
Constructor for initializing info with all console related settings.

Parameters:
conLocale - locale of console user
tgtTimeZoneId - timezone id of target user
tgtLocale - locale of target user
Method Detail

getTitle

public java.lang.String getTitle()
Get the Event Handler's title (or associated bundle keyword if bundle non-null).


getTitleBundle

public java.lang.String getTitleBundle()
Get the bundle name associated with the Event Handler's title.

Returns:
String containing bundle name or null is not present

setTitleBundle

public void setTitleBundle(java.lang.String b)
Set the bundle name associated with the Event Handler's title.

Parameters:
b - bundle name

setTitle

public void setTitle(java.lang.String t,
                     java.lang.String b)
Set the keyword and bundle name associated with the Event Handler's title.

Parameters:
t - keyword within the bundle
b - bundle name

getConsoleLocale

public java.util.Locale getConsoleLocale()
Get the locale of the console where Event Action was customized.

Returns:
locale of console where Event Action was customized

setConsoleLocale

public void setConsoleLocale(java.util.Locale locale)
Set the locale of the console where Event Action was being customized.

Parameters:
locale - locale of the console system

getConsoleUserId

public long getConsoleUserId()
Get the userid of the console where Event Action was customized.

Returns:
object id of user at console where Event Action was customized

setConsoleUserId

public void setConsoleUserId(long userid)
Set the userid of the console where Event Action was customized.

Parameters:
userid - object id of console userid

getTargetLocale

public java.util.Locale getTargetLocale()
Get the designated locale of this target system.

Returns:
expected locale of system targeted by the Event Action

setTargetLocale

public void setTargetLocale(java.util.Locale locale)
Set the desired locale of this target system.

Parameters:
locale - locale of the target system

getTargetTimeZoneID

public java.lang.String getTargetTimeZoneID()
Get the time zone ID of this target system.

Returns:
expected time zone of system targeted by the Event Action

getTargetTimeZone

public java.util.TimeZone getTargetTimeZone()
Get the time zone of this target system.

Returns:
expected time zone of system targeted by the Event Action

setTargetTimeZoneID

public void setTargetTimeZoneID(java.lang.String tzID)
Set the time zone of this target system.

Parameters:
tzID - time zone id of the target system

getNumParms

public int getNumParms()
Get the number of parameters for this Event Action.

Returns:
number of action parameters configured for this Event Action

addParm

public void addParm(TWGActionParm ap)
Add an user customizable parameter to this Event Action.

Parameters:
ap - action parameter to be added

getParm

public TWGActionParm getParm(int index)
Get the action parameter referenced by provided index.

Parameters:
index - index of action parameter
Returns:
reference to TWGActionParm object referenced by index or null if not found

setPersistent

public void setPersistent()
Indicate that Event Handler should remain loaded after initialization.


setExtendedLogging

public void setExtendedLogging()
Indicate that Event Handler supports Action Logging.


enableTesting

public void enableTesting()
Indicate that Event Handler is Testable.


disableTesting

public void disableTesting()
Indicate that Event Handler is not Testable.


getLogKey

public long getLogKey()
Get the action log key for current invocation of the Event Handler's ProcessEvent method.

Returns:
logging key

setLogKey

public void setLogKey(long key)
Set the action log key for current invocation of the Event Handler's ProcessEvent method.

Parameters:
key - logging key

getCustomizationKey

public long getCustomizationKey()
Get the customization key associated with a particular instance of the handler's data.

Returns:
instance key

setCustomizationKey

public void setCustomizationKey(long key)
Set the customization key associated with a particular instance of the handler's data.

Parameters:
key - - datstore key

print

public void print()
Print the current contents of the ActionInfo object.


printFlags

public void printFlags()
Print the current settings within the ActionInfo flags.