org.iscreen.ognl
Class OgnlResourceMessage

java.lang.Object
  extended by org.iscreen.ognl.OgnlMessage
      extended by org.iscreen.ognl.OgnlResourceMessage
All Implemented Interfaces:
FailureMessage

public class OgnlResourceMessage
extends OgnlMessage

This resource message is pulled from a resource and then converted based upon the contained OGNL expressions.

Author:
Shellman, Dan

Field Summary
protected  java.lang.String key
           
protected  ConfiguredResource resource
           
 
Fields inherited from class org.iscreen.ognl.OgnlMessage
extraMessages, root, severityLevel, template
 
Constructor Summary
OgnlResourceMessage(ConfiguredResource theResource, java.lang.String theKey, int severity)
          Constructor requiring a resource and resource key.
 
Method Summary
 java.lang.String getTemplate(java.util.Locale locale)
          Retrieves the template from the resource using the key provided.
 java.lang.String toString()
          For debug info.
 
Methods inherited from class org.iscreen.ognl.OgnlMessage
addMessage, constructMessage, getExtraMessages, getMessage, getMessage, getOgnlRoot, getSeverity, setOgnlRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resource

protected ConfiguredResource resource

key

protected java.lang.String key
Constructor Detail

OgnlResourceMessage

public OgnlResourceMessage(ConfiguredResource theResource,
                           java.lang.String theKey,
                           int severity)
Constructor requiring a resource and resource key.

Parameters:
theResource - The configured resource
theKey - The resource key
Method Detail

getTemplate

public java.lang.String getTemplate(java.util.Locale locale)
Retrieves the template from the resource using the key provided.

Overrides:
getTemplate in class OgnlMessage
Parameters:
locale - The locale to use in determining the template.
Returns:
Returns the template from the resource using the key.

toString

public java.lang.String toString()
For debug info.

Overrides:
toString in class java.lang.Object
Returns:
Returns debug info.