|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.gpt.framework.jsf.MessageBroker
public class MessageBroker
Retrieves messages based upon the resource bundle associated with the locale of the Faces view root.
Field Summary | |
---|---|
static String |
DEFAULT_BUNDLE_BASE_NAME
Default resource bundle that should be looked at |
Constructor Summary | |
---|---|
MessageBroker()
Default constructor. |
Method Summary | |
---|---|
void |
addErrorMessage(String resourceKey)
Adds an error message to the Faces context. |
void |
addErrorMessage(String resourceKey,
Object[] parameters)
Adds an error message message to the Faces context. |
void |
addErrorMessage(Throwable t)
Adds an error message to the Faces context based upon a thrown exception. |
void |
addMessage(FacesMessage message)
Adds a message to the Faces context. |
void |
addSuccessMessage(String resourceKey)
Adds a success message to the Faces context. |
void |
addSuccessMessage(String resourceKey,
Object[] parameters)
Adds a success message to the Faces context. |
String |
getBundleBaseName()
Gets the base name for the resource bundle. |
Locale |
getLocale()
Gets locale. |
FacesMessage |
getMessage(String resourceKey)
Gets a message from a resource bundle. |
FacesMessage |
getMessage(String resourceKey,
Object[] parameters)
Gets a message from a resource bundle. |
String |
getResourceKeyPrefix()
Gets the resource key prefix. |
String |
retrieveMessage(String resourceKey)
Retrieves a message from a resource bundle. |
String |
retrieveMessage(String resourceKey,
Object[] parameters)
Retrieves a message from a resource bundle. |
void |
setBundleBaseName(String baseName)
Sets the base name for the resource bundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_BUNDLE_BASE_NAME
Constructor Detail |
---|
public MessageBroker()
Method Detail |
---|
public String getBundleBaseName()
public void setBundleBaseName(String baseName)
baseName
- the resource bundle base namepublic String getResourceKeyPrefix()
public void addMessage(FacesMessage message)
message
- the message to addpublic void addErrorMessage(String resourceKey)
resourceKey
- the resource key for the messagepublic void addErrorMessage(String resourceKey, Object[] parameters)
resourceKey
- the resource key for the messageparameters
- optional formating parameterspublic void addErrorMessage(Throwable t)
The full class name (including path) of the exception is used a key to look up an associated message within the resource bundle. If no associated resource is found, the exception's toString method is used to generate the message.
t
- the thrown exceptionpublic void addSuccessMessage(String resourceKey)
resourceKey
- the resource key for the messagepublic void addSuccessMessage(String resourceKey, Object[] parameters)
resourceKey
- the resource key for the messageparameters
- optional formating parameterspublic FacesMessage getMessage(String resourceKey)
resourceKey
- the resource key for the message
public FacesMessage getMessage(String resourceKey, Object[] parameters)
resourceKey
- the resource key for the messageparameters
- optional formating parameters
public Locale getLocale()
public String retrieveMessage(String resourceKey)
resourceKey
- the resource key for the message
public String retrieveMessage(String resourceKey, Object[] parameters)
resourceKey
- the resource key for the messageparameters
- optional formating parameters
|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |