org.apache.cocoon.components.persistence
Class CastorSourceConverter

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.persistence.CastorSourceConverter
All Implemented Interfaces:
Initializable, Component, Configurable, LogEnabled, Serviceable, ThreadSafe

public class CastorSourceConverter
extends AbstractLogEnabled
implements Component, Serviceable, Configurable, Initializable, ThreadSafe

This is a component converting the profiles (= object tree) to XML and vice-versa using Castor. It could be used to persist objects as a XML representation. In order to work properly the methods provided by this interface require some parameters: objectmap : containing a map of objects for resolving references during load profiletype: specifying the mapping (e.g. in the portal this is one of layout, copletinstancedata, copletdata or copletbasedate) suppressXSIType: Sets whether or not the xsi:type attributes should appear on the marshalled document.

Version:
CVS $Id: CastorSourceConverter.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler, Volker Schmitt, Björn Lütkemeier

Field Summary
static String ROLE
           
 
Constructor Summary
CastorSourceConverter()
           
 
Method Summary
 void configure(Configuration config)
           
 Object getObject(InputStream stream, Map parameters)
           
 void initialize()
           
 void service(ServiceManager manager)
           
 void storeObject(OutputStream stream, Map parameters, Object object)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE

public static final String ROLE
Constructor Detail

CastorSourceConverter

public CastorSourceConverter()
Method Detail

getObject

public Object getObject(InputStream stream,
                        Map parameters)
                 throws ConverterException
Throws:
ConverterException

storeObject

public void storeObject(OutputStream stream,
                        Map parameters,
                        Object object)
                 throws ConverterException
Throws:
ConverterException

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

configure

public void configure(Configuration config)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Throws:
Exception
See Also:
Initializable.initialize()


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.