org.jostraca
Interface TemplatePath

All Known Implementing Classes:
BasicTemplatePath, VirtualTemplatePath

public interface TemplatePath

Interface to template path object which resolves template paths.


Field Summary
static java.lang.String STANDARD_LIBRARY_SEPARATOR
           
static java.lang.String STANDARD_TEMPLATE_EXTENSION
           
 
Method Summary
 boolean equals(java.lang.Object pObject)
          Equality depends on TemplateName
 java.lang.String getTemplateFileName()
          Get template file name.
 java.lang.String getTemplateFolder()
          Get folder of template file.
 java.lang.String getTemplateListFile()
          Get name of template list file as specified.
 java.lang.String getTemplateName()
          Get name of template file as specified.
 java.lang.String getTemplatePath()
          Get path of template file.
 int hashCode()
          For Hashtables
 boolean isLibraryTemplate()
          Is a library template file.
 void resolve(java.lang.String[] pTemplatePaths)
          Resolve template name to a file path.
 PropertySet resolvePropertySet()
          Load PropertySet associated with the template path.
 void setTemplateName(java.lang.String pTemplateName)
          Set the name of the template to generate.
 void setTemplateNameFromFile(java.lang.String pTemplateName, java.lang.String pTemplateListFile)
          Set the name of the template and file path of the template list file which contained the template name.
 java.lang.String toString()
          Path to template file.
 

Field Detail

STANDARD_TEMPLATE_EXTENSION

public static final java.lang.String STANDARD_TEMPLATE_EXTENSION
See Also:
Constant Field Values

STANDARD_LIBRARY_SEPARATOR

public static final java.lang.String STANDARD_LIBRARY_SEPARATOR
See Also:
Constant Field Values
Method Detail

setTemplateName

public void setTemplateName(java.lang.String pTemplateName)
Set the name of the template to generate. This can be: 1. A relative file path (to the current folder) 2. An absolute file path

Parameters:
pTemplateName - Name of template.

setTemplateNameFromFile

public void setTemplateNameFromFile(java.lang.String pTemplateName,
                                    java.lang.String pTemplateListFile)
Set the name of the template and file path of the template list file which contained the template name. Template names in a template list file are considered to be relative file paths (to the folder containing the template list file) unless they are explicity absolute.

Parameters:
pTemplateListFile - Template list file specified with '-t'

resolve

public void resolve(java.lang.String[] pTemplatePaths)
Resolve template name to a file path. If template name ends in .jtm then search for file first else search for library template using path list from main.TemplatePath. Vice Versa if template name does not end in .jtm.

Parameters:
pTemplatePaths - Search paths for templates.

getTemplatePath

public java.lang.String getTemplatePath()
Get path of template file.


getTemplateFolder

public java.lang.String getTemplateFolder()
Get folder of template file.


getTemplateFileName

public java.lang.String getTemplateFileName()
Get template file name.


getTemplateName

public java.lang.String getTemplateName()
Get name of template file as specified.


getTemplateListFile

public java.lang.String getTemplateListFile()
Get name of template list file as specified.


isLibraryTemplate

public boolean isLibraryTemplate()
Is a library template file.


resolvePropertySet

public PropertySet resolvePropertySet()
Load PropertySet associated with the template path. May be a properties file or could be set dynamically.


toString

public java.lang.String toString()
Path to template file.


equals

public boolean equals(java.lang.Object pObject)
Equality depends on TemplateName


hashCode

public int hashCode()
For Hashtables



Copyright © 2000-2002 Richard Rodger