|
|||||||||||
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
The default extension used by RPE document specifications |
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 from 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)
Creates and returns a RPETemplate object from the given arguments. |
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()
Returns the IURIResolver used by this DocumentSpecificationBuilder instance. |
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)
Loads a document specification from the specified path. |
RPEDocumentSpecification |
load(java.lang.String configPath,
java.lang.String docSpecPath,
java.lang.String srcDocSpecPath,
boolean strict)
Loads a document specification from the specified path. |
RPETemplate |
loadTemplate(java.lang.String configFile,
java.lang.String templPath)
Loads a template and returns a RPETemplate object. |
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 an archive file that contains the document specification, the document templates that the document specification includes, and all of the style sheets that are 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)
For a given document specification, this method replaces an existing template with a new one. |
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)
Sets the IURIResolver that is to be used by this DocumentSpecificationBuilder instance. |
void |
stripCredentials(RPEDocumentSpecification docSpec)
For the given document specification, this method removes any user names and passwords that are defined for templates, style sheets, and data sources. |
void |
syncDocumentSpecification(RPEDocumentSpecification docSpec,
java.lang.String configFile)
Synchronizes a document specification with its document templates by adding or removing data sources and variables |
void |
syncDocumentSpecification(RPEDocumentSpecification docSpec,
java.lang.String configFile,
boolean strict)
Updates the document specification to reflect the current state of the templates. |
RPEDocumentSpecification |
unpackDocumentSpecification(java.net.URI file)
Unpacks a document specification and its related artifacts from the archive file that is provided through the file argument. |
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)
Updates the properties of the docSpecElement with the values that are found in the properties with the same name of the templateElement. |
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 are
downloaded and included in the archivedocSpecName
- - the name to use for the new document specification. If null, a name is
generated based on the current name of the document specification. If the
archive is created for an RPE 1.2 WebService, the name must be
docSpec.dsx. 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)
docSpecElement
- templateElement
- properties
- public void syncDocumentSpecification(RPEDocumentSpecification docSpec, java.lang.String configFile, boolean strict) throws RPEException
docSpec
- configFile
- strict
-
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 in strict modepublic 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 replaces 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
docSpec
- the Document Specification objectoldTemplatePath
- the path of the template to be replaced. If no template has this path nothing is replaced.newTemplatePath
- 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, 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 replaces the
existing oneconfigFile
- the path to rpeconfig.xml
RPEException
public RPETemplate loadTemplate(java.lang.String configFile, java.lang.String templPath) throws RPEException
configFile
- the path to the rpeconfig.xmltemplPath
- the path or URI to the template
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
configFile
- template
- path
- credential
-
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
configPath
- the path to the rpeconfig.xml configuration filedocSpecPath
- the path to the document specificationstrict
- flag controlling whether this method ignores template access errors (strict=false)
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
configPath
- the path to the rpeconfig.xml configuration filedocSpecPath
- the path to the document specificationsrcDocSpecPath
- the original location of the document specification. This value is equal to docSpecPath for local files.strict
- flag controlling whether this method ignores template access errors (strict=false).
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 |