net.sf.javadocbuilder
Class BuilderConfiguration

java.lang.Object
  |
  +--net.sf.javadocbuilder.BuilderConfiguration

public final class BuilderConfiguration
extends java.lang.Object

Simple class to hold data for one build configuration.

Configuration

javadocbuilder is the root element
 	
 		TODO add full description for attributes
 	
 

Author:
mgriffa

Field Summary
private  boolean classNameFilterEnabled
          Switch filtering by class name
private  java.lang.String classNameFilterPattern
          The pattern to match if classNameFilterEnabled is true
private static java.util.logging.Logger log
           
private  java.lang.String outDir
          output directory
private  java.lang.String outPattern
          output pattern name.
private  boolean singleOutput
          Enables the output ot a single file
private  java.util.Vector sourceDirectories
          A list of directories to include in the parsing process.
private  boolean tagFilterEnabled
          enable or disable the filtering by tag feature
private  java.lang.String tagFilterName
          tag to use for filtering classes if tagFilterEnabled is true
private  java.lang.String templateId
          The id of the template to load
private  java.lang.String templateSource
          The id of the template source extension to use for loading the template.
static int VERSION
           
 
Constructor Summary
BuilderConfiguration()
           
 
Method Summary
 void addSourceDir(java.lang.String dir)
           
 java.lang.String getClassNameFilterPattern()
           
 java.lang.String getOutDir()
          Returns the output directory.
 java.lang.String getOutPattern()
           
 java.lang.String[] getSourceDirectories()
           
 java.lang.String getSourceDirectoriesString()
          Gets a comma separated string with source directories
 java.lang.String getTagFilterName()
           
 byte[] getTemplateBuffer()
          Gets a byte[] with selected template contents
 java.lang.String getTemplateId()
           
 java.lang.String getTemplateSource()
           
 boolean isClassNameFilterEnabled()
           
 boolean isSingleOutput()
           
 boolean isTagFilterEnabled()
           
static net.sf.javadocbuilder.BuilderConfiguration[] readConfigurations(IFile cfgFile)
          Reads the xml configuration file and returns all settings there.
 void setClassNameFilterEnabled(boolean classNameFilterEnabled)
           
 void setClassNameFilterPattern(java.lang.String classNameFilterPattern)
           
 void setOutDir(java.lang.String outDir)
           
 void setOutPattern(java.lang.String outPattern)
           
 void setSingleOutput(boolean singleOutput)
           
 void setSourceDirectories(java.lang.String string)
          Sets source directories from a comma separated list.
 void setTagFilterEnabled(boolean tagFilterEnabled)
           
 void setTagFilterName(java.lang.String tagFilterName)
           
 void setTemplateName(java.lang.String templateId)
           
 void setTemplateSource(java.lang.String templateSource)
           
private  void setVersion(java.lang.String v)
           
static void writeConfigurations(IFile cfgFile, net.sf.javadocbuilder.BuilderConfiguration[] cfgs)
           
 java.lang.String xmlString()
          Gets a string with an xml representation of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final int VERSION
See Also:
Constant Field Values

log

private static java.util.logging.Logger log

classNameFilterEnabled

private boolean classNameFilterEnabled
Switch filtering by class name


classNameFilterPattern

private java.lang.String classNameFilterPattern
The pattern to match if classNameFilterEnabled is true


outDir

private java.lang.String outDir
output directory


outPattern

private java.lang.String outPattern
output pattern name. When the output is a single file, the filename is speficied here.
When the output is multiple a more complex pattern goes here.
The multiple output pattern makes the following substitutions:
  1. {class}
    : for the current classname
  2. {package.name}
    : for the current package name as in the import ie: my.package.name
  3. {package.dir}
    : for the current package directory like my/package/name for the previous example


sourceDirectories

private java.util.Vector sourceDirectories
A list of directories to include in the parsing process.


tagFilterEnabled

private boolean tagFilterEnabled
enable or disable the filtering by tag feature


tagFilterName

private java.lang.String tagFilterName
tag to use for filtering classes if tagFilterEnabled is true


singleOutput

private boolean singleOutput
Enables the output ot a single file


templateSource

private java.lang.String templateSource
The id of the template source extension to use for loading the template.


templateId

private java.lang.String templateId
The id of the template to load

Constructor Detail

BuilderConfiguration

public BuilderConfiguration()
Method Detail

isClassNameFilterEnabled

public boolean isClassNameFilterEnabled()
Returns:
Returns the classNameFilterEnabled.

setClassNameFilterEnabled

public void setClassNameFilterEnabled(boolean classNameFilterEnabled)
Parameters:
classNameFilterEnabled - The classNameFilterEnabled to set.

getClassNameFilterPattern

public java.lang.String getClassNameFilterPattern()
Returns:
Returns the classNameFilterPattern.

setClassNameFilterPattern

public void setClassNameFilterPattern(java.lang.String classNameFilterPattern)
Parameters:
classNameFilterPattern - The classNameFilterPattern to set.

getOutDir

public java.lang.String getOutDir()
Returns the output directory. A trailing slash is guarrranted.

Returns:
Returns the outDir.

setOutDir

public void setOutDir(java.lang.String outDir)
Parameters:
outDir - The outDir to set.

getOutPattern

public java.lang.String getOutPattern()
Returns:
Returns the outPattern.

setOutPattern

public void setOutPattern(java.lang.String outPattern)
Parameters:
outPattern - The outPattern to set.

isSingleOutput

public boolean isSingleOutput()
Returns:
Returns the singleOutput.

setSingleOutput

public void setSingleOutput(boolean singleOutput)
Parameters:
singleOutput - The singleOutput to set.

getSourceDirectories

public java.lang.String[] getSourceDirectories()
Returns:
Returns the sourceDirectories.

isTagFilterEnabled

public boolean isTagFilterEnabled()
Returns:
Returns the tagFilterEnabled.

setTagFilterEnabled

public void setTagFilterEnabled(boolean tagFilterEnabled)
Parameters:
tagFilterEnabled - The tagFilterEnabled to set.

getTagFilterName

public java.lang.String getTagFilterName()
Returns:
Returns the tagFilterName.

setTagFilterName

public void setTagFilterName(java.lang.String tagFilterName)
Parameters:
tagFilterName - The tagFilterName to set.

addSourceDir

public void addSourceDir(java.lang.String dir)

readConfigurations

public static net.sf.javadocbuilder.BuilderConfiguration[] readConfigurations(IFile cfgFile)
                                                                       throws java.io.IOException,
                                                                              org.xml.sax.SAXException,
                                                                              CoreException
Reads the xml configuration file and returns all settings there.

Parameters:
cfgFile -
Returns:
java.io.IOException
org.xml.sax.SAXException
CoreException

setVersion

private void setVersion(java.lang.String v)

writeConfigurations

public static void writeConfigurations(IFile cfgFile,
                                       net.sf.javadocbuilder.BuilderConfiguration[] cfgs)
                                throws CoreException
CoreException

getSourceDirectoriesString

public java.lang.String getSourceDirectoriesString()
Gets a comma separated string with source directories

Returns:

xmlString

public java.lang.String xmlString()
Gets a string with an xml representation of this class.

Returns:

setSourceDirectories

public void setSourceDirectories(java.lang.String string)
Sets source directories from a comma separated list. items are trimed.

Parameters:
string -

getTemplateId

public final java.lang.String getTemplateId()
Returns:
Returns the templateName.

setTemplateName

public final void setTemplateName(java.lang.String templateId)

getTemplateSource

public final java.lang.String getTemplateSource()
Returns:
Returns the templateSource.

setTemplateSource

public final void setTemplateSource(java.lang.String templateSource)
Parameters:
templateSource - The templateSource to set.

getTemplateBuffer

public byte[] getTemplateBuffer()
Gets a byte[] with selected template contents

Returns: