no.sesat.search.view.velocity
Class WikiDirective

java.lang.Object
  extended by org.apache.velocity.runtime.directive.Directive
      extended by no.sesat.search.view.velocity.WikiDirective
All Implemented Interfaces:
Cloneable, org.apache.velocity.runtime.directive.DirectiveConstants

public class WikiDirective
extends org.apache.velocity.runtime.directive.Directive

A velocity directive to convert wiki url #wiki('http://no.wikipedia.org/wiki/Planet') returns the string: "http://no.wapedia.org/Planet"


Field Summary
 
Fields inherited from class org.apache.velocity.runtime.directive.Directive
rsvc
 
Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants
BLOCK, LINE
 
Constructor Summary
WikiDirective()
           
 
Method Summary
 String getName()
          returns the name of the directive.
 int getType()
          returns the type of the directive.
 boolean render(org.apache.velocity.context.InternalContextAdapter context, Writer writer, org.apache.velocity.runtime.parser.node.Node node)
          Renders the capitalized word(s).
 
Methods inherited from class org.apache.velocity.runtime.directive.Directive
getColumn, getLine, init, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiDirective

public WikiDirective()
Method Detail

getName

public String getName()
returns the name of the directive.

Specified by:
getName in class org.apache.velocity.runtime.directive.Directive
Returns:
the name of the directive.

getType

public int getType()
returns the type of the directive. The type is LINE.

Specified by:
getType in class org.apache.velocity.runtime.directive.Directive
Returns:
The type == LINE

render

public boolean render(org.apache.velocity.context.InternalContextAdapter context,
                      Writer writer,
                      org.apache.velocity.runtime.parser.node.Node node)
               throws IOException,
                      org.apache.velocity.exception.ResourceNotFoundException,
                      org.apache.velocity.exception.ParseErrorException,
                      org.apache.velocity.exception.MethodInvocationException
Renders the capitalized word(s).

Specified by:
render in class org.apache.velocity.runtime.directive.Directive
Parameters:
context -
writer -
node -
Returns:
the encoded string.
Throws:
IOException
org.apache.velocity.exception.ResourceNotFoundException
org.apache.velocity.exception.ParseErrorException
org.apache.velocity.exception.MethodInvocationException


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.