m.c.m.proxyma.plugins.transformers
Class AbstractTransformer

java.lang.Object
  extended by m.c.m.proxyma.plugins.transformers.AbstractTransformer
All Implemented Interfaces:
ResourceHandler
Direct Known Subclasses:
CharsetInspectorTransformer, CookiesRewriteTransformer, CssUrlRewriteTransformer, HtmlUrlRewriteTransformer, HttpRedirectsRewriteTransformer, JSRewriteTransformer

public abstract class AbstractTransformer
extends java.lang.Object
implements ResourceHandler

This is the abstract class of a transformer plugin.
you have to implement a subclass of this if you want to realize your own

NOTE: this software is released under GPL License. See the LICENSE of this distribution for more informations.

Version:
$Id: AbstractTransformer.java 174 2010-07-03 08:27:20Z marcolinuz $
Author:
Marco Casavecchia Morganti (marcolinuz) [marcolinuz-at-gmail.com]

Constructor Summary
AbstractTransformer()
           
 
Method Summary
abstract  java.lang.String getHtmlDescription()
          Implement this method to provide a short description of what the plugin does.. you can use html tags into it.
abstract  java.lang.String getName()
          Implement this method to return the name of the plugin.
 ProxymaTags.HandlerType getType()
          This method is required to declare the type of plugin that this class implements and it's final.
abstract  void process(ProxymaResource aResource)
          This is the method to implement to realize the transformer logic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTransformer

public AbstractTransformer()
Method Detail

getType

public final ProxymaTags.HandlerType getType()
This method is required to declare the type of plugin that this class implements and it's final. So you don't have to override it.

Specified by:
getType in interface ResourceHandler
Returns:
the type of this plugin: TRANSFORMER

process

public abstract void process(ProxymaResource aResource)
                      throws java.lang.Exception
This is the method to implement to realize the transformer logic.

Specified by:
process in interface ResourceHandler
Parameters:
aResource - any ProxymaResource
Throws:
java.lang.Exception

getName

public abstract java.lang.String getName()
Implement this method to return the name of the plugin.

Specified by:
getName in interface ResourceHandler
Returns:
the name of the plugin

getHtmlDescription

public abstract java.lang.String getHtmlDescription()
Implement this method to provide a short description of what the plugin does.. you can use html tags into it.

Specified by:
getHtmlDescription in interface ResourceHandler
Returns:
a short description of the plugin


Copyright © 2010. All Rights Reserved.