org.kohsuke.stapler.jelly
Class InternationalizedStringExpression

java.lang.Object
  extended by org.apache.commons.jelly.expression.ExpressionSupport
      extended by org.kohsuke.stapler.jelly.InternationalizedStringExpression
All Implemented Interfaces:
org.apache.commons.jelly.expression.Expression

public class InternationalizedStringExpression
extends org.apache.commons.jelly.expression.ExpressionSupport

Expression of the form "%messageName(arg1,arg2,...)" that represents internationalized text.

The "(arg1,...)" portion is optional and can be ommitted. Each argument is assumed to be a parenthesis-balanced expression and passed to JellyClassLoaderTearOff.EXPRESSION_FACTORY to be parsed.

The message resource is loaded from files like "xyz.properties" and "xyz_ja.properties" when the expression is placed in "xyz.jelly".

Author:
Kohsuke Kawaguchi

Field Summary
 String expressionText
           
 String key
           
 ResourceBundle resourceBundle
           
 
Fields inherited from class org.apache.commons.jelly.expression.ExpressionSupport
EMPTY_ITERATOR
 
Fields inherited from interface org.apache.commons.jelly.expression.Expression
NULL
 
Constructor Summary
InternationalizedStringExpression(ResourceBundle resourceBundle, String text)
           
 
Method Summary
 Object evaluate(org.apache.commons.jelly.JellyContext jellyContext)
           
 List<org.apache.commons.jelly.expression.Expression> getArguments()
           
 String getExpressionText()
           
 
Methods inherited from class org.apache.commons.jelly.expression.ExpressionSupport
evaluateAsBoolean, evaluateAsIterator, evaluateAsString, evaluateRecurse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceBundle

public final ResourceBundle resourceBundle

key

public final String key

expressionText

public final String expressionText
Constructor Detail

InternationalizedStringExpression

public InternationalizedStringExpression(ResourceBundle resourceBundle,
                                         String text)
                                  throws org.apache.commons.jelly.JellyException
Throws:
org.apache.commons.jelly.JellyException
Method Detail

getArguments

public List<org.apache.commons.jelly.expression.Expression> getArguments()

getExpressionText

public String getExpressionText()

evaluate

public Object evaluate(org.apache.commons.jelly.JellyContext jellyContext)


Copyright © 2011. All Rights Reserved.