net.sf.javadocbuilder
Class BaseTemplate

java.lang.Object
  |
  +--net.sf.javadocbuilder.BaseTemplate
All Implemented Interfaces:
ITemplate
Direct Known Subclasses:
FilesystemTemplate, InternalTemplate

public class BaseTemplate
extends java.lang.Object
implements ITemplate

Base class for ITemplate implementations.

By default, all templates extending this class are forever cacheable. the isDirty() function must be overwritten for controlling this behaviour.

Author:
mike
See Also:
ITemplateSource

Field Summary
protected  java.lang.String buffer
           
protected  java.lang.String id
           
protected  java.lang.String name
           
protected  java.lang.String outputPattern
           
 
Constructor Summary
BaseTemplate()
           
 
Method Summary
 java.lang.String getBuffer()
          Gets the buffer with the contents of the template.
 java.lang.String getId()
          Gets a string that uniquely identifies the template within a source
 java.lang.String getName()
          Gets the name of the template.
 java.lang.String getOutputPattern()
          Gets the template desired/suggested output pattern.
 boolean isDirty()
          Cache related function to control cache usage.
 void setBuffer(java.lang.String buffer)
           
 void setId(java.lang.String id)
           
 void setName(java.lang.String name)
          Sets the name of the template
 void setOutputPattern(java.lang.String outputPattern)
          Sets the output pattern of the template
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

outputPattern

protected java.lang.String outputPattern

buffer

protected java.lang.String buffer

id

protected java.lang.String id
Constructor Detail

BaseTemplate

public BaseTemplate()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ITemplate
Gets the name of the template.

Specified by:
getName in interface ITemplate
Returns:
a String with the name of the template

getOutputPattern

public java.lang.String getOutputPattern()
Description copied from interface: ITemplate
Gets the template desired/suggested output pattern.

Specified by:
getOutputPattern in interface ITemplate
Returns:
a String.

setName

public void setName(java.lang.String name)
Sets the name of the template

Parameters:
name - The name to set.

setOutputPattern

public void setOutputPattern(java.lang.String outputPattern)
Sets the output pattern of the template

Parameters:
outputPattern - The outputPattern to set.

getBuffer

public java.lang.String getBuffer()
Description copied from interface: ITemplate
Gets the buffer with the contents of the template.

Specified by:
getBuffer in interface ITemplate
Returns:
Returns the buffer.

setBuffer

public void setBuffer(java.lang.String buffer)
Parameters:
buffer - The buffer to set.

isDirty

public boolean isDirty()
Description copied from interface: ITemplate
Cache related function to control cache usage.

Specified by:
isDirty in interface ITemplate
Returns:

getId

public java.lang.String getId()
Description copied from interface: ITemplate
Gets a string that uniquely identifies the template within a source

Specified by:
getId in interface ITemplate
Returns:
Returns the id.

setId

public void setId(java.lang.String id)
Parameters:
id - The id to set.