com.ibm.rational.rpe.api.docspec
Class RPETemplate

java.lang.Object
  extended by com.ibm.rational.rpe.api.docspec.RPEDocumentElement
      extended by com.ibm.rational.rpe.api.docspec.RPETemplate
All Implemented Interfaces:
com.ibm.rational.rpe.api.docspec.visitor.DocumentSpecificationVisitable

public class RPETemplate
extends com.ibm.rational.rpe.api.docspec.RPEDocumentElement
implements com.ibm.rational.rpe.api.docspec.visitor.DocumentSpecificationVisitable

Represents a document template object. Use DocumentSpecificationBuilder for constructing RPETemplate objects in client applications.


Constructor Summary
RPETemplate(java.lang.String templatePath)
          Constructor for the RPETemplate class.
 
Method Summary
 void accept(com.ibm.rational.rpe.api.docspec.visitor.DocumentSpecificationVisitor v)
           
 void addDataSource(RPEDataSource dataSource)
          Adds a data source to the template.
 void addVariable(com.ibm.rational.rpe.api.docspec.RPEVariable var)
          Adds a variable to the template.
 RPEDataSource getDataSource(java.lang.String dsName)
          Retrieves a data source object with a certain name.
 java.util.List<RPEDataSource> getDataSources()
          Retrieves the data sources used in the template.
 RPEMetadata getMetadata()
          Retrieves the metadata associated with the template.
 java.lang.String getURI()
          Gets the URI property of this object, which is the location from where the template has been loaded.
 com.ibm.rational.rpe.api.docspec.RPEVariable getVariable(java.lang.String varName)
          Retrieves a variable with a certain name.
 java.util.List<com.ibm.rational.rpe.api.docspec.RPEVariable> getVariables()
          Retrieves the variables contained in the template.
 boolean isAvailable()
          Synchronization method.
 void setMetadata(RPEMetadata metadata)
          Sets the metadata associated with the template.
 void setURI(java.lang.String uri)
          Sets the URI property of this object, which is the location from where the template has been loaded.
 
Methods inherited from class com.ibm.rational.rpe.api.docspec.RPEDocumentElement
addProperties, addProperty, getProperties, getProperty, makeFeature, removeProperty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RPETemplate

public RPETemplate(java.lang.String templatePath)
Constructor for the RPETemplate class.

Parameters:
templatePath - the absolute template path
Method Detail

isAvailable

public boolean isAvailable()
Synchronization method. Do not use this method directly in client applications.

Returns:
true if the template is available, false otherwise

getMetadata

public RPEMetadata getMetadata()
Retrieves the metadata associated with the template.

Returns:
the metadata

setMetadata

public void setMetadata(RPEMetadata metadata)
Sets the metadata associated with the template.

Parameters:
metadata - the metadata to add

getDataSources

public java.util.List<RPEDataSource> getDataSources()
Retrieves the data sources used in the template.

Returns:
a List of data sources

getDataSource

public RPEDataSource getDataSource(java.lang.String dsName)
Retrieves a data source object with a certain name.

Parameters:
dsName - the data source name to retrieve
Returns:
the data source

addDataSource

public void addDataSource(RPEDataSource dataSource)
Adds a data source to the template.

Parameters:
dataSource - the data source to add

getVariables

public java.util.List<com.ibm.rational.rpe.api.docspec.RPEVariable> getVariables()
Retrieves the variables contained in the template.

Returns:
a List of variables

getVariable

public com.ibm.rational.rpe.api.docspec.RPEVariable getVariable(java.lang.String varName)
Retrieves a variable with a certain name.

Parameters:
varName - the name of the variable to retrieve
Returns:
the variable

addVariable

public void addVariable(com.ibm.rational.rpe.api.docspec.RPEVariable var)
Adds a variable to the template.

Parameters:
var - the variable to add

accept

public void accept(com.ibm.rational.rpe.api.docspec.visitor.DocumentSpecificationVisitor v)
            throws RPEException
Specified by:
accept in interface com.ibm.rational.rpe.api.docspec.visitor.DocumentSpecificationVisitable
Throws:
RPEException

setURI

public void setURI(java.lang.String uri)
Sets the URI property of this object, which is the location from where the template has been loaded.


getURI

public java.lang.String getURI()
Gets the URI property of this object, which is the location from where the template has been loaded.