Copyright @ 2002 SAP. All Rights Reserved.

com.sap.tc.complib
Interface SoftwareComponent

All Superinterfaces:
Component

public interface SoftwareComponent
extends Component

Interface representing software components.


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 software components.
static java.lang.String SCHEMA_LOCATION
          The name of the XML schema defining the serialized form of this API
 
Method Summary
 java.util.List emptyDependencies()
          Removes the entries from the list of dependencies, or creates a new empty dependency list.
 java.util.List emptyGrants()
          Removes the entries from the list of grants, or creates a new empty grant list.
 java.util.List getDependencies()
          Returns the dependencies this software component declares.
 java.util.List getGrants()
          Returns the grants this development components declares.
 java.io.Reader getSchema()
          Returns a stream containing the XML schema used by software component description files.
 java.lang.String getSchemaVersion()
          Returns the currently active schema version.
 void initialize(SCInputProvider provider)
          Initializes this component.
 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(SCOutputProvider provider)
          Serializes this component.
 
Methods inherited from interface com.sap.tc.complib.Component
getCaption, getDescription, getName, getVendor, serialize, setCaption, setDescription, setName, setVendor, validate
 

Field Detail

NAMESPACE

public static final java.lang.String NAMESPACE
The XML namespace used by software 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

getDependencies

public java.util.List getDependencies()
Returns the dependencies this software component declares.
Returns:
a list of SCReference.

emptyDependencies

public java.util.List emptyDependencies()
Removes the entries from the list of dependencies, or creates a new empty dependency list.

getGrants

public java.util.List getGrants()
Returns the grants this development components declares.
Returns:
a list of SCReference.

emptyGrants

public java.util.List emptyGrants()
Removes the entries from the list of grants, or creates a new empty grant list.

getSchema

public java.io.Reader getSchema()
Returns a stream containing the XML schema used by software component description files.
Returns:
a stream reader providing the XML schema.

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

serialize

public void serialize(SCOutputProvider provider)
               throws java.io.IOException,
                      ProviderException
Serializes this component.
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.

initialize

public void initialize(SCInputProvider provider)
                throws java.io.IOException,
                       XMLException,
                       ProviderException
Initializes this component.
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 output stream for serialization.

Copyright @ 2002 SAP. All Rights Reserved.