T
- Type class extending RegistryBean
public class ClassifiedInstancesObjectFactory<T extends RegistryBean> extends BaseObjectFactory<T>
ObjectFactory
interface for handing ClassifiedInstances
annotations.
Determines the actual bean type based on classifications on the RegistryObject
.Constructor and Description |
---|
ClassifiedInstancesObjectFactory() |
Modifier and Type | Method and Description |
---|---|
javax.xml.registry.infomodel.RegistryObject |
createRegistryObject(RegistryBean registryBean)
Creates
RegistryObject instance from the given RegistryBean based on configuration. |
static javax.xml.registry.infomodel.Classification |
findClassification(javax.xml.registry.infomodel.RegistryObject registryObject,
ClassifiedInstance classificationAnnotation,
PersistenceContext context)
Finds the classification specified with the
ClassifiedInstance annotation classification on the given registry object. |
createInstance, createRegistryBean, getBaseBeanClass, getContext
public javax.xml.registry.infomodel.RegistryObject createRegistryObject(RegistryBean registryBean) throws MappingException, javax.xml.registry.JAXRException
RegistryObject
instance from the given RegistryBean
based on configuration.
Additionally adds classification based on the specified in the
ClassifiedInstances
annotation concept path.createRegistryObject
in interface ObjectFactory<T extends RegistryBean>
createRegistryObject
in class BaseObjectFactory<T extends RegistryBean>
registryBean
- The RegistryBean
objectRegistryObject
.MappingException
- If an error occurs while mapping the bean object to JAXRjavax.xml.registry.JAXRException
- If a JAXR error occurs while creating the registry objectpublic static javax.xml.registry.infomodel.Classification findClassification(javax.xml.registry.infomodel.RegistryObject registryObject, ClassifiedInstance classificationAnnotation, PersistenceContext context) throws javax.xml.registry.JAXRException
ClassifiedInstance
annotation classification on the given registry object.registryObject
- The RegistryObject
to look for classificationclassificationAnnotation
- The ClassifiedInstance
annotation to look forcontext
- The PersistenceContext
instanceClassification
instance found or null
if not foundjavax.xml.registry.JAXRException
- If a JAXR error occurs while looking for the classification