Copyright @ 2002 SAP. All Rights Reserved.

com.sap.tc.complib
Interface DevelopmentComponent

All Superinterfaces:
Component

public interface DevelopmentComponent
extends Component

Interface representing development 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 development components.
static java.lang.String SCHEMA_LOCATION
          The name of the XML schema defining the serialized form of this API
 
Method Summary
 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.List emptyDependencies()
          Removes the entries from the list of dependencies, or creates a new empty dependency list.
 java.util.List emptyEnclosedComponents()
          Removes the entries from the list of enclosed components, or creates a new empty enclosure list.
 java.util.List emptyGrants()
          Removes the entries from the list of grants, or creates a new empty grant list.
 java.util.List emptyPackageFolders()
          Removes the entries from the list of package folders, or creates a new empty package folder list.
 java.util.List emptyProperties()
          Removes the entries from the list of properties, or creates a new empty property list.
 java.util.Map emptyPublicParts()
          Removes the entries from the list of public parts, or creates a new empty public part list.
 java.util.List emptySourceFolders()
          Removes the entries from the list of source folders, or creates a new empty source folder list.
 PPReference getBuildPlugin()
          Returns the build plugin for this development component.
 ComponentType getComponentType()
          Returns the component type of this development component.
 java.util.List getDependencies()
          Returns the dependencies this development component declares.
 java.util.List getEnclosedComponents()
          Returns the inner components of this component.
 DCReference getEnclosingComponent()
          Returns the enclosing component of this component.
 java.util.List getGrants()
          Returns the grants this development components declares.
 java.util.List getPackageFolders()
          Returns the package folders this development component declares.
 java.util.List getProperties()
          Returns the properties of this development component.
 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.util.Map getPublicParts()
          Returns the public parts this development component declares.
 java.io.Reader getSchema()
          Returns a stream containing the XML schema used by development component description files.
 java.lang.String getSchemaVersion()
          Returns the currently active schema version.
 java.util.List getSourceFolders()
          Returns the source folders this development component declares.
 void initialize(DCInputProvider provider)
          Initializes this component.
 void initialize(DCInputProvider provider, boolean withPPs)
          Initializes this component and optionally its public parts.
 void initializePublicPart(java.lang.String publicPartName, DCInputProvider provider)
          Initializes the given public part and adds it to the component.
 void initializePublicParts(DCInputProvider provider)
          Initializes all available part and adds them to the component.
 boolean isDeprecated()
          Checks whether this component is marked as deprecated
 boolean isExternal()
          Checks whether this development component is built outside of the component development infrastructure, for example a third-party library (JAVA JDK, operating system API).
 boolean isInternal()
          Checks whether products of this development component are delivered as separate entities.
 boolean isParentDependencyPrerequisiteForChildren()
          Indicates whether the parent must have a dependency to some DC in order to allow the children to use the same DC.
 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(DCOutputProvider provider)
          Serializes this component.
 void serialize(DCOutputProvider provider, java.lang.String schemaVersion)
           
 void serializePublicPart(java.lang.String publicPartName, DCOutputProvider provider)
          Serializes the given public part of this component.
 void serializePublicPart(java.lang.String publicPartName, DCOutputProvider provider, java.lang.String schemaVersion)
           
 void serializePublicParts(DCOutputProvider provider)
          Serializes the public parts of this component.
 void serializePublicParts(DCOutputProvider provider, java.lang.String schemaVersion)
           
 void setBuildPlugin(PPReference buildPlugin)
          Declares the build plugin for this development component.
 void setComponentType(ComponentType componentType)
          Declares the component type of this development component.
 void setDeprecated(boolean deprecated)
          Determines whether this component is deprecated
 void setEnclosingComponent(DCReference enclosingComponent)
          Declares the enclosing component of this component.
 void setExternal(boolean external)
          Declares whether this development component is built outside of the component development infrastructure, for example a third-party library (JAVA JDK, operating system API).
 void setInternal(boolean internal)
          Declares whether products of this development component are delivered as separate entities.
 
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 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

isDeprecated

public boolean isDeprecated()
Checks whether this component is marked as deprecated
Returns:
true, if the component is deprecated
Since:
SCHEMA_1_0_2

setDeprecated

public void setDeprecated(boolean deprecated)
Determines whether this component is deprecated
Parameters:
deprecated - if true, the component is marked as deprecated
Since:
SCHEMA_1_0_2

getComponentType

public ComponentType getComponentType()
Returns the component type of this development component.
Returns:
a component type.

setComponentType

public void setComponentType(ComponentType componentType)
Declares the component type of this development component.
Parameters:
componentType - a component type.

getProperties

public java.util.List getProperties()
Returns the properties of this development component.
Returns:
a list of Property.

emptyProperties

public java.util.List emptyProperties()
Removes the entries from the list of properties, or creates a new empty property list.
Since:
SCHEMA_1_0_1

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.
Since:
SCHEMA_1_0_1

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.
Since:
SCHEMA_1_0_1

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
Since:
SCHEMA_1_0_1

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
Since:
SCHEMA_1_0_1

getBuildPlugin

public PPReference getBuildPlugin()
Returns the build plugin for this development component.
Returns:
a build type.

setBuildPlugin

public void setBuildPlugin(PPReference buildPlugin)
Declares the build plugin for this development component.
Parameters:
buildType - a build type.

isExternal

public boolean isExternal()
Checks whether this development component is built outside of the component development infrastructure, for example a third-party library (JAVA JDK, operating system API).
Returns:
true, if the component is external.

setExternal

public void setExternal(boolean external)
Declares whether this development component is built outside of the component development infrastructure, for example a third-party library (JAVA JDK, operating system API).
Parameters:
external - if true the component is external.

isInternal

public boolean isInternal()
Checks whether products of this development component are delivered as separate entities.
Returns:
true, if the component produces no separatly deliverable products.

setInternal

public void setInternal(boolean internal)
Declares whether products of this development component are delivered as separate entities.
Returns:
internal if true the component produces no separatly deliverable products.

getEnclosingComponent

public DCReference getEnclosingComponent()
Returns the enclosing component of this component.
Returns:
reference to the enclosing component.

setEnclosingComponent

public void setEnclosingComponent(DCReference enclosingComponent)
Declares the enclosing component of this component.
Parameters:
enclosingComponent - reference to the enclosing component.

getEnclosedComponents

public java.util.List getEnclosedComponents()
Returns the inner components of this component.
Returns:
a list of DCReference.

emptyEnclosedComponents

public java.util.List emptyEnclosedComponents()
Removes the entries from the list of enclosed components, or creates a new empty enclosure list.

getGrants

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

emptyGrants

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

getPublicParts

public java.util.Map getPublicParts()
Returns the public parts this development component declares. The public parts are provided on demand from their corresponding .pp files. The name of a public parts is used as key.
Returns:
a map of PublicPart.
See Also:
PublicPart

emptyPublicParts

public java.util.Map emptyPublicParts()
Removes the entries from the list of public parts, or creates a new empty public part list.

getDependencies

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

emptyDependencies

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

getSourceFolders

public java.util.List getSourceFolders()
Returns the source folders this development component declares. Source folders may be used by tools to identify folders where source files are stored.
Returns:
a list of strings representing paths relative to the component's root folder.
Since:
SCHEMA_1_0_1

emptySourceFolders

public java.util.List emptySourceFolders()
Removes the entries from the list of source folders, or creates a new empty source folder list.
Since:
SCHEMA_1_0_1

getPackageFolders

public java.util.List getPackageFolders()
Returns the package folders this development component declares. Package folders may for example be used by a JAVA compiler to construct a class path.
Returns:
a list of strings representing paths relative to the component's root folder.
Since:
SCHEMA_1_0_1

emptyPackageFolders

public java.util.List emptyPackageFolders()
Removes the entries from the list of package folders, or creates a new empty package folder list.
Since:
SCHEMA_1_0_1

getSchema

public java.io.Reader getSchema()
Returns a stream containing the XML schema used by development 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(DCOutputProvider 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.

serialize

public void serialize(DCOutputProvider provider,
                      java.lang.String schemaVersion)
               throws java.io.IOException,
                      ProviderException
Parameters:
provider -  
formatVersion -  
Throws:
java.io.IOException -  
ProviderException -  

serializePublicPart

public void serializePublicPart(java.lang.String publicPartName,
                                DCOutputProvider provider)
                         throws java.io.IOException,
                                ProviderException
Serializes the given public part of this component. If the public part is undefined, the method does nothing.
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.

serializePublicPart

public void serializePublicPart(java.lang.String publicPartName,
                                DCOutputProvider provider,
                                java.lang.String schemaVersion)
                         throws java.io.IOException,
                                ProviderException
Parameters:
publicPartName -  
provider -  
formatVersion -  
Throws:
java.io.IOException -  
ProviderException -  

serializePublicParts

public void serializePublicParts(DCOutputProvider provider)
                          throws java.io.IOException,
                                 ProviderException
Serializes the public parts of this component. If the component has no public parts the method does nothing.
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.

serializePublicParts

public void serializePublicParts(DCOutputProvider provider,
                                 java.lang.String schemaVersion)
                          throws java.io.IOException,
                                 ProviderException
Parameters:
provider -  
formatVersion -  
Throws:
java.io.IOException -  
ProviderException -  

initialize

public void initialize(DCInputProvider 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.

initialize

public void initialize(DCInputProvider provider,
                       boolean withPPs)
                throws java.io.IOException,
                       XMLException,
                       ProviderException
Initializes this component and optionally its public parts.
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.

initializePublicPart

public void initializePublicPart(java.lang.String publicPartName,
                                 DCInputProvider provider)
                          throws java.io.IOException,
                                 XMLException,
                                 ProviderException
Initializes the given public part and adds it to the 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.

initializePublicParts

public void initializePublicParts(DCInputProvider provider)
                           throws java.io.IOException,
                                  XMLException,
                                  ProviderException
Initializes all available part and adds them to the 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.

isParentDependencyPrerequisiteForChildren

public boolean isParentDependencyPrerequisiteForChildren()
Indicates whether the parent must have a dependency to some DC in order to allow the children to use the same DC.
Returns:
true if the child dependency is only allowed if parent has the same dependency

Copyright @ 2002 SAP. All Rights Reserved.