org.jostraca
Class BasicTemplateScript

java.lang.Object
  extended byorg.jostraca.BasicTemplateScript
All Implemented Interfaces:
TemplateScript

public class BasicTemplateScript
extends java.lang.Object
implements TemplateScript

Handles template script indentification. Template file names matching: /foo[-._]bar\.jtm/ indicate that the template script language is 'bar'. The property main.TemplateScript can override this. All template script names are converted to canonical form. Property names of the form: jostraca.TemplateScript.CanonicalName.pl = perl indicate mappings to canonical names.


Field Summary
static java.lang.String CN
           
 
Constructor Summary
protected BasicTemplateScript()
           
 
Method Summary
static TemplateScript defineByPath(java.lang.String pPath)
           
static TemplateScript defineByProperty(PropertySet pPropertySet)
           
 java.lang.String getCanonicalScriptName(PropertySet pPropertySet)
          Reference name for template script.
 java.lang.String getOriginalScriptName()
          As specified in template or template file name.
 void setByName(java.lang.String pScriptName)
          Set template script by name.
 void setByPath(java.lang.String pPath)
          Deprecated.  
 void setByProperty(PropertySet pPropertySet)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CN

public static final java.lang.String CN
Constructor Detail

BasicTemplateScript

protected BasicTemplateScript()
Method Detail

defineByPath

public static TemplateScript defineByPath(java.lang.String pPath)
                                   throws TemplateScriptException
Throws:
TemplateScriptException

defineByProperty

public static TemplateScript defineByProperty(PropertySet pPropertySet)
                                       throws TemplateScriptException
Throws:
TemplateScriptException

setByPath

public void setByPath(java.lang.String pPath)
               throws TemplateScriptException
Deprecated.  

Specified by:
setByPath in interface TemplateScript
Throws:
TemplateScriptException

setByProperty

public void setByProperty(PropertySet pPropertySet)
                   throws TemplateScriptException
Specified by:
setByProperty in interface TemplateScript
Throws:
TemplateScriptException

setByName

public void setByName(java.lang.String pScriptName)
               throws TemplateScriptException
Set template script by name. The name is converted to canonical form, if it exists. The canonical form is generally the name of the appropriate lang config file (minus the .conf suffix).

Specified by:
setByName in interface TemplateScript
Throws:
TemplateScriptException

getOriginalScriptName

public java.lang.String getOriginalScriptName()
Description copied from interface: TemplateScript
As specified in template or template file name. Example: pl. @see #getCanonicalScriptName

Specified by:
getOriginalScriptName in interface TemplateScript

getCanonicalScriptName

public java.lang.String getCanonicalScriptName(PropertySet pPropertySet)
Description copied from interface: TemplateScript
Reference name for template script. Used to access template script resources. Example: perl. @see #getOriginalScriptName

Specified by:
getCanonicalScriptName in interface TemplateScript

toString

public java.lang.String toString()


Copyright © 2000-2002 Richard Rodger