public RMBPBeanDefinitionParser(Class<?> beanClass) {
this.beanClass = beanClass;
}
protected Metadata parse(Element element, ParserContext context) {
MutableBeanMetadata bean = context.createMetadata(MutableBeanMetadata.class);
bean.setRuntimeClass(beanClass);
String bus = element.getAttribute("bus");
if (StringUtils.isEmpty(bus)) {
bus = "cxf";
}
mapElementToJaxbProperty(context, bean, element,
new QName(RM_NS, "deliveryAssurance"), "deliveryAssurance", DeliveryAssuranceType.class);
mapElementToJaxbProperty(context, bean, element,
new QName(RM_NS, "sourcePolicy"), "sourcePolicy", SourcePolicyType.class);
mapElementToJaxbProperty(context, bean, element,
new QName(RM_NS, "destinationPolicy"), "destinationPolicy", DestinationPolicyType.class);
mapElementToJaxbProperty(context, bean, element,
new QName("http://schemas.xmlsoap.org/ws/2005/02/rm/policy", "RMAssertion"),
"RMAssertion",
org.apache.cxf.ws.rm.policy.RMAssertion.class);
mapElementToJaxbProperty(context, bean, element,
new QName("http://docs.oasis-open.org/ws-rx/wsrmp/200702", "RMAssertion"),
"RMAssertion",
org.apache.cxf.ws.rm.policy.RMAssertion.class);
parseAttributes(element, context, bean);
parseChildElements(element, context, bean);
bean.setId(beanClass.getName() + context.generateId());
if (beanClass.equals(RMManager.class)) {
bean.addProperty("bus", getBusRef(context, bus));
bean.setDestroyMethod("shutdown");
}
return bean;
}