Public Member Functions | |
CastorUnmarshalMapper (Object delegate, Logger logger) | |
boolean | canTranslate (Class<?> oldObjClass, Class<?> newObjClass, ComponentInvocationHandler invHandler) |
Package Functions | |
public< T > Object | translate (Object oldObject, T newObjectTemplate, Class< T > newObjectClass, ComponentInvocationHandler invHandler) throws DynWrapperException |
A type mapper that takes the IDL struct used for CORBA transport of xml entity objects (XmlEntityStruct
) and instantiates the correct Castor binding class from the stringified xml.
alma.acs.component.dynwrapper.CastorUnmarshalMapper.CastorUnmarshalMapper | ( | Object | delegate, | |
Logger | logger | |||
) |
Constructor for CastorUnmarshalMapper.
delegate |
boolean alma.acs.component.dynwrapper.CastorUnmarshalMapper.canTranslate | ( | Class<?> | oldObjClass, | |
Class<?> | newObjClass, | |||
ComponentInvocationHandler | invHandler | |||
) | [virtual] |
Implements alma.acs.component.dynwrapper.TypeMapper.
References alma.acs.component.dynwrapper.TypeMapper.m_logger, alma.acs.component.dynwrapper.TypeMapper.m_verbose, org.exolab.castor.xml.util.ClassDescriptorResolverImpl.resolve(), and org.exolab.castor.xml.util.ClassDescriptorResolverImpl.setIntrospection().
public<T> Object alma.acs.component.dynwrapper.CastorUnmarshalMapper.translate | ( | Object | oldObject, | |
T | newObjectTemplate, | |||
Class< T > | newObjectClass, | |||
ComponentInvocationHandler | invHandler | |||
) | throws DynWrapperException [package, virtual] |
Translates an XmlEntityStruct
to a Castor binding object graph.
This will only happen for in
-parameters (server-side) or return values (client-side), since xml entities as out
or inout
-parameters will be mapped to XmlEntityStructHolder
s instead of XmlEntityStruct
s. Therefore preserving object identity (parameter newObjectTemplate
) is not an issue.
Returns null if the XmlEntityStruct
or the contained XML is null, or if the XML string is empty or whitespace only. Throws an exception if the XML is syntactically invalid.
Implements alma.acs.component.dynwrapper.TypeMapper.
References org.exolab.castor.xml.Unmarshaller.setValidation(), org.exolab.castor.xml.Unmarshaller.setWhitespacePreserve(), and org.exolab.castor.xml.Unmarshaller.unmarshal().