com.fatwire.gst.foundation.facade.runtag.xlat
Class Lookup

java.lang.Object
  extended by com.fatwire.gst.foundation.facade.FTValListFacade
      extended by com.fatwire.gst.foundation.facade.runtag.AbstractTagRunner
          extended by com.fatwire.gst.foundation.facade.runtag.xlat.Lookup
All Implemented Interfaces:
TagRunner

public final class Lookup
extends AbstractTagRunner

Wrapper around the XLAT.LOOKUP xml tag

Since:
August 15, 2008
Author:
Mike Field

Field Summary
 
Fields inherited from class com.fatwire.gst.foundation.facade.FTValListFacade
list
 
Constructor Summary
Lookup()
           
 
Method Summary
static String lookup(COM.FutureTense.Interfaces.ICS ics, String key, String locale, boolean encode)
          Utility function for returning a simpel lookup string, with an option for encoding.
protected  void postExecute(COM.FutureTense.Interfaces.ICS ics)
          Template method that is called after ics.runTag and before handleError

subclasses can override

protected  void preExecute(COM.FutureTense.Interfaces.ICS ics)
          Template method that is called before ics.runTag

subclasses can override

 void setArgument(String argname, String argvalue)
          Sets the name and value of a custome argument to argname=argvalue
 void setEncode(String s)
          Sets encode to the value of s
 void setEscape(String s)
          Sets escape to the value of s
 void setEvalAll(String s)
          Sets evalall to the value of s
 void setKey(String s)
          Sets key to the value of s
 void setLocale(String s)
          Sets locale to the value of s
 void setVarname(String s)
          Sets varname to the value of s
 
Methods inherited from class com.fatwire.gst.foundation.facade.runtag.AbstractTagRunner
bind, execute, handleError
 
Methods inherited from class com.fatwire.gst.foundation.facade.FTValListFacade
getList, set, set, set, set, set, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lookup

public Lookup()
Method Detail

setKey

public void setKey(String s)
Sets key to the value of s

Parameters:
s - The key of the db entry to return

setVarname

public void setVarname(String s)
Sets varname to the value of s

Parameters:
s - The varname to output to.

setLocale

public void setLocale(String s)
Sets locale to the value of s

Parameters:
s - The locale of the db entry

setEncode

public void setEncode(String s)
Sets encode to the value of s

Parameters:
s - true or false (case sensitive)

setEscape

public void setEscape(String s)
Sets escape to the value of s

Parameters:
s - true or false (case sensitive)

setEvalAll

public void setEvalAll(String s)
Sets evalall to the value of s

Parameters:
s - true or false (case sensitive)

setArgument

public void setArgument(String argname,
                        String argvalue)
Sets the name and value of a custome argument to argname=argvalue

Parameters:
argname - The name of the argument
argvalue - The name of the value

preExecute

protected void preExecute(COM.FutureTense.Interfaces.ICS ics)
Description copied from class: AbstractTagRunner
Template method that is called before ics.runTag

subclasses can override

Overrides:
preExecute in class AbstractTagRunner

postExecute

protected void postExecute(COM.FutureTense.Interfaces.ICS ics)
Description copied from class: AbstractTagRunner
Template method that is called after ics.runTag and before handleError

subclasses can override

Overrides:
postExecute in class AbstractTagRunner

lookup

public static String lookup(COM.FutureTense.Interfaces.ICS ics,
                            String key,
                            String locale,
                            boolean encode)
Utility function for returning a simpel lookup string, with an option for encoding. Note that this function is not appropriate when variable substitution is required or when escaping is required. However, it is a convenient shortcut for most cases.

Parameters:
ics - ICS context
key - i18n key
locale - locale into which to look up the translation
encode - to encode or not
Returns:
the correct string


Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.