Copyright @ 2002 SAP. All Rights Reserved.

com.sap.tc.complib
Class ConfigurationFactory

java.lang.Object
  |
  +--com.sap.tc.complib.ConfigurationFactory

public class ConfigurationFactory
extends java.lang.Object

Factory for creating configurations, compartments, buildVariants, repository descriptions, source state descriptions for marshalling/unmarshalling of configurations


Field Summary
static java.lang.String SCHEMA_VERSION
          The schema version number of this API
static java.lang.String SCHEMA_VERSION_0_2
          ID vor schema version 0_2.
static java.lang.String SCHEMA_VERSION_0_3
          ID vor schema version 0_3.
static java.lang.String SCHEMA_VERSION_1_0
          ID vor schema version 1_0.
 
Constructor Summary
ConfigurationFactory()
           
 
Method Summary
static BuildVariant createBuildVariant()
          Create an uninitialized BuildVariant instance
static BuildVariant createBuildVariant(java.lang.String name)
          Create a BuildVariant
static BuildVariant createBuildVariant(java.lang.String name, boolean isRequired)
          Create a partially initialized BuildVariant (without options).
static Compartment createCompartment()
          Create an uninitialized Compartment instance
static Compartment createCompartment(java.lang.String name, java.lang.String scName, java.lang.String scVendor)
          Create an intialized Compartment instance for a compartment with archive state only name compartment name scName name attribute of contained software component scVendor vendor attribute of contained software component
static Compartment createCompartment(java.lang.String name, java.lang.String scName, java.lang.String scVendor, boolean hasArchiveState, SourceState sourceState)
          Create an intialized Compartment instance for a compartmnet with sourceState name compartment name scName name attribute of contained software component scVendor vendor attribute of contained software component hasArchiveState boolean telling if the compartment contains foreign archives sourceState SourceState object to describe the contained source state
static DevelopmentConfiguration createDevelopmentConfiguration()
          Create an unitialized DevelopmentConfiguration instance
static DevelopmentConfiguration createDevelopmentConfiguration(java.lang.String name, java.lang.String caption, java.lang.String description, java.lang.String buildserver, java.lang.String configVersion)
          Create a DevelopmentConfiguration instance with initialized attributes but no children
static Repository createRepository()
          Create an uninitialized Repository instance
static Repository createRepository(java.lang.String type, java.lang.String url)
          Create an initialized Repository instance
static SourceState createSourceState()
          Create an uninitialized SourceState instance
static SourceState createSourceStateForChange(Repository repository, java.lang.String workspace)
          Create a SourceState object for a source state for which chnages are allowed bit no activation.
static SourceState createSourceStateForRead(Repository repository, java.lang.String workspace)
          Create a SourceState object for a source state for which neither change nor activation is allowed.
static SourceState createSourceStateWithActivation(Repository repository, java.lang.String inactiveWorkspace, java.lang.String activeWorkspace)
          Create an a SourceState object for source state for which activation is allowed
static java.lang.String[] getSchemaVersions()
          Returns the (sorted) list of schema versions supported by this API.
static DevelopmentConfiguration initializeDevelopmentConfiguration(ConfigurationInputProvider provider)
          Get a DevelopmentConfiguration instance which is initialized from the configuration description encapsulated by the specified ConfigurationInputProvider
static boolean isSchemaAllowed(java.lang.String schemaVersion)
          Checks whether this library is capable of writing the given schema version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEMA_VERSION_0_2

public static final java.lang.String SCHEMA_VERSION_0_2
ID vor schema version 0_2. This is the API version of NWDI release 6.30.

SCHEMA_VERSION_0_3

public static final java.lang.String SCHEMA_VERSION_0_3
ID vor schema version 0_3. This is the API version of NWDI release 6.30 SP3.
Schema changes 0.2->0.3:
<development-configuration> : added <properties> tag <development-configuration> : added <is-local> attribute <sc-compartment> : added <properties> tag

SCHEMA_VERSION_1_0

public static final java.lang.String SCHEMA_VERSION_1_0
ID vor schema version 1_0. This is the API version of NWDI release 6.40.
Schema changes 0.3->1.0:
<development-configuration> : added proper namespace atributes

SCHEMA_VERSION

public static final java.lang.String SCHEMA_VERSION
The schema version number of this API
Constructor Detail

ConfigurationFactory

public ConfigurationFactory()
Method Detail

getSchemaVersions

public static java.lang.String[] getSchemaVersions()
Returns the (sorted) list of schema versions supported by this API.
Returns:
the list of schema versions

isSchemaAllowed

public static boolean isSchemaAllowed(java.lang.String schemaVersion)
Checks whether this library is capable of writing the given schema version
Parameters:
schemaVersion - the schema version to check
Returns:
true, if the library is capable of wrting the given schema version.

createDevelopmentConfiguration

public static DevelopmentConfiguration createDevelopmentConfiguration()
Create an unitialized DevelopmentConfiguration instance

createDevelopmentConfiguration

public static DevelopmentConfiguration createDevelopmentConfiguration(java.lang.String name,
                                                                      java.lang.String caption,
                                                                      java.lang.String description,
                                                                      java.lang.String buildserver,
                                                                      java.lang.String configVersion)
Create a DevelopmentConfiguration instance with initialized attributes but no children
Parameters:
name - a String with the technical identifier
caption - a String with the display name
description - a String with the description (comment)
buildserver - the url of the build server that builds this configuration

createCompartment

public static Compartment createCompartment()
Create an uninitialized Compartment instance
Returns:
a new Compartment instance

createCompartment

public static Compartment createCompartment(java.lang.String name,
                                            java.lang.String scName,
                                            java.lang.String scVendor)
Create an intialized Compartment instance for a compartment with archive state only name compartment name scName name attribute of contained software component scVendor vendor attribute of contained software component

createCompartment

public static Compartment createCompartment(java.lang.String name,
                                            java.lang.String scName,
                                            java.lang.String scVendor,
                                            boolean hasArchiveState,
                                            SourceState sourceState)
Create an intialized Compartment instance for a compartmnet with sourceState name compartment name scName name attribute of contained software component scVendor vendor attribute of contained software component hasArchiveState boolean telling if the compartment contains foreign archives sourceState SourceState object to describe the contained source state

createSourceStateForRead

public static SourceState createSourceStateForRead(Repository repository,
                                                   java.lang.String workspace)
Create a SourceState object for a source state for which neither change nor activation is allowed.
Parameters:
repository - Repository object describing a repository server
workspace - String identifying a workspace or snapshot in the repository

createSourceStateForChange

public static SourceState createSourceStateForChange(Repository repository,
                                                     java.lang.String workspace)
Create a SourceState object for a source state for which chnages are allowed bit no activation.
Parameters:
repository - Repository object describing a repository server
workspace - String identifying a workspace in the repository

createSourceStateWithActivation

public static SourceState createSourceStateWithActivation(Repository repository,
                                                          java.lang.String inactiveWorkspace,
                                                          java.lang.String activeWorkspace)
Create an a SourceState object for source state for which activation is allowed
Parameters:
repository - Repository object describing a repository server
inactiveWorkspace - String identifying the repository workspace used for changing (inactive)
activeWorkspace - String identifying the repository workspace with the active sources

createSourceState

public static SourceState createSourceState()
Create an uninitialized SourceState instance
Parameters:
repository - Repository object describing a repository server

createRepository

public static Repository createRepository()
Create an uninitialized Repository instance
Parameters:
repository - Repository object describing a repository server

createRepository

public static Repository createRepository(java.lang.String type,
                                          java.lang.String url)
Create an initialized Repository instance
Parameters:
type - the repository type
host - the host name or address
protocol - the protocol name
port - the port number as a String
remoteRoot - the root path on the server

createBuildVariant

public static BuildVariant createBuildVariant()
Create an uninitialized BuildVariant instance

createBuildVariant

public static BuildVariant createBuildVariant(java.lang.String name)
Create a BuildVariant
Parameters:
name - name of the variant

createBuildVariant

public static BuildVariant createBuildVariant(java.lang.String name,
                                              boolean isRequired)
Create a partially initialized BuildVariant (without options). The isRequired and isDefault parameters make sense only for SourceStates
Parameters:
name - name of the variant
isRequired - variant is needed in order to activate a change

initializeDevelopmentConfiguration

public static DevelopmentConfiguration initializeDevelopmentConfiguration(ConfigurationInputProvider provider)
                                                                   throws java.io.IOException,
                                                                          XMLException,
                                                                          ProviderException,
                                                                          ValidationException
Get a DevelopmentConfiguration instance which is initialized from the configuration description encapsulated by the specified ConfigurationInputProvider
Parameters:
provider - a ConfigurationInputProvider from where the configuration description is read
Returns:
an intialized DevelopmentConfiguration instance

Copyright @ 2002 SAP. All Rights Reserved.