ru.sstu.web.jsf
Class JsfMessages

java.lang.Object
  extended by ru.sstu.web.core.Messages
      extended by ru.sstu.web.jsf.JsfMessages

public final class JsfMessages
extends Messages

Messages class provides access to JSF message resources.

Since:
Web 1.0
Author:
Alexander_Ignatov, Denis_Murashev

Constructor Summary
JsfMessages()
          Initializes messages for JSF.
 
Method Summary
 javax.faces.application.FacesMessage getMessage(String resourceId)
          This method returns FacesMessage instance with default bundle name and given resource ID.
 javax.faces.application.FacesMessage getMessage(String resourceId, Object... params)
          This method returns FacesMessage instance with default bundle name, resource ID, and parameters.
 javax.faces.application.FacesMessage getMessage(String bundleName, String resourceId, Object... params)
          This method returns FacesMessage instance with a given bundle name, resource ID, and parameters.
 String getString(String bundle, String resourceId, Object... params)
          Get the resource string with the given ID and parameters from the bundle.
 
Methods inherited from class ru.sstu.web.core.Messages
getBundles, getString, getString, setBundles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsfMessages

public JsfMessages()
Initializes messages for JSF.

Method Detail

getMessage

public javax.faces.application.FacesMessage getMessage(String resourceId)
This method returns FacesMessage instance with default bundle name and given resource ID.

Parameters:
resourceId - resource ID
Returns:
FacesMessage instance

getMessage

public javax.faces.application.FacesMessage getMessage(String resourceId,
                                                       Object... params)
This method returns FacesMessage instance with default bundle name, resource ID, and parameters.

Parameters:
resourceId - resource ID
params - parameters
Returns:
FacesMessage instance

getMessage

public javax.faces.application.FacesMessage getMessage(String bundleName,
                                                       String resourceId,
                                                       Object... params)
This method returns FacesMessage instance with a given bundle name, resource ID, and parameters.

Parameters:
bundleName - bundle name
resourceId - resource ID
params - parameters
Returns:
FacesMessage instance

getString

public String getString(String bundle,
                        String resourceId,
                        Object... params)
Get the resource string with the given ID and parameters from the bundle.

Specified by:
getString in class Messages
Parameters:
bundle - resource bundle
resourceId - resource ID
params - parameters
Returns:
message summary


Copyright © 2011 TFI branch of Engels Instutute of Technology. All Rights Reserved.