Package org.jboss.beans.metadata.spi.factory

Examples of org.jboss.beans.metadata.spi.factory.GenericBeanFactoryMetaData$PropertyMap


      assertNull(factory.getUninstallCallbacks());
   }

   public void testBeanFactoryWithInstallCallback() throws Exception
   {
      GenericBeanFactoryMetaData factory = unmarshalBeanFactory("BeanFactoryWithInstallCallback.xml");
      assertNull(factory.getName());
      assertEquals("Dummy", factory.getBean());
      assertNull(factory.getMode());
      assertNull(factory.getAnnotations());
      assertNull(factory.getClassLoader());
      assertNull(factory.getConstructor());
      assertNull(factory.getProperties());
      assertNull(factory.getCreate());
      assertNull(factory.getStart());
      assertNull(factory.getDemands());
      assertNull(factory.getSupplies());
      assertNull(factory.getInstalls());
      assertNull(factory.getUninstalls());
      ArrayList<String> expected = new ArrayList<String>();
      expected.add("Install1");
      assertCallbacks(expected, factory.getInstallCallbacks());
      assertNull(factory.getUninstallCallbacks());
   }
View Full Code Here


      assertNull(factory.getUninstallCallbacks());
   }

   public void testBeanFactoryWithInstallCallbacks() throws Exception
   {
      GenericBeanFactoryMetaData factory = unmarshalBeanFactory("BeanFactoryWithInstallCallbacks.xml");
      assertNull(factory.getName());
      assertEquals("Dummy", factory.getBean());
      assertNull(factory.getMode());
      assertNull(factory.getAnnotations());
      assertNull(factory.getClassLoader());
      assertNull(factory.getConstructor());
      assertNull(factory.getProperties());
      assertNull(factory.getCreate());
      assertNull(factory.getStart());
      assertNull(factory.getDemands());
      assertNull(factory.getSupplies());
      assertNull(factory.getInstalls());
      assertNull(factory.getUninstalls());
      ArrayList<String> expected = new ArrayList<String>();
      expected.add("Install1");
      expected.add("Install2");
      expected.add("Install3");
      assertCallbacks(expected, factory.getInstallCallbacks());
      assertNull(factory.getUninstallCallbacks());
   }
View Full Code Here

      assertNull(factory.getUninstallCallbacks());
   }

   public void testBeanFactoryWithUninstallCallback() throws Exception
   {
      GenericBeanFactoryMetaData factory = unmarshalBeanFactory("BeanFactoryWithUninstallCallback.xml");
      assertNull(factory.getName());
      assertEquals("Dummy", factory.getBean());
      assertNull(factory.getMode());
      assertNull(factory.getAnnotations());
      assertNull(factory.getClassLoader());
      assertNull(factory.getConstructor());
      assertNull(factory.getProperties());
      assertNull(factory.getCreate());
      assertNull(factory.getStart());
      assertNull(factory.getDemands());
      assertNull(factory.getSupplies());
      assertNull(factory.getInstalls());
      assertNull(factory.getUninstalls());
      assertNull(factory.getInstallCallbacks());
      ArrayList<String> expected = new ArrayList<String>();
      expected.add("Uninstall1");
      assertCallbacks(expected, factory.getUninstallCallbacks());
   }
View Full Code Here

      assertCallbacks(expected, factory.getUninstallCallbacks());
   }

   public void testBeanFactoryWithUninstallCallbacks() throws Exception
   {
      GenericBeanFactoryMetaData factory = unmarshalBeanFactory("BeanFactoryWithUninstallCallbacks.xml");
      assertNull(factory.getName());
      assertEquals("Dummy", factory.getBean());
      assertNull(factory.getMode());
      assertNull(factory.getAnnotations());
      assertNull(factory.getClassLoader());
      assertNull(factory.getConstructor());
      assertNull(factory.getConstructor());
      assertNull(factory.getProperties());
      assertNull(factory.getProperties());
      assertNull(factory.getCreate());
      assertNull(factory.getStart());
      assertNull(factory.getDemands());
      assertNull(factory.getSupplies());
      assertNull(factory.getInstalls());
      assertNull(factory.getUninstalls());
      assertNull(factory.getInstallCallbacks());
      ArrayList<String> expected = new ArrayList<String>();
      expected.add("Uninstall1");
      expected.add("Uninstall2");
      expected.add("Uninstall3");
      assertCallbacks(expected, factory.getUninstallCallbacks());
   }
View Full Code Here

      {
         String name = factory.name();
         if (name == null)
            throw new IllegalArgumentException("Null bean name: " + factory);

         GenericBeanFactoryMetaData gbfmd = new GenericBeanFactoryMetaData(name, clazz.getName());
         Class<?> factoryClass = factory.getFactoryClass();
         if (void.class.equals(factoryClass) == false)
            gbfmd.setFactoryClass(factoryClass.getName());
         String[] aliases = factory.aliases();
         if (aliases != null && aliases.length > 0)
         {
            Set<AliasMetaData> aliasesMD = new HashSet<AliasMetaData>();
            for (String alias : aliases)
            {
               AbstractAliasMetaData aamd = new AbstractAliasMetaData();
               aamd.setAlias(alias);
               aliasesMD.add(aamd);
            }
            gbfmd.setAliases(aliasesMD);
         }
         gbfmd.setMode(factory.mode());
         gbfmd.setAccessMode(factory.accessMode());

         return gbfmd.getBeanMetaData();
      }
View Full Code Here

TOP

Related Classes of org.jboss.beans.metadata.spi.factory.GenericBeanFactoryMetaData$PropertyMap

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.