com.uwyn.rife.template
Class EncoderDummy

java.lang.Object
  extended by com.uwyn.rife.template.EncoderDummy
All Implemented Interfaces:
TemplateEncoder

public class EncoderDummy
extends Object
implements TemplateEncoder


Method Summary
 String encode(String value)
          Encodes the given value, returning a string which contains only valid characters and represents the given value correctly in the output format.
 String encodeDefensive(String value)
          Encodes the given value in a looser fashion than TemplateEncoder.encode(java.lang.String)'s, only converting patterns which are explicitly not allowed by the output format, but not guaranteeing that the output value exactly represents the given value in the output format.
static EncoderDummy getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EncoderDummy getInstance()

encode

public final String encode(String value)
Description copied from interface: TemplateEncoder
Encodes the given value, returning a string which contains only valid characters and represents the given value correctly in the output format.

For example, an HTML template's encoder will encode > as >.

Specified by:
encode in interface TemplateEncoder
Parameters:
value - a string
Returns:
an encoded version of the given string

encodeDefensive

public final String encodeDefensive(String value)
Description copied from interface: TemplateEncoder
Encodes the given value in a looser fashion than TemplateEncoder.encode(java.lang.String)'s, only converting patterns which are explicitly not allowed by the output format, but not guaranteeing that the output value exactly represents the given value in the output format.

For example, an HTML template's encoder will encode some Unicode characters to corresponding XML entities (such as &eacute;) when this method is called but not encode < or &.

Specified by:
encodeDefensive in interface TemplateEncoder
Parameters:
value - a string
Returns:
a loosely encoded version of the given value


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.