Exemplo n.º 1
0
 @Override
 public Object getPropertyValue(Object id) {
   if (PROP_NAME.equals(id)) {
     return _model.getName();
   } else if (PROP_TARGET_NAMESPACE.equals(id)) {
     if (_model.getTargetNamespace() == null) {
       if (_model.getComposite() == null) {
         return null;
       }
       return _model.getComposite().getTargetNamespace();
     }
     return _model.getTargetNamespace();
   }
   return null;
 }
Exemplo n.º 2
0
 @Test
 public void testReadComplete() throws Exception {
   SwitchYardModel switchyard = _puller.pull(COMPLETE_XML, getClass());
   CompositeModel composite = switchyard.getComposite();
   ComponentModel component = composite.getComponents().get(0);
   ComponentImplementationModel implementation = component.getImplementation();
   Assert.assertTrue(implementation instanceof BeanComponentImplementationModel);
   BeanComponentImplementationModel bci = (BeanComponentImplementationModel) implementation;
   Assert.assertEquals("bean", bci.getType());
   Assert.assertEquals("org.switchyard.example.m1app.SimpleBean", bci.getClazz());
   Configuration config = bci.getModelConfiguration();
   Assert.assertEquals("implementation.bean", config.getName());
   QName qname = config.getQName();
   Assert.assertEquals("urn:switchyard-component-bean:config:1.0", qname.getNamespaceURI());
   Assert.assertEquals("implementation.bean", qname.getLocalPart());
 }