net.sf.scmwebgui
Class TemplateFinder

java.lang.Object
  extended by net.sf.scmwebgui.TemplateFinder

public class TemplateFinder
extends java.lang.Object

This class is responsible for template finding, acording to the following context inheritance rules:

Author:
mballesteros

Constructor Summary
TemplateFinder(java.lang.String projectName, java.lang.String categoryPath, java.util.Hashtable templateCache)
          This method is used in subscriptions.
TemplateFinder(VelocityServlet velocity, RequestContext ctx, java.util.Hashtable templateCache)
          Main constructor
 
Method Summary
(package private) static java.lang.String getParentTemplate(java.lang.String template)
           
 java.lang.String getTemplate(java.lang.String templateName)
          Returns the path to the more specific template, known the template name
 java.lang.String getTemplate(java.lang.String templateName, java.lang.String prefix)
          Returns the path to the more specific template, known the template name and a prefix
(package private) static boolean isRoot(java.lang.String template)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateFinder

public TemplateFinder(VelocityServlet velocity,
                      RequestContext ctx,
                      java.util.Hashtable templateCache)
               throws java.io.IOException
Main constructor

Throws:
java.io.IOException

TemplateFinder

public TemplateFinder(java.lang.String projectName,
                      java.lang.String categoryPath,
                      java.util.Hashtable templateCache)
This method is used in subscriptions. Please don't use it.

Parameters:
projectName -
categoryPath -
templateCache -
Method Detail

getTemplate

public java.lang.String getTemplate(java.lang.String templateName)
                             throws java.io.IOException
Returns the path to the more specific template, known the template name

Parameters:
templateName -
Returns:
Throws:
java.io.IOException

getTemplate

public java.lang.String getTemplate(java.lang.String templateName,
                                    java.lang.String prefix)
                             throws java.io.IOException
Returns the path to the more specific template, known the template name and a prefix

Parameters:
templateName -
prefix -
Returns:
Throws:
java.io.IOException

isRoot

static boolean isRoot(java.lang.String template)

getParentTemplate

static java.lang.String getParentTemplate(java.lang.String template)


Copyright null null. All Rights Reserved.