Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


org.eclipse.jet.core.parser
Class AbstractTemplateResolver

java.lang.Object
  extended by 
org.eclipse.jet.core.parser.AbstractTemplateResolver
All Implemented Interfaces:
ITemplateResolver
Direct Known Subclasses:
DefaultTemplateResolver

public abstract class AbstractTemplateResolver
extends java.lang.Object
implements ITemplateResolver

Abstract implementatino of ITemplateResolver. Extenders must only implement the following methods.


Constructor Summary
protected AbstractTemplateResolver (java.net.URI baseLocation)
          Create a template resolver taking templates from a single base location.
protected AbstractTemplateResolver (java.net.URI[] baseLocations)
          Create a template resolver taking templates from one or more base locations
 
Method Summary
protected abstract   ITemplateInput createTemplateInput (java.net.URI baseLocation, java.lang.String templatePath)
          Create a Template Input from the give base location and templatePath
 java.net.URI[] getBaseLocations ()
          Return the base locations from which the template resolver will load templates
  ITemplateInput getIncludedInput (java.lang.String includePath, ITemplateInput[] activeInputs)
          Return the appropriate template input, given a template path, and the current stack of template inputs.
  ITemplateInput getInput (java.lang.String templatePath)
          Return the template input given a template path.
protected abstract  boolean inputExists (java.net.URI baseLocation, java.lang.String templatePath)
          Test whether the template input exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTemplateResolver

protected AbstractTemplateResolver(java.net.URI[] baseLocations)
Create a template resolver taking templates from one or more base locations

Parameters:
baseLocations - an array of template URIs.

AbstractTemplateResolver

protected AbstractTemplateResolver(java.net.URI baseLocation)
Create a template resolver taking templates from a single base location.

Parameters:
baseLocation - a base location URI
Method Detail

getBaseLocations

public final java.net.URI[] getBaseLocations()
Description copied from interface: ITemplateResolver
Return the base locations from which the template resolver will load templates

Specified by:
getBaseLocations in interface ITemplateResolver
Returns:
a non-empty array of base location URIs.

getIncludedInput

public final 
ITemplateInput getIncludedInput(java.lang.String includePath,
                                             
ITemplateInput[] activeInputs)
                                      throws 
RecursiveIncludeException
Description copied from interface: ITemplateResolver
Return the appropriate template input, given a template path, and the current stack of template inputs. The activeInputs argument is order from initial input to most recently included input.

Specified by:
getIncludedInput in interface ITemplateResolver
Parameters:
includePath - the JET template path
activeInputs - the input stack.
Returns:
the template input, or null
Throws:
RecursiveIncludeException - if including templatePath would result in a recursive loop

getInput

public final 
ITemplateInput getInput(java.lang.String templatePath)
Description copied from interface: ITemplateResolver
Return the template input given a template path.

Specified by:
getInput in interface ITemplateResolver
Parameters:
templatePath - the JET template path
Returns:
the template input, or null

inputExists

protected abstract boolean inputExists(java.net.URI baseLocation,
                                       java.lang.String templatePath)
Test whether the template input exists. The default implementation opens in input stream to confirme the existance

Parameters:
baseLocation - the baseLocation
templatePath - the template path
Returns:
true if createTemplateInput(URI, String)} will succeed, false otherwise.

createTemplateInput

protected abstract 
ITemplateInput createTemplateInput(java.net.URI baseLocation,
                                                      java.lang.String templatePath)
Create a Template Input from the give base location and templatePath

Parameters:
baseLocation - a base loction
templatePath - a templatePath
Returns:
the template input.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire