Package org.jboss.beans.metadata.plugins

Examples of org.jboss.beans.metadata.plugins.AbstractBeanMetaData.addProperty()


   }

   public void propertyDependencyCorrectOrder() throws Throwable
   {
      AbstractBeanMetaData metaData1 = new AbstractBeanMetaData("Name1", SimpleBeanImpl.class.getName());
      metaData1.addProperty(new AbstractPropertyMetaData("string", "String1"));
     
      GenericBeanFactoryMetaData metaData2 = new GenericBeanFactoryMetaData("Name2", SimpleBeanImpl.class.getName());
      metaData2.addBeanProperty(new AbstractPropertyMetaData("string", new AbstractDependencyValueMetaData("Name1", "string")));
     
      setBeanMetaDatas(new BeanMetaData[] { metaData1, metaData2 });
View Full Code Here


   }

   public void propertyDependencyWrongOrder() throws Throwable
   {
      AbstractBeanMetaData metaData1 = new AbstractBeanMetaData("Name1", SimpleBeanImpl.class.getName());
      metaData1.addProperty(new AbstractPropertyMetaData("string", "String1"));
     
      GenericBeanFactoryMetaData metaData2 = new GenericBeanFactoryMetaData("Name2", SimpleBeanImpl.class.getName());
      metaData2.addBeanProperty(new AbstractPropertyMetaData("string", new AbstractDependencyValueMetaData("Name1", "string")));
     
      setBeanMetaDatas(new BeanMetaData[] { metaData1, metaData2 });
View Full Code Here

   }

   public void propertyDependencyReinstall() throws Throwable
   {
      AbstractBeanMetaData metaData1 = new AbstractBeanMetaData("Name1", SimpleBeanImpl.class.getName());
      metaData1.addProperty(new AbstractPropertyMetaData("string", "String1"));
     
      GenericBeanFactoryMetaData metaData2 = new GenericBeanFactoryMetaData("Name2", SimpleBeanImpl.class.getName());
      metaData2.addBeanProperty(new AbstractPropertyMetaData("string", new AbstractDependencyValueMetaData("Name1", "string")));
     
      setBeanMetaDatas(new BeanMetaData[] { metaData1, metaData2 });
View Full Code Here

   }

   protected void buildMetaData()
   {
      AbstractBeanMetaData metaData1 = new AbstractBeanMetaData("Name1", SimpleBeanImpl.class.getName());
      metaData1.addProperty(new AbstractPropertyMetaData("string", "String1"));

      GenericBeanFactoryMetaData metaData2 = createBeanFactory();
      addBeanProperty(metaData2, new AbstractPropertyMetaData("string", new AbstractDependencyValueMetaData("Name1", "string")));

      setBeanMetaDatas(new BeanMetaData[] { metaData1, metaData2.getBeans().get(0) });
View Full Code Here

      AbstractBeanMetaData abmd = new AbstractBeanMetaData("Bean1", NullifyTestBean1.class.getName());
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(abmd);
      AbstractPropertyMetaData property = new AbstractPropertyMetaData("something", builder.createMap(null, String.class.getName(), String.class.getName()));
      property.setPropertyType(Map.class.getName());
      abmd.addProperty(property);

      KernelControllerContext context = controller.install(builder.getBeanMetaData());
      controller.change(context, ControllerState.INSTANTIATED);
      assertEquals(ControllerState.INSTANTIATED, context.getState());
      assertFalse(describe.error);
View Full Code Here

      Kernel kernel = bootstrap();
      KernelConfigurator configurator = kernel.getConfigurator();

      AbstractBeanMetaData bmd = new AbstractBeanMetaData(SimpleBean.class.getName());
      AbstractPropertyMetaData prop1 = new AbstractPropertyMetaData("anint", 123.456);
      bmd.addProperty(prop1);
      StringValueMetaData svmd = new StringValueMetaData("987.6543");
      svmd.setType("java.lang.Double");
      svmd.setConfigurator(configurator);
      AbstractPropertyMetaData prop2 = new AbstractPropertyMetaData("AShort", svmd);
      bmd.addProperty(prop2);
View Full Code Here

      bmd.addProperty(prop1);
      StringValueMetaData svmd = new StringValueMetaData("987.6543");
      svmd.setType("java.lang.Double");
      svmd.setConfigurator(configurator);
      AbstractPropertyMetaData prop2 = new AbstractPropertyMetaData("AShort", svmd);
      bmd.addProperty(prop2);
      AbstractPropertyMetaData prop3 = new AbstractPropertyMetaData("AFloat", 314159);
      bmd.addProperty(prop3);

      return (SimpleBean) instantiateAndConfigure(configurator, bmd);
   }
View Full Code Here

      svmd.setType("java.lang.Double");
      svmd.setConfigurator(configurator);
      AbstractPropertyMetaData prop2 = new AbstractPropertyMetaData("AShort", svmd);
      bmd.addProperty(prop2);
      AbstractPropertyMetaData prop3 = new AbstractPropertyMetaData("AFloat", 314159);
      bmd.addProperty(prop3);

      return (SimpleBean) instantiateAndConfigure(configurator, bmd);
   }

}
View Full Code Here

   protected AbstractBeanMetaData buildRepository()
   {
      AbstractBeanMetaData repository = new AbstractBeanMetaData("Name1", SimpleBeanDelegate.class.getName());
      AbstractInjectionValueMetaData vmd = new AbstractInjectionValueMetaData("Name2");
      vmd.setInjectionOption(InjectOption.OPTIONAL);
      repository.addProperty(new AbstractPropertyMetaData("delegate", vmd));
      return repository;
   }
}
View Full Code Here

public class TestBeanMetaDataFactory extends JBossObject implements BeanMetaDataFactory
{
   public List<BeanMetaData> getBeans()
   {
      AbstractBeanMetaData bean1 = new AbstractBeanMetaData("Name1", SimpleBeanImpl.class.getName());
      bean1.addProperty(new AbstractPropertyMetaData("bean", new AbstractDependencyValueMetaData("Name2")));
      AbstractBeanMetaData bean2 = new AbstractBeanMetaData("Name2", SimpleBeanImpl.class.getName());
      ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
      result.add(bean1);
      result.add(bean2);
      return result;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.