org.apache.jetspeed.rewriter
Interface RewriterController

All Known Implementing Classes:
JetspeedClasspathRewriterController, JetspeedRewriterController

public interface RewriterController

RewriterService

Version:
$Id: RewriterController.java 516448 2007-03-09 16:25:47Z ate $
Author:
David Sean Taylor

Field Summary
static String SERVICE_NAME
           
 
Method Summary
 ParserAdaptor createParserAdaptor(String mimeType)
          Creates a Parser Adaptor for the given mime type The Parser Adaptor implementation is configured in the service configuration.
 Rewriter createRewriter()
          Creates a basic rewriter that does not support rulesets configurations.
 RulesetRewriter createRewriter(Ruleset ruleset)
          Creates a rewriter that supports rulesets configurations.
 Ruleset loadRuleset(Reader reader)
          Loads a XML-based Rewriter Ruleset given a stream to the XML configuration.
 Ruleset lookupRuleset(String id)
          Lookup a Ruleset given a ruleset identifier.
 

Field Detail

SERVICE_NAME

static final String SERVICE_NAME
See Also:
Constant Field Values
Method Detail

createRewriter

Rewriter createRewriter()
                        throws IllegalAccessException,
                               InstantiationException
Creates a basic rewriter that does not support rulesets configurations. The Rewriter implementation is configured in the service configuration.

Returns:
A new rewriter that does not support rulesets.
Throws:
InstantiationException
IllegalAccessException

createRewriter

RulesetRewriter createRewriter(Ruleset ruleset)
                               throws RewriterException
Creates a rewriter that supports rulesets configurations. The rewriter uses the rulesets configuration to control rewriting. The Rewriter implementation is configured in the service configuration.

Parameters:
ruleset - The ruleset configuration to control the rewriter.
Returns:
A new rewriter that supports rulesets.
Throws:
RewriterException

createParserAdaptor

ParserAdaptor createParserAdaptor(String mimeType)
                                  throws RewriterException
Creates a Parser Adaptor for the given mime type The Parser Adaptor implementation is configured in the service configuration. Only MimeTypes of "text/html" and "text/xml" are currently supported.

Parameters:
mimeType - The mimetype to create a parser adaptor for.
Returns:
A new parser adaptor
Throws:
RewriterException

loadRuleset

Ruleset loadRuleset(Reader reader)
Loads a XML-based Rewriter Ruleset given a stream to the XML configuration.

Parameters:
reader - The stream to the XML configuration.
Returns:
A Ruleset configuration tree.

lookupRuleset

Ruleset lookupRuleset(String id)
Lookup a Ruleset given a ruleset identifier.

Parameters:
id - The identifier for the Ruleset.
Returns:
A Ruleset configuration tree.


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.