Package com.hybris.cockpitng.core.spring
Interface ModuleContentProvider
-
- All Known Implementing Classes:
DefaultWidgetLibUtils.DefaultModuleContentProvider
public interface ModuleContentProviderAn interface of an object that is capable of providing contents of a module library.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfinalizeStream(java.io.OutputStream destination)Finalizes a module library.java.io.OutputStreamprepareStream(java.io.OutputStream destination)Prepares a destination stream for library contents.voidwriteContent(java.io.OutputStream destination)Sends all library content to provided output stream.
-
-
-
Method Detail
-
prepareStream
java.io.OutputStream prepareStream(java.io.OutputStream destination) throws java.io.IOExceptionPrepares a destination stream for library contents.Whatever logic is implemented in scope of this method, a returned stream should not prevent from writing content into provided stream.
- Parameters:
destination- destination stream compatible with library handler- Returns:
- actual destination stream to be used by library handler
- Throws:
java.io.IOException- whenever there is a problem with initializing library destination stream
-
writeContent
void writeContent(java.io.OutputStream destination) throws java.io.IOExceptionSends all library content to provided output stream.- Parameters:
destination- library output stream- Throws:
java.io.IOException- whenever there is a problem with providing library contents
-
finalizeStream
void finalizeStream(java.io.OutputStream destination) throws java.io.IOExceptionFinalizes a module library.Method is called once per module library just before a stream is closed.
- Parameters:
destination- module library stream- Throws:
java.io.IOException- whenever there is a problem with finalizing library destination stream
-
-