alma::acs::entityutil::EntitySerializer Class Reference

Collaboration diagram for alma::acs::entityutil::EntitySerializer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void setXmlEntityFactory (XmlEntityStructFactory esf)
XmlEntityStruct serializeEntity (Object entityObject, EntityT entityMeta) throws EntityException
XmlEntityStruct serializeEntity (Object entityObject) throws EntityException
String serializeEntityPart (Object entityPart) throws EntityException
void setVerbose (boolean verbose)

Static Public Member Functions

static EntitySerializer getEntitySerializer (Logger logger)

Private Member Functions

 EntitySerializer (Logger logger)

Private Attributes

Logger m_logger
boolean m_verbose
XmlEntityStructFactory m_esf
EntityTFinder m_finder

Static Private Attributes

static EntitySerializer s_entitySerializer

Detailed Description

Serializes entity objects. These are instances of binding classes that represent the XML data in a type-safe Java API. Currently all binding classes are generated using the Castor tool.

Author:
hsommer May 6, 2003 5:31:48 PM

Constructor & Destructor Documentation

alma::acs::entityutil::EntitySerializer::EntitySerializer ( Logger  logger  )  [inline, private]

References m_esf, m_finder, m_logger, and setVerbose().

Referenced by getEntitySerializer().


Member Function Documentation

static EntitySerializer alma::acs::entityutil::EntitySerializer::getEntitySerializer ( Logger  logger  )  [inline, static]

Singleton accessor.

Parameters:
logger Logger to be used (may be null in subsequent invocations since only one instance of EntitySerializer is constructed and then reused)
Returns:
single instance

References EntitySerializer(), and s_entitySerializer.

Referenced by alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::IFTranslator(), and alma::acs::entityutil::EntitySerializerTest::setUp().

XmlEntityStruct alma::acs::entityutil::EntitySerializer::serializeEntity ( Object  entityObject  )  throws EntityException [inline]

Marshals an entity object to the CORBA struct used for transport. Unlike in serializeEntity(Object, EntityT), the child of type EntityT that has the administrational information about the entity object, is not given as a parameter. It will be accessed dynamically using EntityTFinder, which makes this method slightly slower than its 2-parameter companion. It's meant to be used rather by generic code that doesn't know about particular entity classes.

Parameters:
entityObject the entity object as a binding class
Returns:
the struct that contains the stringified xml and some other data; null if entityObject is null.

References alma::acs::entityutil::EntityTFinder::extractEntityT(), m_finder, and serializeEntity().

XmlEntityStruct alma::acs::entityutil::EntitySerializer::serializeEntity ( Object  entityObject,
EntityT  entityMeta 
) throws EntityException [inline]
String alma::acs::entityutil::EntitySerializer::serializeEntityPart ( Object  entityPart  )  throws EntityException [inline]

Serializes a binding class object which is a part (child node) of some other full Entity object.

Parameters:
entityPart the binding object, e.g. of type alma.entity.xmlbinding.schedblock.CorrelatorConfigT.
Returns:
a plain XML String that represents the data of entityPart.
Exceptions:
EntityException if the operation could not be performed
See also:
serializeEntity(Object)
serializeEntity(Object, EntityT)

Referenced by serializeEntity().

void alma::acs::entityutil::EntitySerializer::setVerbose ( boolean  verbose  )  [inline]
void alma::acs::entityutil::EntitySerializer::setXmlEntityFactory ( XmlEntityStructFactory  esf  )  [inline]

Makes this EntitySerializer use a client-supplied factory for XmlEntityStruct objects.

You should use this method if you wish to get a subclass of alma.xmlentity.XmlEntityStruct returned from the serializeEntity methods.

Parameters:
esf the factory to be used

References m_esf.


Member Data Documentation

Referenced by EntitySerializer().

Referenced by setVerbose().

Referenced by getEntitySerializer().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2