net.jackofalltrades.irc.util
Class CtcpParameterTransformer

java.lang.Object
  extended bynet.jackofalltrades.irc.util.CtcpParameterTransformer
All Implemented Interfaces:
org.apache.commons.collections.Transformer

public class CtcpParameterTransformer
extends java.lang.Object
implements org.apache.commons.collections.Transformer

Author:
bhandy To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
static org.apache.commons.logging.Log _log
           
static java.lang.String CTCP_TRANFORMATION_ENABLED_PROP
           
static int QUOTE_TRANSFORMATION
           
static int UNQUOTE_TRANSFORMATION
           
 
Constructor Summary
CtcpParameterTransformer(int transformType)
          Creates a new CtcpParameterTransformer to unquote CTCP parameters during parsing, and quote them during CTCP command creation.
 
Method Summary
 java.lang.Object transform(java.lang.Object param)
          Transforms an invalid CTCP parameter into valid CTCP parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUOTE_TRANSFORMATION

public static final int QUOTE_TRANSFORMATION
See Also:
Constant Field Values

UNQUOTE_TRANSFORMATION

public static final int UNQUOTE_TRANSFORMATION
See Also:
Constant Field Values

CTCP_TRANFORMATION_ENABLED_PROP

public static final java.lang.String CTCP_TRANFORMATION_ENABLED_PROP
See Also:
Constant Field Values

_log

public static org.apache.commons.logging.Log _log
Constructor Detail

CtcpParameterTransformer

public CtcpParameterTransformer(int transformType)
Creates a new CtcpParameterTransformer to unquote CTCP parameters during parsing, and quote them during CTCP command creation.

NOTE: CTCP parameter transformation can be enabled by setting property ctcp.transformation.enabled to true.

Parameters:
transformType - the type of transformation to occur.
Throws:
java.lang.IllegalArgumentException - if transformType is not a valid transformation type.
Method Detail

transform

public java.lang.Object transform(java.lang.Object param)
Transforms an invalid CTCP parameter into valid CTCP parameter.

Specified by:
transform in interface org.apache.commons.collections.Transformer
Parameters:
param - the CTCP parameter to transform.
Returns:
the parameter with certain illegal characters converted to escapes.


Copyright © 2002-2003 Jack-of-all-trades Programming Services. All Rights Reserved.