amisample
Class ASMessageBox

java.lang.Object
  |
  +--amisample.ASMessageBox
All Implemented Interfaces:
Serializable

public class ASMessageBox
extends Object
implements Serializable

A message box contains several message according a commun goal ( sent, inbox..).

Messages box model, contains every messages through different lists

Version:
1.0
Author:
Bertrand Florat
See Also:
Serialized Form

Inner Class Summary
(package private)  class ASMessageBox.ASMessageBoxModel
           
 
Field Summary
(package private)  boolean bSent
          If true, is a message box with output messages ( without need for transmiter storage )
(package private)  HashMap hLists
          Messages stored this way: hashtable : list name -> Array lists of messages
(package private) static HashMap hMessagesBoxes
          Contains all loaded message boxes
(package private)  ASMessageBox.ASMessageBoxModel model
          Table model used for data representation
(package private)  SimpleDateFormat sdf
          A date formater
(package private)  String sList
          Filter on list currently used by view
(package private)  String sName
          Box name
 
Constructor Summary
private ASMessageBox(String sName, boolean bSent)
          Method ASMessageBox.
 
Method Summary
 void appendMessage(ASMessage asm)
          Append a message in the box
(package private) static void commit(ASMessageBox amb)
          Serialize the box on disk
(package private) static void commitAll()
          Serialize all boxes on disk
(package private) static ASMessageBox getBox(String sName, boolean bSent)
          Load the message box.
 String getName()
          Returns the sName.
 boolean isSent()
          Returns the bSent.
 void removeRow(int[] iSelection)
          Remove an interval of rows
 void setList(String sList)
          Sets the sList.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

model

transient ASMessageBox.ASMessageBoxModel model
Table model used for data representation

sName

String sName
Box name

hLists

HashMap hLists
Messages stored this way: hashtable : list name -> Array lists of messages

sList

String sList
Filter on list currently used by view

bSent

boolean bSent
If true, is a message box with output messages ( without need for transmiter storage )

hMessagesBoxes

static HashMap hMessagesBoxes
Contains all loaded message boxes

sdf

SimpleDateFormat sdf
A date formater
Constructor Detail

ASMessageBox

private ASMessageBox(String sName,
                     boolean bSent)
Method ASMessageBox.
Parameters:
sName - Name of the message box
bSent - Is it an output box ?
Method Detail

appendMessage

public void appendMessage(ASMessage asm)
Append a message in the box

removeRow

public void removeRow(int[] iSelection)
Remove an interval of rows

commit

static void commit(ASMessageBox amb)
            throws ASException
Serialize the box on disk

commitAll

static void commitAll()
               throws ASException
Serialize all boxes on disk

getBox

static ASMessageBox getBox(String sName,
                           boolean bSent)
Load the message box. Check f this one is already in the list, if not, load it from the disk and if it is not found on the disk, instanciate it

getName

public String getName()
Returns the sName.
Returns:
String

setList

public void setList(String sList)
Sets the sList.
Parameters:
sList - The sList to set

isSent

public boolean isSent()
Returns the bSent.
Returns:
boolean