
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 |
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.
| alma::acs::entityutil::EntitySerializer::EntitySerializer | ( | Logger | logger | ) | [inline, private] |
References m_esf, m_finder, m_logger, and setVerbose().
Referenced by getEntitySerializer().
| static EntitySerializer alma::acs::entityutil::EntitySerializer::getEntitySerializer | ( | Logger | logger | ) | [inline, static] |
Singleton accessor.
| logger | Logger to be used (may be null in subsequent invocations since only one instance of EntitySerializer is constructed and then reused) |
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.
| entityObject | the entity object as a binding class |
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] |
Marshals an entity object to the CORBA struct used for transport.
| entityObject | the entity object as a binding class, currently generated by castor. | |
| entityMeta | usually subtype of EntityT. |
entityObject is null. References alma::acs::entityutil::XmlEntityStructFactory::createXmlEntityStruct(), alma::xmlentity::XmlEntityStruct::entityId, alma::xmlentity::XmlEntityStruct::entityTypeName, m_esf, alma::xmlentity::XmlEntityStruct::schemaVersion, serializeEntityPart(), alma::xmlentity::XmlEntityStruct::timeStamp, and alma::xmlentity::XmlEntityStruct::xmlString.
Referenced by alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::createObsProposal(), alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::getAllSchedBlocks(), alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::getBestSchedBlock(), alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::getEntireTreeInAStruct(), serializeEntity(), alma::acs::entityutil::EntitySerializerTest::testSerializeNonCastor(), alma::acs::entityutil::EntitySerializerTest::testSerializeNull(), alma::acs::entityutil::EntitySerializerTest::testSerializeObsProposal(), and alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::xmlInOutMethod().
| 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.
| entityPart | the binding object, e.g. of type alma.entity.xmlbinding.schedblock.CorrelatorConfigT. |
entityPart. | EntityException | if the operation could not be performed |
Referenced by serializeEntity().
| void alma::acs::entityutil::EntitySerializer::setVerbose | ( | boolean | verbose | ) | [inline] |
References m_finder, m_verbose, and alma::acs::entityutil::EntityTFinder::setVerbose().
Referenced by EntitySerializer().
| 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.
| esf | the factory to be used |
References m_esf.
Referenced by EntitySerializer(), serializeEntity(), and setXmlEntityFactory().
Referenced by EntitySerializer(), serializeEntity(), and setVerbose().
Logger alma::acs::entityutil::EntitySerializer::m_logger [private] |
Referenced by EntitySerializer().
boolean alma::acs::entityutil::EntitySerializer::m_verbose [private] |
Referenced by setVerbose().
EntitySerializer alma::acs::entityutil::EntitySerializer::s_entitySerializer [static, private] |
Referenced by getEntitySerializer().
1.6.2