net.sf.javadocbuilder.templatesources.workspace
Class WorkspaceTemplateSource

java.lang.Object
  |
  +--net.sf.javadocbuilder.templatesources.workspace.WorkspaceTemplateSource
All Implemented Interfaces:
ITemplateSource

public class WorkspaceTemplateSource
extends java.lang.Object
implements ITemplateSource

Template source that exposes templates on the workspace. This class will search all templates on the workspace. TODO this class should listen to file creation on workspace for adding templates incrementally. TODO this class should listen project close to remove tempaltes incrementally.

Author:
mike

Constructor Summary
WorkspaceTemplateSource()
           
 
Method Summary
 java.lang.String getDescription()
          A brief description of this template source.
 java.lang.String getId()
          A string that uniquely identifies the extension (suggested plugin id).
 java.lang.String getName()
          Gets the visible name of the template source
 net.sf.javadocbuilder.ITemplate getTemplateById(java.lang.String id)
          Gets the first template identified by the given name.
 net.sf.javadocbuilder.ITemplate[] getTemplates()
          Gets an array of all templates available at the template source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspaceTemplateSource

public WorkspaceTemplateSource()
Method Detail

getTemplates

public net.sf.javadocbuilder.ITemplate[] getTemplates()
Description copied from interface: ITemplateSource
Gets an array of all templates available at the template source.

Specified by:
getTemplates in interface ITemplateSource
Returns:
a non null array (may be zero sized if there are no templates available)

getName

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

Specified by:
getName in interface ITemplateSource
Returns:

getId

public java.lang.String getId()
Description copied from interface: ITemplateSource
A string that uniquely identifies the extension (suggested plugin id). The plugin id cannot be used one plugin provides more than one source, in this case the plugin id concateated with a number or a string identifying the source should be enough.

Specified by:
getId in interface ITemplateSource
Returns:

getDescription

public java.lang.String getDescription()
Description copied from interface: ITemplateSource
A brief description of this template source.

Specified by:
getDescription in interface ITemplateSource
Returns:

getTemplateById

public net.sf.javadocbuilder.ITemplate getTemplateById(java.lang.String id)
Description copied from interface: ITemplateSource
Gets the first template identified by the given name.

Specified by:
getTemplateById in interface ITemplateSource
Returns:
a template with the given name or null if there's no tempalte with the given name in this source