Copyright @ 2002 SAP. All Rights Reserved.

com.sap.tc.complib
Interface PublicPart


public interface PublicPart

Interface representing a public part of a development component.


Inner Class Summary
static class PublicPart.Purpose
          Helper class to define the purpose of public parts
 
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 public parts
static java.lang.String SCHEMA_LOCATION
          The name of the XML schema defining the serialized form of this API
 
Method Summary
 java.util.List emptyEntities()
          Removes the entries from the list of entities, or creates a new empty list.
 java.util.List emptyGrants()
          Removes the entries from the list of grants, or creates a new empty grant list.
 java.util.List emptyImportedEntities()
          Removes the entries from the list of imported entities, or creates a new empty list.
 java.lang.String getCaption()
          Returns a human readable name of the public part
 java.lang.String getDescription()
          Returns the description of the public part
 java.util.List getEntities()
          Returns the entities this public part declares.
 java.util.List getGrants()
          Returns the grants this public part declares.
 java.util.List getImportedEntities()
          Returns the entities this public part imports from inner components.
 java.lang.String getName()
          Returns the name of the public part
 PublicPart.Purpose getPurpose()
          Returns the purpose of the public part
 java.io.Reader getSchema()
          Returns a stream containing the XML schema used by public parts description files.
 java.lang.String getSchemaVersion()
          Returns the currently active schema version.
 void initialize(PPInputProvider provider)
          Initializes this public part.
 boolean isDeprecated()
          Checks whether this component is marked as deprecated
 boolean isSchemaAllowed()
          Checks whether it would be possible to serialize the public part with the currently active schema version.
 boolean isSchemaAllowed(java.lang.String schemaVersion)
          Checks whether it would be possible to serialize the public part with the given schema version
 void serialize(PPOutputProvider provider)
          Serializes this public part.
 void serialize(PPOutputProvider provider, java.lang.String formatVersion)
           
 void serialize(XMLWriter writer)
          Serializes the public part to the given XMLWriter.
 void serialize(XMLWriter writer, java.lang.String schemaVersion)
           
 void setCaption(java.lang.String caption)
          Setss a human readable name of the public part
 void setDeprecated(boolean deprecated)
          Determines whether this component is deprecated
 void setDescription(java.lang.String description)
          Sets the description of the public part
 void setName(java.lang.String name)
          Sets the name of the public part
 void setPurpose(PublicPart.Purpose purpose)
          Sets the type of the public part
 void validate()
          Verifies that the public part is valid (according to the DTD).
 

Field Detail

NAMESPACE

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

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()
Returns the name of the public part

setName

public void setName(java.lang.String name)
Sets the name of the public part

getPurpose

public PublicPart.Purpose getPurpose()
Returns the purpose of the public part

setPurpose

public void setPurpose(PublicPart.Purpose purpose)
Sets the type of the public part

getCaption

public java.lang.String getCaption()
Returns a human readable name of the public part

setCaption

public void setCaption(java.lang.String caption)
Setss a human readable name of the public part

getDescription

public java.lang.String getDescription()
Returns the description of the public part

setDescription

public void setDescription(java.lang.String description)
Sets the description of the public part

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

getGrants

public java.util.List getGrants()
Returns the grants this public part 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.

getEntities

public java.util.List getEntities()
Returns the entities this public part declares.
Returns:
a list of Entity.

emptyEntities

public java.util.List emptyEntities()
Removes the entries from the list of entities, or creates a new empty list.

getImportedEntities

public java.util.List getImportedEntities()
Returns the entities this public part imports from inner components.
Returns:
a list of EntityReference.

emptyImportedEntities

public java.util.List emptyImportedEntities()
Removes the entries from the list of imported entities, or creates a new empty list.

getSchema

public java.io.Reader getSchema()
Returns a stream containing the XML schema used by public parts 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 public part with the currently active schema version. The currently active schema version either has been set during parsing of a public part'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 public part with the given schema version
Parameters:
schemaVersion - the version to check
Returns:
true, if serialization would be possible

validate

public void validate()
              throws ValidationException
Verifies that the public part is valid (according to the DTD).
Throws:
ValidationException - if the object is not valid.

serialize

public void serialize(PPOutputProvider provider)
               throws java.io.IOException,
                      ProviderException
Serializes this public part.
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(PPOutputProvider provider,
                      java.lang.String formatVersion)
               throws java.io.IOException,
                      ProviderException
Parameters:
provider -  
formatVersion -  
Throws:
java.io.IOException -  
ProviderException -  

initialize

public void initialize(PPInputProvider provider)
                throws java.io.IOException,
                       XMLException,
                       ProviderException
Initializes this public part.
Parameters:
provider - the provider that provide 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.

serialize

public void serialize(XMLWriter writer)
               throws ValidationException
Serializes the public part to the given XMLWriter.
Parameters:
writer - the XMLWriter to use for serialization.

serialize

public void serialize(XMLWriter writer,
                      java.lang.String schemaVersion)
               throws ValidationException
Parameters:
writer -  
formatVersion -  
Throws:
ValidationException -  

Copyright @ 2002 SAP. All Rights Reserved.