Copyright @ 2002 SAP. All Rights Reserved.

com.sap.tc.complib
Interface DevelopmentConfiguration


public interface DevelopmentConfiguration

interface for configuration objects which are the root of the typed DOM for a development configuration. The configuration specifies the cBS build space to be used and contains the definitions of the compartments of the configuration.

Since:
1.0
Version:
1.0 August 2002

Field Summary
static java.lang.String INDEX_DOCTYPE
          The document type identifier in the form of an URN as needed by the indexing service
static java.lang.String NAMESPACE
          The XML namespace used by development components.
static java.lang.String SCHEMA_LOCATION
          The name of the XML schema defining the serialized form of this API
 
Method Summary
 void addCompartment(Compartment compartment)
          Add a new compartment or overwrite existing one with same name
 Property addProperty(java.lang.String name, java.lang.String namespaceURI)
          Adds a property to the list of properties.
 Property addProperty(java.lang.String name, java.lang.String namespaceURI, java.lang.String value)
          Adds a property to the list of properties.
 java.util.Map emptyCompartments()
          Removes all entries from the Map of compartments, or creates a new empty Map.
 java.util.List emptyProperties()
          Removes the entries from the list of properties, or creates a new empty property list.
 java.lang.String getBuildServer()
          gets the URL of the buildserver
 java.lang.String getCaption()
          gets the display name
 java.lang.String getCMS()
          get the URL of the Change Management Server where this configuration is maintained.
 Compartment getCompartmentByAlias(java.lang.String referencingCompartmentName, java.lang.String aliasName)
          gets the default compartment for the specified software component
 java.util.Map getCompartments()
          get the Map with Compartment objects for all compartments The compartmnet name is used the key in the map
 java.lang.String getConfigVersion()
          gets the version of the configuration definition file
 Compartment getDefaultCompartmentForSC(java.lang.String scVendor, java.lang.String scName)
          gets the default compartment for the specified software component.
 java.lang.String getDescription()
          gets the description of the purpose of the configuration
 java.lang.String getDocumentTypeVersion()
          Deprecated. replaced by #getSchemaVersion()
 java.lang.String getLocation()
          gets the Software-Logistics location to which this confoguration belongs
 java.lang.String getName()
          gets the technical identifier of the configuration as a String
 java.lang.String getNameServer()
          get the URL of the name server that is used for this configuration
 java.lang.String getOriginalDocumentTypeVersion()
          Deprecated.  
 java.util.List getProperties()
          Returns the list of properties.
 Property getProperty(java.lang.String name)
          Returns the property matching the given name.
 Property getProperty(java.lang.String name, java.lang.String namespaceURI)
          Returns the property matching the given name and namespace.
 java.lang.String getSchemaVersion()
          Returns the currently active schema version.
 void initialize(ConfigurationInputProvider provider)
          Initializes this Configuration.
 boolean isLocal()
          gets the isLocal property.
 boolean isSchemaAllowed()
          Checks whether it would be possible to serialize the component with the currently active schema version.
 boolean isSchemaAllowed(java.lang.String schemaVersion)
          Checks whether it would be possible to serialize the component with the given schema version
 void serialize(ConfigurationOutputProvider provider)
          Serializes this Configuration.
 void serialize(ConfigurationOutputProvider provider, java.lang.String schemaVersion)
          Serializes this Configuration.
 void setBuildServer(java.lang.String value)
          sets the URL of the buildserver describing for central make and activation
 void setCaption(java.lang.String value)
          sets the display name
 void setCMS(java.lang.String cmsURL)
          set the URL of the Change Management Server where this configuration is maintained.
 void setConfigVersion(java.lang.String value)
          gets the version of the configuration
 void setDescription(java.lang.String value)
          sets the description of the purpose of the configuration
 void setLocal(boolean isLoca)
          Sets the isLocal property.
 void setLocation(java.lang.String location)
          Sets the Software-Logistics location to which this confoguration belongs
 void setName(java.lang.String value)
          sets the technical identifier of the configuration
 void setNameServer(java.lang.String nameServerURL)
          set the URL of the name server that is used for this configuration
 void validate()
          Verifies that the configuration is valid.
 

Field Detail

NAMESPACE

public static final java.lang.String NAMESPACE
The XML namespace used by development components.

INDEX_DOCTYPE

public static final java.lang.String INDEX_DOCTYPE
The document type identifier in the form of an URN as needed by the indexing service

SCHEMA_LOCATION

public static final java.lang.String SCHEMA_LOCATION
The name of the XML schema defining the serialized form of this API
Method Detail

getName

public java.lang.String getName()
gets the technical identifier of the configuration as a String

setName

public void setName(java.lang.String value)
sets the technical identifier of the configuration

getDescription

public java.lang.String getDescription()
gets the description of the purpose of the configuration

setDescription

public void setDescription(java.lang.String value)
sets the description of the purpose of the configuration

getCaption

public java.lang.String getCaption()
gets the display name

setCaption

public void setCaption(java.lang.String value)
sets the display name

setBuildServer

public void setBuildServer(java.lang.String value)
sets the URL of the buildserver describing for central make and activation

getBuildServer

public java.lang.String getBuildServer()
gets the URL of the buildserver

isLocal

public boolean isLocal()
gets the isLocal property. A local congiguration may only have local compartments, it may never go online and must not refer to any servers.
Returns:
true if this is a local configuration

setLocal

public void setLocal(boolean isLoca)
Sets the isLocal property. A local congiguration may only have local compartments, it may never go online and must not refer to any servers.

getLocation

public java.lang.String getLocation()
gets the Software-Logistics location to which this confoguration belongs
Returns:
the SL-location String

setLocation

public void setLocation(java.lang.String location)
Sets the Software-Logistics location to which this confoguration belongs
Parameters:
location - the SL-location String

getCMS

public java.lang.String getCMS()
get the URL of the Change Management Server where this configuration is maintained. The CMS keeps the original version of this file and it is reposnible for propagations into/from this configuration
Returns:
a String with the URL of the CMS

setCMS

public void setCMS(java.lang.String cmsURL)
set the URL of the Change Management Server where this configuration is maintained. The CMS keeps the original version of this file and it is reposnible for propagations into/from this configuration
Parameters:
cmsURL - a String with the URL of the CMS

getNameServer

public java.lang.String getNameServer()
get the URL of the name server that is used for this configuration
Parameters:
a - String with the URL of the name server

setNameServer

public void setNameServer(java.lang.String nameServerURL)
set the URL of the name server that is used for this configuration
Parameters:
nameServerURL - a String with the URL of the name server

emptyProperties

public java.util.List emptyProperties()
Removes the entries from the list of properties, or creates a new empty property list.
Returns:
an empty list of Property instances

addProperty

public Property addProperty(java.lang.String name,
                            java.lang.String namespaceURI)
Adds a property to the list of properties.
Parameters:
name - the name of the property
namespaceURI - an URI or URL identifying the namespace to which the property belongs to.
Returns:
the new property

addProperty

public Property addProperty(java.lang.String name,
                            java.lang.String namespaceURI,
                            java.lang.String value)
Adds a property to the list of properties.
Parameters:
name - the name of the property
namespaceURI - an URI or URL identifying the namespace to which the property belongs to.
value - the simple value of the property.
Returns:
the new property

getProperty

public Property getProperty(java.lang.String name)
Returns the property matching the given name. Note, this method ignores property namespaces. If properties with the same name but different namespaces are defined, this method will always return only the first in the list of properties.
Parameters:
name - the name of the property
Returns:
a property, or null if no property with the given name exists.

getProperty

public Property getProperty(java.lang.String name,
                            java.lang.String namespaceURI)
Returns the property matching the given name and namespace.
Parameters:
name - the name of the property
namespaceURI - the namespace the property belongs to identified by a URI
Returns:
a property, or null if no property with the given name exists.

getProperties

public java.util.List getProperties()
Returns the list of properties.
Returns:
a list of Property instances, or null if no properties are defined.

getCompartments

public java.util.Map getCompartments()
get the Map with Compartment objects for all compartments The compartmnet name is used the key in the map

addCompartment

public void addCompartment(Compartment compartment)
Add a new compartment or overwrite existing one with same name

emptyCompartments

public java.util.Map emptyCompartments()
Removes all entries from the Map of compartments, or creates a new empty Map.

getDefaultCompartmentForSC

public Compartment getDefaultCompartmentForSC(java.lang.String scVendor,
                                              java.lang.String scName)
gets the default compartment for the specified software component.

getCompartmentByAlias

public Compartment getCompartmentByAlias(java.lang.String referencingCompartmentName,
                                         java.lang.String aliasName)
                                  throws ConfigurationException
gets the default compartment for the specified software component
Parameters:
referencingCompartmentName - the name of the compartmnet where the alias is used
aliasName - the name of the alias
Returns:
the Compartmnet object of the Compartment identified by the alias
Throws:
ConfigurationException - if the alias or the mapped compartment do not exist

getSchemaVersion

public java.lang.String getSchemaVersion()
Returns the currently active schema version.
Returns:
a version string, i.e. one of the entries of ComponentFactory.getSchemaVersions().

isSchemaAllowed

public boolean isSchemaAllowed()
Checks whether it would be possible to serialize the component with the currently active schema version. The currently active schema version either has been set during parsing of a component's description file, or by default is equal to the ComponentFactory.SCHEMA_VERSION.
Returns:
true, if serialization would be possible

isSchemaAllowed

public boolean isSchemaAllowed(java.lang.String schemaVersion)
Checks whether it would be possible to serialize the component with the given schema version
Parameters:
schemaVersion - the version to check
Returns:
true, if serialization would be possible

getDocumentTypeVersion

public java.lang.String getDocumentTypeVersion()
Deprecated. replaced by #getSchemaVersion()

gets the version of the configuration definition file that will be written when this object is serialized.

getOriginalDocumentTypeVersion

public java.lang.String getOriginalDocumentTypeVersion()
Deprecated.  

gets the original version of the prased configuration definition file. if the object was not created by parsing a file but creaqted newly this is the same as getDocumentTypeVersion()

getConfigVersion

public java.lang.String getConfigVersion()
gets the version of the configuration definition file

setConfigVersion

public void setConfigVersion(java.lang.String value)
gets the version of the configuration

initialize

public void initialize(ConfigurationInputProvider provider)
                throws java.io.IOException,
                       XMLException,
                       ProviderException,
                       ValidationException
Initializes this Configuration.
Parameters:
provider - the provider that provides InputStreams for initialization.
Throws:
java.io.IOException - if an i/o error occured.
XMLException - if an exception occured in the parser
ProviderException - if the provider was not able to suppy a valid input stream for initializetion.

serialize

public void serialize(ConfigurationOutputProvider provider)
               throws java.io.IOException,
                      ProviderException
Serializes this Configuration. Does not perform a validation. Assumes that the object model is already validated.
Parameters:
provider - the provider that provide OutputStreams for serialization.
Throws:
java.io.IOException - if an i/o error occured.
ProviderException - if the provider was not able to suppy a valid output stream for serialization.

serialize

public void serialize(ConfigurationOutputProvider provider,
                      java.lang.String schemaVersion)
               throws java.io.IOException,
                      ProviderException
Serializes this Configuration. Does not perform a validation. Assumes that the object model is already validated.
Parameters:
provider - the provider that provide OutputStreams for serialization.
schemaVersion - the schema version to use for serialization
Throws:
java.io.IOException - if an i/o error occured.
ProviderException - if the provider was not able to suppy a valid output stream for serialization.

validate

public void validate()
              throws ValidationException
Verifies that the configuration is valid. The verification performs only checks that are possible when only the information in one configuration definition is available.
Throws:
ValidationException - if the object is not valid.

Copyright @ 2002 SAP. All Rights Reserved.