|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.rational.rpe.api.docspec.DocumentSpecificationBuilder
public class DocumentSpecificationBuilder
Utility class for constructing and altering Document Specifications and Document Templates.
Field Summary | |
---|---|
static java.lang.String |
DSX_EXTENSION
|
Constructor Summary | |
---|---|
DocumentSpecificationBuilder()
|
Method Summary | |
---|---|
RPEOutput |
addOutput(RPEDocumentSpecification docspec,
java.lang.String type,
java.lang.String driver)
Adds the specified output type to the document specification. |
RPEDocumentSpecification |
create(java.lang.String configFile)
Creates an empty Document Specification. |
RPEDocumentSpecification |
create(java.lang.String configFile,
java.util.List<java.lang.String> templatesFile)
Creates a new Document Specification using a list of Document Templates. |
RPETemplate |
createRuntimeTemplate(java.lang.String configFile,
com.ibm.rational.rpe.common.template.model.Template template,
java.lang.String path,
Credential credential)
|
Feature |
getConfigurationForDatasource(java.lang.String configPath,
java.lang.String type)
Builds the configuration feature for the given data source type. |
com.ibm.rational.rpe.common.utils.IURIResolver |
getURIResolver()
|
com.ibm.rational.rpe.api.docspec.RPEConfiguration |
load(java.lang.String configPath)
Loads a configuration file. |
RPEDocumentSpecification |
load(java.lang.String configPath,
java.lang.String docSpecPath)
Loads a Document Specification from the specified path. |
RPEDocumentSpecification |
load(java.lang.String configPath,
java.lang.String docSpecPath,
boolean strict)
|
RPEDocumentSpecification |
load(java.lang.String configPath,
java.lang.String docSpecPath,
java.lang.String srcDocSpecPath,
boolean strict)
|
RPETemplate |
loadTemplate(java.lang.String configFile,
java.lang.String templPath)
|
RPETemplate |
loadTemplate(java.lang.String configFile,
java.lang.String baseURI,
java.lang.String templateURI,
Credential credential)
Loads a Document Template from the given path. |
RPEDocumentSpecification |
makeDocSpec(java.lang.String defFile)
Creates a Document Specification from a definition file. |
java.io.File |
packDocumentSpecification(RPEDocumentSpecification docSpec,
boolean includeDynamicReferences,
java.lang.String docSpecName)
Creates a zip archive with the Document Specification, the Document Templates it refers and all the stylesheets used. |
RPETemplate |
replaceTemplate(RPEDocumentSpecification docSpec,
RPETemplate oldTemplate,
java.lang.String newTemplatePath,
Credential credential,
java.lang.String configFile)
For a given Document Specification, this method replaces an existing Document Template with a new one. |
RPETemplate |
replaceTemplate(RPEDocumentSpecification docSpec,
java.lang.String oldTemplatePath,
java.lang.String newTemplatePath,
Credential credential,
java.lang.String configFile)
|
RPETemplate |
replaceTemplate(RPEDocumentSpecification docSpec,
java.lang.String oldTemplatePath,
java.lang.String newTemplatePath,
java.lang.String configFile)
For a given Document Specification, this method replaces an existing Document Template with a new one. |
void |
save(RPEDocumentSpecification docSpec,
java.lang.String fileName)
Saves a Document Specification to a file. |
void |
setURIResolver(com.ibm.rational.rpe.common.utils.IURIResolver uriResolver)
|
void |
stripCredentials(RPEDocumentSpecification docSpec)
For the given Document Specification, this method removes any usernames or passwords it contains for templates, stylesheets and data sources. |
void |
syncDocumentSpecification(RPEDocumentSpecification docSpec,
java.lang.String configFile)
Synchronizes a Document Specification with its Document Templates by adding/removing Data Sources and Variables |
void |
syncDocumentSpecification(RPEDocumentSpecification docSpec,
java.lang.String configFile,
boolean strict)
|
RPEDocumentSpecification |
unpackDocumentSpecification(java.net.URI file)
Builds a Document Specification from the provided file. |
void |
updateProperties(com.ibm.rational.rpe.api.docspec.RPEDocumentElement docSpecElement,
com.ibm.rational.rpe.api.docspec.RPEDocumentElement templateElement,
java.util.List<java.lang.String> properties)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DSX_EXTENSION
Constructor Detail |
---|
public DocumentSpecificationBuilder()
Method Detail |
---|
public java.io.File packDocumentSpecification(RPEDocumentSpecification docSpec, boolean includeDynamicReferences, java.lang.String docSpecName) throws RPEException
docSpec-
- the Document SpecificationincludeDynamicReferences
- - if true all dynamically referenced templates will be downloaded and included in the archivedocSpecName
- - the name to use for the new docspec. if null a name will be generated bases on the current name of the docspec.
If the archive is created for an RPE 1.2 WebService the name must be docSpec.dsx
This parameter will be deprecated.
File
object representation of the archive created
from the Document Specification resources
RPEException
public RPEDocumentSpecification unpackDocumentSpecification(java.net.URI file) throws RPEException
file
- this parameter is an URI which can represent:
RPEException
public void updateProperties(com.ibm.rational.rpe.api.docspec.RPEDocumentElement docSpecElement, com.ibm.rational.rpe.api.docspec.RPEDocumentElement templateElement, java.util.List<java.lang.String> properties)
public void syncDocumentSpecification(RPEDocumentSpecification docSpec, java.lang.String configFile, boolean strict) throws RPEException
RPEException
public void syncDocumentSpecification(RPEDocumentSpecification docSpec, java.lang.String configFile) throws RPEException
docSpec
- the Document SpecificationconfigFile
- the path to rpeconfig.xml
RPEException
- added in 1.2 to indicate synch errors ( only on strict mode)public RPETemplate replaceTemplate(RPEDocumentSpecification docSpec, RPETemplate oldTemplate, java.lang.String newTemplatePath, Credential credential, java.lang.String configFile) throws RPEException
docSpec
- the Document Specification objectoldTemplate
- the existing Document Template objectnewTemplatePath
- the path to the Document Template file which will replace the
existing oneconfigFile
- the path to rpeconfig.xml
RPEException
public RPETemplate replaceTemplate(RPEDocumentSpecification docSpec, java.lang.String oldTemplatePath, java.lang.String newTemplatePath, Credential credential, java.lang.String configFile) throws RPEException
RPEException
public RPETemplate replaceTemplate(RPEDocumentSpecification docSpec, java.lang.String oldTemplatePath, java.lang.String newTemplatePath, java.lang.String configFile) throws RPEException
docSpec
- the Document Specification objectoldTemplatePath
- the path to the existing Document Template filenewTemplatePath
- the path to the Document Template file which will replace the
existing oneconfigFile
- the path to rpeconfig.xml
RPEException
public RPETemplate loadTemplate(java.lang.String configFile, java.lang.String templPath) throws RPEException
RPEException
public RPETemplate loadTemplate(java.lang.String configFile, java.lang.String baseURI, java.lang.String templateURI, Credential credential) throws RPEException
configFile
- the path to rpeconfig.xmltemplPath
- the path to the Document Template file
RPETemplate
object
RPEException
public RPETemplate createRuntimeTemplate(java.lang.String configFile, com.ibm.rational.rpe.common.template.model.Template template, java.lang.String path, Credential credential) throws RPEException
RPEException
public RPEDocumentSpecification create(java.lang.String configFile) throws RPEException
configFile
- the path to the rpeconfig.xml configuration file
RPEException
public RPEDocumentSpecification create(java.lang.String configFile, java.util.List<java.lang.String> templatesFile) throws RPEException
configFile
- the path to the rpeconfig.xml configuration filetemplatesFile
- a List
of paths to Document Templates
RPEException
public RPEDocumentSpecification makeDocSpec(java.lang.String defFile) throws RPEException
defFile
- the path to a definition file
RPEDocumentSpecification
RPEException
public com.ibm.rational.rpe.api.docspec.RPEConfiguration load(java.lang.String configPath) throws RPEException
configPath
- the path to rpeconfig.xml
RPEConfiguration
representation of the configuration
file
RPEException
public RPEDocumentSpecification load(java.lang.String configPath, java.lang.String docSpecPath, boolean strict) throws RPEException
RPEException
public RPEDocumentSpecification load(java.lang.String configPath, java.lang.String docSpecPath) throws RPEException
configPath
- the path to the rpeconfig.xml configuration filedocSpecPath
- the path to the Document Specification
RPEException
public RPEDocumentSpecification load(java.lang.String configPath, java.lang.String docSpecPath, java.lang.String srcDocSpecPath, boolean strict) throws RPEException
RPEException
public void save(RPEDocumentSpecification docSpec, java.lang.String fileName) throws RPEException
docSpec
- a Document Specification objectfileName
- the path to the destination file
RPEException
public void stripCredentials(RPEDocumentSpecification docSpec) throws RPEException
docSpec
- a Document Specification object
RPEException
public Feature getConfigurationForDatasource(java.lang.String configPath, java.lang.String type) throws RPEException
configPath
- the path to rpeconfig.xmltype
- the data source type
RPEException
public RPEOutput addOutput(RPEDocumentSpecification docspec, java.lang.String type, java.lang.String driver) throws RPEException
docspec
-
RPEException
public void setURIResolver(com.ibm.rational.rpe.common.utils.IURIResolver uriResolver)
public com.ibm.rational.rpe.common.utils.IURIResolver getURIResolver()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |