Copyright @ 2002 SAP. All Rights Reserved.

com.sap.tc.complib.provider
Class FileOutputProvider

java.lang.Object
  |
  +--com.sap.tc.complib.provider.FileOutputProvider
All Implemented Interfaces:
DCOutputProvider, PPOutputProvider, SCOutputProvider

public class FileOutputProvider
extends java.lang.Object
implements DCOutputProvider, SCOutputProvider, PPOutputProvider

This class implements a DCOutputProvider used to marshal development components to a local file system.


Field Summary
static com.sap.tc.logging.Location LOCATION
           
 
Constructor Summary
FileOutputProvider(java.lang.String rootPath, Component component)
          Creates an output provider for the given root path and component.
 
Method Summary
 PPOutputProvider getPPOutputProvider(java.lang.String publicPartName)
          Returns an output provider for the public parts of the given DC.
 java.io.OutputStream getStreamForDC()
          Provides an output stream for the selected development component
 java.io.OutputStream getStreamForPublicPart()
          Provides an output stream for the selected public part.
 java.io.OutputStream getStreamForSC()
          Provides an output stream for the selected software component
 void releaseStream(java.io.OutputStream 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

FileOutputProvider

public FileOutputProvider(java.lang.String rootPath,
                          Component component)
Creates an output 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 getPPOutputProvider method is called the next time.
Parameters:
publicPartName - the name of a public part

getStreamForDC

public java.io.OutputStream getStreamForDC()
                                    throws ProviderException
Provides an output stream for the selected development component
Specified by:
getStreamForDC in interface DCOutputProvider
Returns:
a stream for serializing the component's description file.
Throws:
ProviderException - if the component does not exist or is invalid.

getStreamForSC

public java.io.OutputStream getStreamForSC()
                                    throws ProviderException
Provides an output stream for the selected software component
Specified by:
getStreamForSC in interface SCOutputProvider
Returns:
a stream for serializing the component's description file.
Throws:
ProviderException - if the component does not exist or is invalid.

getStreamForPublicPart

public java.io.OutputStream getStreamForPublicPart()
                                            throws ProviderException
Provides an output stream for the selected public part.
Specified by:
getStreamForPublicPart in interface PPOutputProvider
Returns:
a stream for serializing the public part's description file.
Throws:
ProviderException - if the public part does not exist or is invalid.

releaseStream

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

getPPOutputProvider

public PPOutputProvider getPPOutputProvider(java.lang.String publicPartName)
Returns an output provider for the public parts of the given DC.
Specified by:
getPPOutputProvider in interface DCOutputProvider
Parameters:
publicPartName - the name of a public part.
Returns:
an output provider for the public part's description file.
Throws:
ProviderException - if the public part does not exist or is invalid.

Copyright @ 2002 SAP. All Rights Reserved.