Package org.osgi.service.blueprint.reflect

Examples of org.osgi.service.blueprint.reflect.BeanProperty


            Node node = nl.item(i);
            if (node instanceof Element) {
                Element e = (Element) node;
                if (isCmNamespace(e.getNamespaceURI())) {
                    if (nodeNameEquals(e, PROPERTY_ELEMENT)) {
                        BeanProperty prop = context.parseElement(BeanProperty.class, enclosingComponent, e);
                        props.addEntry(createValue(context, prop.getName(), String.class.getName()), prop.getValue());
                    }
                }
            }
        }
        return props;
View Full Code Here


                Element e = (Element) node;
                if (BLUEPRINT_EXT_NAMESPACE_V1_0.equals(e.getNamespaceURI())
                        || BLUEPRINT_EXT_NAMESPACE_V1_1.equals(e.getNamespaceURI())
                        || BLUEPRINT_EXT_NAMESPACE_V1_2.equals(e.getNamespaceURI())) {
                    if (nodeNameEquals(e, PROPERTY_ELEMENT)) {
                        BeanProperty prop = context.parseElement(BeanProperty.class, enclosingComponent, e);
                        props.addEntry(createValue(context, prop.getName(), String.class.getName()), prop.getValue());
                    }
                }
            }
        }
        return props;
View Full Code Here

                Element e = (Element) node;
                if (BLUEPRINT_EXT_NAMESPACE_V1_0.equals(e.getNamespaceURI())
                        || BLUEPRINT_EXT_NAMESPACE_V1_1.equals(e.getNamespaceURI())
                        || BLUEPRINT_EXT_NAMESPACE_V1_2.equals(e.getNamespaceURI())) {
                    if (nodeNameEquals(e, PROPERTY_ELEMENT)) {
                        BeanProperty prop = context.parseElement(BeanProperty.class, enclosingComponent, e);
                        props.addEntry(createValue(context, prop.getName(), String.class.getName()), prop.getValue());
                    }
                }
            }
        }
        return props;
View Full Code Here

  @Test
  public void testUnit() {
    Element e = getTestElement("unit", root);
    BeanMetadata bean =
      (BeanMetadata) sut.decorate(e, new BeanMetadataImpl(), parserCtx);
    BeanProperty property = (BeanProperty) bean.getProperties().get(0);
    ReferenceMetadata reference = (ReferenceMetadata) property.getValue();
   
    assertEquals("emf", property.getName());
    assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
    assertEquals("(&(!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=myUnit))", reference.getFilter());
   
    Skeleton.getSkeleton(manager).assertSkeletonNotCalled();
   
View Full Code Here

  @Test
  public void testUnit_110() {
    Element e = getTestElement("unit", root_110);
    BeanMetadata bean =
      (BeanMetadata) sut.decorate(e, new BeanMetadataImpl(), parserCtx);
    BeanProperty property = (BeanProperty) bean.getProperties().get(0);
    ReferenceMetadata reference = (ReferenceMetadata) property.getValue();
   
    assertEquals("emf", property.getName());
    assertEquals(EntityManagerFactory.class.getName(), reference.getInterface());
    assertEquals("(&(!(org.apache.aries.jpa.proxy.factory=*))(osgi.unit.name=myUnit))", reference.getFilter());
   
    Skeleton.getSkeleton(manager).assertSkeletonNotCalled();
   
View Full Code Here

  @Test
  public void testUnitNoName() {
    Element e = getTestElement("unitNoName", root);
    BeanMetadata bean =
      (BeanMetadata) sut.decorate(e, new BeanMetadataImpl(), parserCtx);
    BeanProperty property = (BeanProperty) bean.getProperties().get(0);
    ReferenceMetadata reference = (ReferenceMetadata) property.getValue();
   
    assertEquals("emf2", property.getName());
    assertEquals("(&(!(org.apache.aries.jpa.proxy.factory=*))"+NSHandler.EMPTY_UNIT_NAME_FILTER+")",
        reference.getFilter());

    assertTrue(registeredComponents.isEmpty());
  }
View Full Code Here

  @Test
  public void testUnitNoName_110() {
    Element e = getTestElement("unitNoName", root_110);
    BeanMetadata bean =
      (BeanMetadata) sut.decorate(e, new BeanMetadataImpl(), parserCtx);
    BeanProperty property = (BeanProperty) bean.getProperties().get(0);
    ReferenceMetadata reference = (ReferenceMetadata) property.getValue();
   
    assertEquals("emf2", property.getName());
    assertEquals("(&(!(org.apache.aries.jpa.proxy.factory=*))"+NSHandler.EMPTY_UNIT_NAME_FILTER+")",
        reference.getFilter());

    assertTrue(registeredComponents.isEmpty());
  }
View Full Code Here

  @Test
  public void testEmptyUnitName() {
    Element e = getTestElement("emptyUnitName", root);
    BeanMetadata bean =
      (BeanMetadata) sut.decorate(e, new BeanMetadataImpl(), parserCtx);
    BeanProperty property = (BeanProperty) bean.getProperties().get(0);
    ReferenceMetadata reference = (ReferenceMetadata) property.getValue();
   
    assertEquals("emf3", property.getName());
    assertEquals("(&(!(org.apache.aries.jpa.proxy.factory=*))"+NSHandler.EMPTY_UNIT_NAME_FILTER+")",
        reference.getFilter());
   
    assertTrue(registeredComponents.isEmpty());
  }
View Full Code Here

  @Test
  public void testEmptyUnitName_110() {
    Element e = getTestElement("emptyUnitName", root_110);
    BeanMetadata bean =
      (BeanMetadata) sut.decorate(e, new BeanMetadataImpl(), parserCtx);
    BeanProperty property = (BeanProperty) bean.getProperties().get(0);
    ReferenceMetadata reference = (ReferenceMetadata) property.getValue();
   
    assertEquals("emf3", property.getName());
    assertEquals("(&(!(org.apache.aries.jpa.proxy.factory=*))"+NSHandler.EMPTY_UNIT_NAME_FILTER+")",
        reference.getFilter());
   
    assertTrue(registeredComponents.isEmpty());
  }
View Full Code Here

            if (node instanceof Element) {
                Element e = (Element) node;
                if (BLUEPRINT_CM_NAMESPACE_1_0.equals(e.getNamespaceURI())
                        || BLUEPRINT_CM_NAMESPACE_1_1.equals(e.getNamespaceURI())) {
                    if (nodeNameEquals(e, PROPERTY_ELEMENT)) {
                        BeanProperty prop = context.parseElement(BeanProperty.class, enclosingComponent, e);
                        props.addEntry(createValue(context, prop.getName(), String.class.getName()), prop.getValue());
                    }
                }
            }
        }
        return props;
View Full Code Here

TOP

Related Classes of org.osgi.service.blueprint.reflect.BeanProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.