
Public Member Functions | |
| Object | deserializeEntity (String xmlString, Class entityClass) throws EntityException |
| Object | deserializeEntity (XmlEntityStruct xes, Class entityClass) throws EntityException |
Static Public Member Functions | |
| static EntityDeserializer | getEntityDeserializer (Logger logger) |
Private Member Functions | |
| EntityDeserializer (Logger logger) | |
| Object | deserializeEntity (String xmlString, Class entityClass, String timestamp) throws EntityException |
Private Attributes | |
| Logger | m_logger |
| EntityTFinder | m_finder |
Static Private Attributes | |
| static EntityDeserializer | s_entityDeserializer |
Helper class to convert serialized XML entities from the ALMA project data model (APDM) to their Java binding class representations.
Note that normally a Java component does not need to explicitly perform this conversion, since the Java container translates between the XML-string representation that goes over CORBA, and the binding class (tree) that the custom-generated component's Java interface uses as parameters or return value.
However, there is a case where a Java component should use the EntityDeserializer: Applications receiving XML data from the ALMA archive: the archive does currently not offer a type-safe interface for APDM entities. Use deserializeEntity(XmlEntityStruct, Class) to convert the XmlEntityStruct you get from the archive into a Java binding object tree whose root node is an instance of the specified Class.
| alma::acs::entityutil::EntityDeserializer::EntityDeserializer | ( | Logger | logger | ) | [inline, private] |
| Object alma::acs::entityutil::EntityDeserializer::deserializeEntity | ( | XmlEntityStruct | xes, | |
| Class | entityClass | |||
| ) | throws EntityException [inline] |
Deserializes (parses) the entity xml contained in xes and instantiates the binding objects.
| xes | the struct used for CORBA transport of serialized entity objects. | |
| entityClass | the binding class of which we want an instance filled with the xml data, e.g. SchedBlock.class. |
entityClass by the caller). | EntityException |
References deserializeEntity().
| Object alma::acs::entityutil::EntityDeserializer::deserializeEntity | ( | String | xmlString, | |
| Class | entityClass, | |||
| String | timestamp | |||
| ) | throws EntityException [inline, private] |
Deserializes (parses) an entity xml and instantiates the binding objects.
| xmlString | the stringified xml. | |
| entityClass | the binding class of which we want an instance filled with the xml data. | |
| timestamp | the timestamp to be stored in the entity object, for later serialization. |
| EntityException | if the binding class instance can't be constructed from the xml. Note that this exception is only logged at FINER level by this method, so make sure to log it appropriately. |
References alma::acs::entityutil::EntityTFinder::extractEntityT(), m_finder, and m_logger.
| Object alma::acs::entityutil::EntityDeserializer::deserializeEntity | ( | String | xmlString, | |
| Class | entityClass | |||
| ) | throws EntityException [inline] |
Deserializes (parses) an entity xml and instantiates the binding objects.
| xmlString | the stringified xml. | |
| entityClass | the binding class of which we want an instance filled with the xml data. |
EntityT, this method will produce binding classes whose XML data can't be stored in the archive. Referenced by deserializeEntity(), and alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::xmlInOutMethod().
| static EntityDeserializer alma::acs::entityutil::EntityDeserializer::getEntityDeserializer | ( | Logger | logger | ) | [inline, static] |
Singleton accessor.
| logger | Logger to be used (may be null in subsequent invocations since only one instance of EntityDeserializer is constructed and then reused) |
References EntityDeserializer(), and s_entityDeserializer.
Referenced by deserializeEntity(), and EntityDeserializer().
Logger alma::acs::entityutil::EntityDeserializer::m_logger [private] |
Referenced by deserializeEntity(), and EntityDeserializer().
EntityDeserializer alma::acs::entityutil::EntityDeserializer::s_entityDeserializer [static, private] |
Referenced by getEntityDeserializer().
1.6.2