org.apache.myfaces.buildtools.maven2.plugin.xrts
Class ListRTSWriter

java.lang.Object
  extended by org.apache.myfaces.buildtools.maven2.plugin.xrts.ListRTSWriter
All Implemented Interfaces:
RTSWriter

public class ListRTSWriter
extends java.lang.Object
implements RTSWriter

The ListRTSWriter class is an implementation of the RTSWriter interface used to create a Sun ListResourceBundle file.

Since:
RTS 2.0
Version:
$Name: $ ($Revision: 1.11 $) $Date: 2002/02/27 17:18:47 $

Constructor Summary
ListRTSWriter()
          Empty constructor for the ListResourceBundle implementation
 
Method Summary
 void endBundle(java.util.Map parms, java.util.Map meta)
          RTSWriter method implementation to close the file stream required for the ListResourceBundle.
protected  java.io.PrintWriter getOut()
           
 void startBundle(java.util.Map parms, java.util.Map meta)
          RTSWriter method implementation to write the header of the ListResourceBundle file.
protected  void writeImports(java.util.Map parms, java.util.Map meta)
           
 void writeString(java.util.Map parms, java.util.Map meta, java.lang.String key, java.lang.String value)
          Writes a String to the implementation output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListRTSWriter

public ListRTSWriter()
Empty constructor for the ListResourceBundle implementation

Method Detail

startBundle

public void startBundle(java.util.Map parms,
                        java.util.Map meta)
                 throws java.lang.Throwable
RTSWriter method implementation to write the header of the ListResourceBundle file.

Specified by:
startBundle in interface RTSWriter
Parameters:
parms - a Map of command line parameters.
meta - a Map of parsed non-resource data (e.g., authors).
Throws:
java.lang.Throwable

writeImports

protected void writeImports(java.util.Map parms,
                            java.util.Map meta)
                     throws java.lang.Throwable
Throws:
java.lang.Throwable

writeString

public void writeString(java.util.Map parms,
                        java.util.Map meta,
                        java.lang.String key,
                        java.lang.String value)
                 throws java.lang.Throwable
Description copied from interface: RTSWriter
Writes a String to the implementation output.

This is the typical case use. A single String key associated with a single String value forming a key/value pair (kvp). Note that the other two body methods, writeStringArray and writeMap both support a single String key associated with multiple values.

A key/value pair may have associated attributes in the RTS file. In this method, these are received from the XML parser as a Map.

Specified by:
writeString in interface RTSWriter
Parameters:
parms - a Map of command line parameters
meta - a Map of parsed non-resource data (e.g., package).
key - a String key.
value - a String value.
Throws:
java.lang.Throwable

endBundle

public void endBundle(java.util.Map parms,
                      java.util.Map meta)
               throws java.lang.Throwable
RTSWriter method implementation to close the file stream required for the ListResourceBundle. Before closing, this method also writes the footer portions of the file. The footer portions consist of little more than closing braces.

Specified by:
endBundle in interface RTSWriter
Parameters:
meta - a Map of parsed non-resource data (e.g., authors).
parms - a Map of command line parameters.
Throws:
java.lang.Throwable

getOut

protected java.io.PrintWriter getOut()


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.