|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shindig.gadgets.spec.MessageBundle
public class MessageBundle
Represents a messagebundle structure.
| Field Summary | |
|---|---|
static MessageBundle |
EMPTY
|
| Constructor Summary | |
|---|---|
MessageBundle(Element element)
Constructs a message bundle from a /ModulePrefs/Locale with nested messages. |
|
MessageBundle(LocaleSpec locale,
Map<String,String> map)
Constructs a message bundle from a prebuilt map. |
|
MessageBundle(LocaleSpec locale,
String xml)
Constructs a message bundle from input xml (fetched from an external file). |
|
MessageBundle(MessageBundle... bundles)
Create a MessageBundle by merging multiple bundles together. |
|
| Method Summary | |
|---|---|
String |
getLanguageDirection()
|
Map<String,String> |
getMessages()
|
String |
toJSONString()
Return the message bundle contents as a JSON encoded string. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final MessageBundle EMPTY
| Constructor Detail |
|---|
public MessageBundle(LocaleSpec locale,
String xml)
throws SpecParserException
locale - The LocaleSpec element that this bundle was constructed from.xml - The content of the remote file.
SpecParserException - if parsing fails.
public MessageBundle(LocaleSpec locale,
Map<String,String> map)
locale - The LocaleSpec element that this bundle was constructed from.map - The content of the message map.
public MessageBundle(Element element)
throws SpecParserException
element - XML Dom element to parse
SpecParserException - when badly formed xml is providedpublic MessageBundle(MessageBundle... bundles)
bundles - the bundles to merge, in order| Method Detail |
|---|
public String getLanguageDirection()
public Map<String,String> getMessages()
public String toJSONString()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||