org.apache.wicket.extensions.markup.html.basic
Class LinkParser

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.basic.LinkParser
All Implemented Interfaces:
ILinkParser
Direct Known Subclasses:
DefaultLinkParser

public class LinkParser
extends java.lang.Object
implements ILinkParser

This base implementation iterates over all provided ILinkRenderStrategy implementations and applies them to the input text.

Author:
Gerolf Seitz

Constructor Summary
LinkParser()
           
 
Method Summary
 ILinkParser addLinkRenderStrategy(java.lang.String pattern, ILinkRenderStrategy renderStrategy)
          Adds a render strategy to the parser.
 java.lang.String parse(java.lang.String text)
          Parses the text and changes it according to the provided ILinkRenderStrategy implementations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkParser

public LinkParser()
Method Detail

addLinkRenderStrategy

public ILinkParser addLinkRenderStrategy(java.lang.String pattern,
                                         ILinkRenderStrategy renderStrategy)
Adds a render strategy to the parser.

Parameters:
pattern - the pattern to which the provided renderStrategy should be applied.
renderStrategy - the ILinkRenderStrategy which is applied to the text found by the provided pattern.
Returns:
this ILinkParser.

parse

public java.lang.String parse(java.lang.String text)
Description copied from interface: ILinkParser
Parses the text and changes it according to the provided ILinkRenderStrategy implementations.

Specified by:
parse in interface ILinkParser
Parameters:
text - the input text which should be modified.
Returns:
the modified input text.
See Also:
ILinkParser.parse(String)


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.