planetj.common
Class MessageManager

java.lang.Object
  |
  +--planetj.common.MessageManager

public class MessageManager
extends Object

One of the CM component classes which enable I18N and security of the inherited GUI component class, and portablity of code.

Refer to the Handbook for information on Messages and Exceptions.


Field Summary
 boolean internalTrace
           
static int MAX_PROGRESS
           
 
Constructor Summary
MessageManager()
          MessageManager constructor comment.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          The addPropertyChangeListener method was generated to support the propertyChange field.
 void clearMessageVector()
           
 void debugMessage(Exception e)
          Gets the TranslationManager for the current service.
 void debugMessage(String msg)
          Gets the TranslationManager for the current service.
 void debugMessage(String message, Exception e)
          Gets the TranslationManager for the current service.
 void debugMessage(String message, Throwable t)
          Gets the TranslationManager for the current service.
 void debugMessage(Throwable t)
          Gets the TranslationManager for the current service.
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          The firePropertyChange method was generated to support the propertyChange field.
static CMException generateException(String exceptionKey)
          Convenience method which simply creates the replacement text variables as an array
static CMException generateException(String exceptionKey, Object[] replacementVars)
          Generate a new CMException.
static CMException generateException(String exceptionKey, String parm1)
          Convenience method which simply creates the replacement text variables as an array
static CMException generateException(String exceptionKey, String parm1, String parm2)
          Convenience method which simply creates the replacement text variables as an array
static CMException generateException(String exceptionKey, String parm1, String parm2, String parm3)
          Convenience method which simply creates the replacement text variables as an array
 CMMessage getCMMessage()
          Gets the CMMessage property (cm.common.CMMessage) value, once and once only.
 Vector getMessageVector()
          Gets the messageVector property (java.util.Vector) value.
static String getModificationLevel()
           
 int getProgressBarValue()
          Gets the progressBarValue property (int) value.
 void incrementProgressBar()
          increases the progressBarValue property (int) value.
 void removePropertyChangeListener(PropertyChangeListener listener)
          The removePropertyChangeListener method was generated to support the propertyChange field.
static void resetSingleton()
          Reset the cached singleton so that future selects can refresh the data from the database.
 void setCMException(CMException CMException)
          Sets the CMException property (cm.common.exception.CMException) value.
 boolean setCMMessage(CMMessage newCMMessage)
          Sets the CMMessage property (cm.common.CMMessage) value.
 void setInternalTrace(boolean flag)
           
 void setMessageVector(Vector newVector)
           
 void setProgressBarValue(int value)
          Sets the progressBarValue property (int) value so it can reset before a load.
 void setThrowable(Throwable throwable)
          Sets the throwable property (java.lang.Throwable) value.
 void showException(CMException exception)
          This method was created by a SmartGuide.
 void showException(CmExceptionEvent cmEvent)
          This method was created by a SmartGuide.
 void showException(Frame owner, CMException exception)
          This method was created by a SmartGuide.
 void showException(Throwable exception)
          This method was created by a SmartGuide.
static MessageManager singleton()
          Return a single instance of this class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_PROGRESS

public static final int MAX_PROGRESS
See Also:
Constant Field Values

internalTrace

public boolean internalTrace
Constructor Detail

MessageManager

public MessageManager()
MessageManager constructor comment.

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
The addPropertyChangeListener method was generated to support the propertyChange field.


clearMessageVector

public void clearMessageVector()

debugMessage

public void debugMessage(Exception e)
Gets the TranslationManager for the current service.

Returns:
a TranslationManager that can be used.

debugMessage

public void debugMessage(String msg)
Gets the TranslationManager for the current service.

Returns:
a TranslationManager that can be used.

debugMessage

public void debugMessage(String message,
                         Exception e)
Gets the TranslationManager for the current service.

Returns:
a TranslationManager that can be used.

debugMessage

public void debugMessage(String message,
                         Throwable t)
Gets the TranslationManager for the current service.

Returns:
a TranslationManager that can be used.

debugMessage

public void debugMessage(Throwable t)
Gets the TranslationManager for the current service.

Returns:
a TranslationManager that can be used.

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)
The firePropertyChange method was generated to support the propertyChange field.


generateException

public static CMException generateException(String exceptionKey)
Convenience method which simply creates the replacement text variables as an array


generateException

public static CMException generateException(String exceptionKey,
                                            Object[] replacementVars)
Generate a new CMException. This uses the TranslationManager since exceptions and messages need to be translated. The message are retrieved from a properties file called MessageBundle.properties. This also depends on a naming scheme where the "Detailed" text is appended to the exceptionKey to be used in finding the "detailed" message for this exception.


generateException

public static CMException generateException(String exceptionKey,
                                            String parm1)
Convenience method which simply creates the replacement text variables as an array


generateException

public static CMException generateException(String exceptionKey,
                                            String parm1,
                                            String parm2)
Convenience method which simply creates the replacement text variables as an array


generateException

public static CMException generateException(String exceptionKey,
                                            String parm1,
                                            String parm2,
                                            String parm3)
Convenience method which simply creates the replacement text variables as an array


getCMMessage

public CMMessage getCMMessage()
Gets the CMMessage property (cm.common.CMMessage) value, once and once only.

Returns:
The CMMessage property value.
See Also:
setCMMessage(planetj.common.CMMessage)

getMessageVector

public Vector getMessageVector()
Gets the messageVector property (java.util.Vector) value.

Returns:
The messageVector property value.

getModificationLevel

public static String getModificationLevel()

getProgressBarValue

public int getProgressBarValue()
Gets the progressBarValue property (int) value.

Returns:
The progressBarValue property value.
See Also:
setProgressBarValue(int)

incrementProgressBar

public void incrementProgressBar()
increases the progressBarValue property (int) value.


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
The removePropertyChangeListener method was generated to support the propertyChange field.


resetSingleton

public static void resetSingleton()
Reset the cached singleton so that future selects can refresh the data from the database.


setCMException

public void setCMException(CMException CMException)
Sets the CMException property (cm.common.exception.CMException) value.

Parameters:
CMException - The new value for the property.

setCMMessage

public boolean setCMMessage(CMMessage newCMMessage)
Sets the CMMessage property (cm.common.CMMessage) value.

See Also:
getCMMessage()

setInternalTrace

public void setInternalTrace(boolean flag)

setMessageVector

public void setMessageVector(Vector newVector)

setProgressBarValue

public void setProgressBarValue(int value)
Sets the progressBarValue property (int) value so it can reset before a load.


setThrowable

public void setThrowable(Throwable throwable)
Sets the throwable property (java.lang.Throwable) value.

Parameters:
throwable - The new value for the property.

showException

public void showException(Frame owner,
                          CMException exception)
This method was created by a SmartGuide.


showException

public void showException(Throwable exception)
This method was created by a SmartGuide.


showException

public void showException(CMException exception)
This method was created by a SmartGuide.


showException

public void showException(CmExceptionEvent cmEvent)
This method was created by a SmartGuide.


singleton

public static MessageManager singleton()
Return a single instance of this class.