org.apache.wsrp4j.consumer.driver
Class URLRewriterImpl

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.driver.URLRewriterImpl
All Implemented Interfaces:
URLRewriter

public class URLRewriterImpl
extends java.lang.Object
implements URLRewriter

This class implements the URLRewriter-interface providing a method to rewrite urls (Consumer URL Rewriting).

Author:
Stefan Behl, Richard Jacob

Method Summary
static URLRewriter getInstance()
           
 java.lang.String rewriteURLs(java.lang.String markup)
          Parses the entire markup and rewrites all found URLs.
 void setURLGenerator(URLGenerator urlGenerator)
          Sets the url generator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static URLRewriter getInstance()

setURLGenerator

public void setURLGenerator(URLGenerator urlGenerator)
Sets the url generator. This is required to enable url rewriting.

Specified by:
setURLGenerator in interface URLRewriter

rewriteURLs

public java.lang.String rewriteURLs(java.lang.String markup)
Description copied from interface: URLRewriter
Parses the entire markup and rewrites all found URLs. The URLs to be rewritten are enclosed by the tokens "wsrp-rewrite" and "/wsrp-rewrite".

Specified by:
rewriteURLs in interface URLRewriter
Parameters:
markup -
Returns: