|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.AbleMessageContainer
Capture the entire context of translatable String in a distributed platform.
A platform could potentially be distributed over many different system, each with a different locale. Early binding of message could lead to confusion if it was sent to a system with a different locale. To avoid this confusion, an AbleMessageContainer can be passed around instead of a String where this problem could occur.
This will hold enough information to be able to bind the String with an appropriate message bundle at any time. If enough information is not supplied, then the current message will be used without attempting to get it to the correct language.
Constructor Summary | |
---|---|
AbleMessageContainer(AbleMessageContainer theAbleMessageContainer)
Creates an AbleMessageContainer from another AbleMessageContainer. |
|
AbleMessageContainer(java.lang.String theMessage)
Creates an AbleMessageContainer from a (possibly pre-resolved) string; this should be used when late binding is not an option but an AbleMessageContainer object is still required. |
|
AbleMessageContainer(java.lang.String theMessageID,
java.lang.Object[] theSubText,
java.lang.String theResourceBundle)
Creates an AbleMessageContainer that captures the context of a translatable message that has insertion text. |
|
AbleMessageContainer(java.lang.String theMessageID,
java.lang.String theResourceBundle)
Creates an AbleMessageContainer that captures the context of a translatable message that has no insertion text. |
Method Summary | |
---|---|
static java.lang.String |
Copyright()
Gets the copyright of this class. |
java.lang.String |
debugString()
Returns a representation of this AbleMessageContainer. |
boolean |
equals(java.lang.Object o)
Compares this AbleMessageContainer with another to determine if the reports are equal. |
java.lang.String |
getMessage()
Gets the pre-stored message text when there is no resource bundle that holds the message. |
java.lang.String |
getMessageID()
Gets the ID of the message to be found in the resource bundle. |
java.lang.String |
getResourceBundle()
Gets the fully qualified class name of the resource bundle in which the message text is located. |
java.lang.Object[] |
getSubText()
Gets insertion text, if any, to be placed in the message when the message is formatted. |
int |
hashcode()
Return the hashcode for an AbleMessageContainer |
java.lang.String |
toString()
Returns a brief description of this AbleMessageContainer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AbleMessageContainer(java.lang.String theMessageID, java.lang.String theResourceBundle)
theMessageID
- The ID of a message to be found in a resource bundle.
theResourceBundle
- The fully qualified class name of the resource bundle in
which the message can be found.public AbleMessageContainer(java.lang.String theMessageID, java.lang.Object[] theSubText, java.lang.String theResourceBundle)
theMessageID
- The ID of a message to be found in a resource bundle.
theSubText
- The substitution text for this message.theResourceBundle
- The fully qualified class name of the resource bundle in
which the message can be found.
public AbleMessageContainer(java.lang.String theMessage)
theMessage
- The message String in the language of the system
this message originated on.public AbleMessageContainer(AbleMessageContainer theAbleMessageContainer) throws AbleException
theAbleMessageContainer
- The AbleMessageContainer that is to be copied.Method Detail |
public java.lang.String getMessageID()
public java.lang.Object[] getSubText()
public java.lang.String getResourceBundle()
public java.lang.String getMessage()
public static java.lang.String Copyright()
public java.lang.String debugString()
public boolean equals(java.lang.Object o)
AbleMessageContainers are equal if their internal, private, immutable handles are equal.
equals
in class java.lang.Object
o
- An instance of an AbleMessageContainer that is to
be compared to this AbleMessageContainer.
AbleMessageContainers are equal if all their internal, private, immutable data members are equal.
public int hashcode()
The hashcode of AbleMessageContainers is the sum of the hashcodes of all of the the internal, private, immutable handles of this Object.
public java.lang.String toString()
If the AbleMessageContainer was meant to be translated, the message ID that is to be used is returned.
If the AbleMessageContainer was not meant to be translated, then just the message is returned.
toString
in class java.lang.Object
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |