com.tivoli.twg.engine
Class TWGPopupEvent

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGObject
      extended bycom.tivoli.twg.engine.TWGPopupEvent
All Implemented Interfaces:
TWGBaseShadowedObject, TWGConsoleSpecShadowedObject

public class TWGPopupEvent
extends TWGObject
implements TWGConsoleSpecShadowedObject

Console popup event record: contains description of a console popup event (either persistent or transient).


Constructor Summary
TWGPopupEvent()
          Default constructor
TWGPopupEvent(java.lang.String handler, java.lang.String nls_bndl, java.lang.String titl, java.lang.String txt, java.lang.Object[] prms, byte[] popup_prms, StringValueSet accounts, long timestmp)
          Full constructor : initializes all parameters
TWGPopupEvent(java.lang.String handler, java.lang.String nls_bndl, java.lang.String titl, java.lang.String txt, java.lang.Object[] prms, byte[] popup_prms, StringValueSet accounts, long timestmp, boolean one_ack_only, boolean marque_display, boolean is_persist, boolean immed_only)
          Full constructor : initializes all parameters
 
Method Summary
static void attachEventsToConsole(TWGActiveConsole con)
          Attach all events for given console : called when a new active console is created
 void AttachObjectToConsole(TWGActiveConsole act_con)
          Associate the object with the given TWGActiveConsole instance.
 void attachToActiveConsoles()
          Attach to active consoles matching accounts : called when a new popup event is created or restored
 void Delete()
          Delete method for relationship set
 void DetachObjectFromAllConsoles()
          Disassociate the object from all TWGActiveConsoles.
 void DetachObjectFromConsole(TWGActiveConsole act_con)
          Disassociate the object from the given TWGActiveConsole instance.
 java.lang.String GetConShadowClass()
          Get name of console shadow class.
 byte[] GetShadowRecord(java.util.Locale locale)
          Get buffer containing current values of the shadowed attributes to be delivered to the console shadow class.
 long GetShadowVersion()
          Get object state version.
 java.lang.String getText(java.util.Locale loc)
          Get text string resolved for given locale
 java.lang.String getTitle(java.util.Locale loc)
          Get title string resolved for given locale
static void handleAckPopupEventCmd(Command cmd)
          Command handler for acknowledge popup command
static void handleCancelPopupEventCmd(Command cmd)
          Command handler for cancel popup command
static void handleCreatePopupEventCmd(Command cmd)
          Command handler for create popup event command
 void UpdateShadowVersion()
          Update object state version.
 
Methods inherited from class com.tivoli.twg.engine.TWGObject
AllObjects, AllObjects, Destroy, DumpTWGObjects, FindObject, isDeleted, isNewObject, isPersistent, isPersistent, isValid, isValid, ObjectID, setDistinctObjectID, SetObjectID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWGPopupEvent

public TWGPopupEvent()
Default constructor


TWGPopupEvent

public TWGPopupEvent(java.lang.String handler,
                     java.lang.String nls_bndl,
                     java.lang.String titl,
                     java.lang.String txt,
                     java.lang.Object[] prms,
                     byte[] popup_prms,
                     StringValueSet accounts,
                     long timestmp)
Full constructor : initializes all parameters

Parameters:
handler - - name of popup handler class for console to use
nls_bndl - - name of NLS ResourceBundle class for title and text (if null, title and text fields will be used unmodified)
titl - - title string ID (if nls is non-null) or title format string
txt - - text string ID (if non-null NLS) or text format string
prms - - parameters for title and text formatting
popup_prms - - popup handler parameters, encoded as 4-byte count, followed by list of encoded DataValue records (each preceded by a 1-byte type field)
accounts - - targetted console accounts ('*' for all accounts)
timestmp - - timestamp for event (0 = current time)

TWGPopupEvent

public TWGPopupEvent(java.lang.String handler,
                     java.lang.String nls_bndl,
                     java.lang.String titl,
                     java.lang.String txt,
                     java.lang.Object[] prms,
                     byte[] popup_prms,
                     StringValueSet accounts,
                     long timestmp,
                     boolean one_ack_only,
                     boolean marque_display,
                     boolean is_persist,
                     boolean immed_only)
Full constructor : initializes all parameters

Parameters:
handler - - name of popup handler class for console to use
nls_bndl - - name of NLS ResourceBundle class for title and text (if null, title and text fields will be used unmodified)
titl - - title string ID (if nls is non-null) or title format string
txt - - text string ID (if non-null NLS) or text format string
prms - - parameters for title and text formatting
popup_prms - - popup handler parameters, encoded as 4-byte count, followed by list of encoded DataValue records (each preceded by a 1-byte type field)
accounts - - targetted console accounts ('*' for all accounts)
timestmp - - timestamp for event (0 = current time)
one_ack_only - - set to true if single acknowledge causes dismiss
marque_display - - set to true if marque display suggested
is_persist - - set to true if event should be persistent until cleared
immed_only - - set to true if event should only notify active users
Method Detail

Delete

public void Delete()
Delete method for relationship set

Overrides:
Delete in class TWGObject

UpdateShadowVersion

public void UpdateShadowVersion()
Update object state version. This method must call the TWGActiveConsole.nextShadowVersion() to update its internal state_version attribute (a 'long' instance variable). This method should be called by any methods of the object's class or subclasses which modify attributes which are send to the shadow objects on the console).

Specified by:
UpdateShadowVersion in interface TWGBaseShadowedObject

GetShadowVersion

public long GetShadowVersion()
Get object state version. This returns value of state_version.

Specified by:
GetShadowVersion in interface TWGBaseShadowedObject
Returns:
state_version attribute value

GetConShadowClass

public java.lang.String GetConShadowClass()
Get name of console shadow class. This returns the name of TWGConObject subclass which is used to hold the attributes shadowed to the console.

Specified by:
GetConShadowClass in interface TWGBaseShadowedObject
Returns:
com.tivoli.twg.engine.TWGConObject subclass which object shadows to

GetShadowRecord

public byte[] GetShadowRecord(java.util.Locale locale)
Get buffer containing current values of the shadowed attributes to be delivered to the console shadow class. This data is delivered along with the ObjectID (so the ObjectID shouldn't be included in the shadowed data record).

Specified by:
GetShadowRecord in interface TWGBaseShadowedObject
Parameters:
locale - - Locale of requested data
Returns:
byte array containing opaque data representation of attribute values to be delivered to the console shadow class.

AttachObjectToConsole

public void AttachObjectToConsole(TWGActiveConsole act_con)
Associate the object with the given TWGActiveConsole instance. This method should simply call the TWGActiveConsole.objectAddToConsole() method.

Specified by:
AttachObjectToConsole in interface TWGConsoleSpecShadowedObject
Parameters:
act_con - - Active console instance to be associated with

DetachObjectFromConsole

public void DetachObjectFromConsole(TWGActiveConsole act_con)
Disassociate the object from the given TWGActiveConsole instance. This method should simply call the TWGActiveConsole.objectRemoveFromConsole() method.

Specified by:
DetachObjectFromConsole in interface TWGConsoleSpecShadowedObject
Parameters:
act_con - - Active console instance to be disassociated from

DetachObjectFromAllConsoles

public void DetachObjectFromAllConsoles()
Disassociate the object from all TWGActiveConsoles. This method should simply call the TWGActiveConsole.objectRemoveFromAllConsoles() method.

Specified by:
DetachObjectFromAllConsoles in interface TWGConsoleSpecShadowedObject

getTitle

public java.lang.String getTitle(java.util.Locale loc)
Get title string resolved for given locale

Parameters:
loc - - locale
Returns:
final string for title

getText

public java.lang.String getText(java.util.Locale loc)
Get text string resolved for given locale

Parameters:
loc - - locale
Returns:
final string for text

attachToActiveConsoles

public void attachToActiveConsoles()
Attach to active consoles matching accounts : called when a new popup event is created or restored


attachEventsToConsole

public static void attachEventsToConsole(TWGActiveConsole con)
Attach all events for given console : called when a new active console is created

Parameters:
con - - active console

handleCreatePopupEventCmd

public static void handleCreatePopupEventCmd(Command cmd)
Command handler for create popup event command

Parameters:
cmd - - command requested

handleCancelPopupEventCmd

public static void handleCancelPopupEventCmd(Command cmd)
Command handler for cancel popup command

Parameters:
cmd - - command requested

handleAckPopupEventCmd

public static void handleAckPopupEventCmd(Command cmd)
Command handler for acknowledge popup command

Parameters:
cmd - - command requested