Class NLSEcho

  • java.lang.Object

  • public class NLSEcho
    wsNLSEcho Task: This is a echo extension task to display translated messages. Also provides variable substitution in the message. Attributes: key Key to look for in resource bundle --- Not required bundle Resource bundle from where resource for key to be loaded - Not required message Default message - Required replace substitution arguments seperated by ";;" - Not required Usage: Examples: Above will echo the message using resource bundle "installapps" with key ISUCCESS. If ISUCCESS is not present in resource bundlle or resource bundle is missing ,default message "Installing app successful" is printed. Variable substitution can be done using {x} similar to MessageFormat replace takes parameter values seperated by ;;. In the above example {0} is replaced with "hello" and {1} is replaced with "server1" To use this task in your build.xml, include the following taskdef: <taskdef name="wsNLSEcho" classname=""/>
    See Also:
    Copyright IBM Corp. 2002 Source File: Creation Date: August 13, 2002
    • Nested Class Summary

      • Nested classes/interfaces inherited from class
    • Field Summary

      Modifier and Type Field and Description
      protected java.lang.String bundle 
      protected java.lang.String key 
      protected java.lang.Object[] tokens 
      • Fields inherited from class

        append, file, logLevel, message
      • Fields inherited from class

        description, location, target, taskName, taskType, wrapper
      • Fields inherited from class

    • Constructor Summary

      Constructor and Description
    • Method Summary

      Modifier and Type Method and Description
      protected void doTranslation()
      Get translated message
      void execute()
      Execute the task
      protected java.lang.String getBundle()
      Returns the fileName.
      protected java.lang.String getKey()
      Returns the key.
      void setBundle(java.lang.String bundle)
      Set the file name to be used as resource bundle
      void setKey(java.lang.String key)
      key to be translated
      void setReplace(java.lang.String str)
      Replaces {x} with values specified
      • Methods inherited from class

        addText, setAppend, setFile, setLevel, setMessage
      • Methods inherited from class

        getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class

        getProject, setProject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bundle

        protected java.lang.String bundle
      • key

        protected java.lang.String key
      • tokens

        protected java.lang.Object[] tokens
    • Constructor Detail

      • NLSEcho

        public NLSEcho()
    • Method Detail

      • setBundle

        public void setBundle(java.lang.String bundle)
        Set the file name to be used as resource bundle
      • execute

        public void execute()
        Execute the task
        execute in class
      • setKey

        public void setKey(java.lang.String key)
        key to be translated
      • doTranslation

        protected void doTranslation()
        Get translated message
      • getBundle

        protected java.lang.String getBundle()
        Returns the fileName.
      • getKey

        protected java.lang.String getKey()
        Returns the key.
      • setReplace

        public void setReplace(java.lang.String str)
        Replaces {x} with values specified
IBM WebSphere Application ServerTM
Release 9.0