Copyright @ 2002 SAP. All Rights Reserved.

com.sap.tc.complib.provider
Class FileInputProvider

java.lang.Object
  |
  +--com.sap.tc.complib.provider.FileInputProvider
All Implemented Interfaces:
DCInputProvider, PPInputProvider, SCInputProvider

public final class FileInputProvider
extends java.lang.Object
implements DCInputProvider, SCInputProvider, PPInputProvider

This class implements a DCInputProvider used to unmarshal development components from a local file system.


Field Summary
static com.sap.tc.logging.Location LOCATION
           
 
Constructor Summary
FileInputProvider(java.lang.String rootPath, ComponentReference component)
          Creates an provider for the given root path and component.
 
Method Summary
 PPInputProvider getPPInputProvider(java.lang.String publicPartName)
          Returns an input provider for the public parts of the selected component.
 java.lang.String[] getPublicParts()
          Returns a list of the public parts of the given DC.
 java.io.InputStream getStreamForDC()
          Provides an input stream for the selected development component.
 java.io.InputStream getStreamForPublicPart()
          Provides an input stream for the selected public part.
 java.io.InputStream getStreamForSC()
          Provides an input stream for the selected software component.
 java.lang.String[] getTopLevelComponents()
          Returns the top-level components of the selected software component.
 void releaseStream(java.io.InputStream stream)
          Releases the given input stream.
 void selectPublicPart(java.lang.String publicPartName)
          Selects a public part from the given component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCATION

public static final com.sap.tc.logging.Location LOCATION
Constructor Detail

FileInputProvider

public FileInputProvider(java.lang.String rootPath,
                         ComponentReference component)
Creates an provider for the given root path and component.
Parameters:
rootPath - a path in the local file system.
component - the component to which this provider is associated.
Method Detail

selectPublicPart

public void selectPublicPart(java.lang.String publicPartName)
Selects a public part from the given component. This public part is used when the getPPInputProvider method is called the next time.
Parameters:
publicPartName - the name of a public part

releaseStream

public void releaseStream(java.io.InputStream stream)
Releases the given input stream.
Specified by:
releaseStream in interface DCInputProvider
Parameters:
stream - the stream to release.

getStreamForDC

public java.io.InputStream getStreamForDC()
                                   throws ProviderException
Provides an input stream for the selected development component.
Specified by:
getStreamForDC in interface DCInputProvider
Returns:
a stream providing the component's description file.
Throws:
ProviderException - if the component does not exist or is invalid, or the description file could not be found.

getStreamForSC

public java.io.InputStream getStreamForSC()
                                   throws ProviderException
Provides an input stream for the selected software component.
Specified by:
getStreamForSC in interface SCInputProvider
Returns:
a stream providing the component's description file.
Throws:
ProviderException - if the component does not exist or is invalid, or the description file could not be found.

getStreamForPublicPart

public java.io.InputStream getStreamForPublicPart()
                                           throws ProviderException
Provides an input stream for the selected public part.
Specified by:
getStreamForPublicPart in interface PPInputProvider
Returns:
a stream providing the public part's description file.
Throws:
ProviderException - if the public part does not exist or is invalid, or the description file could not be found.

getPublicParts

public java.lang.String[] getPublicParts()
                                  throws ProviderException
Returns a list of the public parts of the given DC.
Specified by:
getPublicParts in interface DCInputProvider
Returns:
a list of public part names

getPPInputProvider

public PPInputProvider getPPInputProvider(java.lang.String publicPartName)
                                   throws ProviderException
Returns an input provider for the public parts of the selected component.
Specified by:
getPPInputProvider in interface DCInputProvider
Parameters:
publicPartName - the name of a public part.
Returns:
an input provider for the public part's description file.
Throws:
ProviderException - if the public part does not exist or is invalid, or the selected component is not a development component.

getTopLevelComponents

public java.lang.String[] getTopLevelComponents()
                                         throws ProviderException
Returns the top-level components of the selected software component.
Returns:
a list of component names
Throws:
ProviderException - if the public part does not exist or is invalid, or the selected component is not a software component.

Copyright @ 2002 SAP. All Rights Reserved.