org.apache.cocoon.portal.persistence
Interface Converter

All Known Implementing Classes:
CastorSourceConverter

public interface Converter

This is a component that converts a profile (= object tree) to a persistence format.

Version:
$Id: Converter.java 328453 2005-10-25 19:08:53Z cziegeler $

Field Summary
static String ROLE
          The role to lookup this component.
 
Method Summary
 Object getObject(InputStream stream, String profileType, Map references, Map parameters)
          Load an object from the given input stream.
 void storeObject(OutputStream stream, String profileType, Object object, Map parameters)
          Save an object to a given stream.
 

Field Detail

ROLE

public static final String ROLE
The role to lookup this component.

Method Detail

getObject

public Object getObject(InputStream stream,
                        String profileType,
                        Map references,
                        Map parameters)
                 throws ConverterException
Load an object from the given input stream.

Parameters:
stream - The input stream with the data.
profileType - ProfileLS
references - A map of references referenced from the profile.
parameters - An optional map of parameters for the conversion.
Returns:
The loaded object.
Throws:
ConverterException

storeObject

public void storeObject(OutputStream stream,
                        String profileType,
                        Object object,
                        Map parameters)
                 throws ConverterException
Save an object to a given stream.

Parameters:
stream - The output stream.
profileType - ProfileLS
object - The object to save.
parameters - An optional map of parameters for the conversion.
Throws:
ConverterException


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.