Search in sources :

Example 96 with MutableBeanMetadata

use of org.apache.aries.blueprint.mutable.MutableBeanMetadata in project cxf by apache.

the class RMBPBeanDefinitionParser method parse.

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(RM_NS, "RM10AddressingNamespace"), "RM10AddressingNamespace", RM10AddressingNamespaceType.class);
    mapElementToJaxbProperty(context, bean, element, new QName("http://schemas.xmlsoap.org/ws/2005/02/rm/policy", "RMAssertion"), "RMAssertion", org.apache.cxf.ws.rmp.v200502.RMAssertion.class);
    // TODO: handle
    // mapElementToJaxbProperty(context, bean, element,
    // new QName("http://docs.oasis-open.org/ws-rx/wsrmp/200702", "RMAssertion"),
    // "RMAssertion",
    // org.apache.cxf.ws.rmp.v200702.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;
}
Also used : MutableBeanMetadata(org.apache.aries.blueprint.mutable.MutableBeanMetadata) QName(javax.xml.namespace.QName)

Aggregations

MutableBeanMetadata (org.apache.aries.blueprint.mutable.MutableBeanMetadata)96 Element (org.w3c.dom.Element)23 Node (org.w3c.dom.Node)20 MutablePassThroughMetadata (org.apache.aries.blueprint.mutable.MutablePassThroughMetadata)19 Metadata (org.osgi.service.blueprint.reflect.Metadata)19 MutableRefMetadata (org.apache.aries.blueprint.mutable.MutableRefMetadata)18 ComponentDefinitionException (org.osgi.service.blueprint.container.ComponentDefinitionException)18 MutableCollectionMetadata (org.apache.aries.blueprint.mutable.MutableCollectionMetadata)17 BeanMetadata (org.osgi.service.blueprint.reflect.BeanMetadata)16 ComponentMetadata (org.osgi.service.blueprint.reflect.ComponentMetadata)15 MutableValueMetadata (org.apache.aries.blueprint.mutable.MutableValueMetadata)13 RefMetadata (org.osgi.service.blueprint.reflect.RefMetadata)12 NodeList (org.w3c.dom.NodeList)11 MutableMapMetadata (org.apache.aries.blueprint.mutable.MutableMapMetadata)10 PassThroughMetadata (org.apache.aries.blueprint.PassThroughMetadata)9 JAXBException (javax.xml.bind.JAXBException)8 CollectionMetadata (org.osgi.service.blueprint.reflect.CollectionMetadata)8 ValueMetadata (org.osgi.service.blueprint.reflect.ValueMetadata)8 ExpressionNode (org.apache.camel.model.ExpressionNode)7 Attr (org.w3c.dom.Attr)7