be.re.repo
Interface OutTransformerFactory


public interface OutTransformerFactory

The interface for external transformers of non-XML streams. It is called when a document is written to the response stream and when the module is capable of doing a transformation between the requested MIME types. Such modules are declared in /configuration/maps.xml using the out-transformer element as in the following example:

 <out-transformer>
   <!-- Several path elements can come here. -->
   <from>
     <mime-type>text/plain</mime-type>
     <!-- Additional mime-type elements can come here. -->
   </from>
   <to>
     <mime-type>application/x-java-jnlp-file</mime-type>
     <!-- Additional mime-type elements can come here. -->
   </to>
   <sequence>
     <class>
       <name>be.re.repo.mod.DefaultOutTransformerFactory</name>
       <!-- Optional URL relative to maps.xml.
       <jar>modules/my_module.jar</jar>
     </class>
   </sequence>
 </out-transformer>
 
 

Author:
Werner Donné

Method Summary
 OutputStream create(String vcr, String version, OutputStream out, String fromMimeType, String toMimeType, Context context)
           
 

Method Detail

create

OutputStream create(String vcr,
                    String version,
                    OutputStream out,
                    String fromMimeType,
                    String toMimeType,
                    Context context)
                    throws IOException
Parameters:
vcr - the local path of the VCR.
version - the local path of the version.
out - the outputstream into which the transformed document should be written.
fromMimeType - the MIME type of the document in the repository.
toMimeType - the MIME type of the response stream.
context - the repository context.
Returns:
The return value is an output stream which wraps out and performs the transformation.
Throws:
IOException