Package org.jboss.beans.metadata.plugins

Examples of org.jboss.beans.metadata.plugins.AbstractRelatedClassMetaData


      return this;
   }

   public RelatedClassMetaData createRelated(String className, Object... enabled)
   {
      AbstractRelatedClassMetaData related = new AbstractRelatedClassMetaData();
      related.setClassName(className);
      if (enabled != null && enabled.length > 0)
         related.setEnabled(new HashSet<Object>(Arrays.asList(enabled)));
      return related;
   }
View Full Code Here


      assertNull(bean.getInstalls());
      assertNull(bean.getUninstalls());
      assertNull(bean.getInstallCallbacks());
      assertNull(bean.getUninstallCallbacks());
      Set<RelatedClassMetaData> expected = new HashSet<RelatedClassMetaData>();
      expected.add(new AbstractRelatedClassMetaData("Dummy"));
      assertEquals(expected, bean.getRelated());
   }
View Full Code Here

      assertNull(bean.getInstalls());
      assertNull(bean.getUninstalls());
      assertNull(bean.getInstallCallbacks());
      assertNull(bean.getUninstallCallbacks());
      Set<RelatedClassMetaData> expected = new HashSet<RelatedClassMetaData>();
      expected.add(new AbstractRelatedClassMetaData("Dummy"));
      AbstractRelatedClassMetaData arcmd = new AbstractRelatedClassMetaData("Dummy");
      arcmd.setEnabledValue("md");
      expected.add(arcmd);
      assertEquals(expected, bean.getRelated());
   }
View Full Code Here

      assertSame(abmd, beans.get(0));
   }

   public void testRelatedClassName() throws Throwable
   {
      RelatedClassMetaData rcmd = new AbstractRelatedClassMetaData(Object.class.getName());
      Set<RelatedClassMetaData> related = new HashSet<RelatedClassMetaData>();
      related.add(rcmd);

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Bean");
      builder.addRelatedClass(Object.class.getName());
View Full Code Here

      assertEquals(related, bmd.getRelated());
   }

   public void testRelatedClassNameWithEnabled() throws Throwable
   {
      AbstractRelatedClassMetaData rcmd = new AbstractRelatedClassMetaData(Object.class.getName());
      rcmd.setEnabledValue("aop");
      Set<RelatedClassMetaData> related = new HashSet<RelatedClassMetaData>();
      related.add(rcmd);

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Bean");
      builder.addRelatedClass(Object.class.getName(), "aop");
View Full Code Here

      assertEquals(related, bmd.getRelated());
   }

   public void testMultipleRelatedClassNameWithMultipleEnabled() throws Throwable
   {
      AbstractRelatedClassMetaData rcmd1 = new AbstractRelatedClassMetaData(Object.class.getName());
      rcmd1.setEnabled(new HashSet<Object>(Arrays.asList("aop", "md")));
      AbstractRelatedClassMetaData rcmd2 = new AbstractRelatedClassMetaData(String.class.getName());
      rcmd2.setEnabled(new HashSet<Object>(Arrays.asList("qwert", "foobar")));

      Set<RelatedClassMetaData> related = new HashSet<RelatedClassMetaData>();
      related.add(rcmd1);
      related.add(rcmd2);
View Full Code Here

      assertNull(bean.getInstalls());
      assertNull(bean.getUninstalls());
      assertNull(bean.getInstallCallbacks());
      assertNull(bean.getUninstallCallbacks());
      Set<RelatedClassMetaData> expected = new HashSet<RelatedClassMetaData>();
      expected.add(new AbstractRelatedClassMetaData("Dummy"));
      assertEquals(expected, bean.getRelated());
   }
View Full Code Here

      assertNull(bean.getInstalls());
      assertNull(bean.getUninstalls());
      assertNull(bean.getInstallCallbacks());
      assertNull(bean.getUninstallCallbacks());
      Set<RelatedClassMetaData> expected = new HashSet<RelatedClassMetaData>();
      expected.add(new AbstractRelatedClassMetaData("Dummy"));
      AbstractRelatedClassMetaData arcmd = new AbstractRelatedClassMetaData("Dummy");
      arcmd.setEnabledValue("md");
      expected.add(arcmd);
      assertEquals(expected, bean.getRelated());
   }
View Full Code Here

      return this;
   }

   public RelatedClassMetaData createRelated(String className, Object... enabled)
   {
      AbstractRelatedClassMetaData related = new AbstractRelatedClassMetaData();
      related.setClassName(className);
      if (enabled != null && enabled.length > 0)
         related.setEnabled(new HashSet<Object>(Arrays.asList(enabled)));
      return related;
   }
View Full Code Here

      return this;
   }

   public RelatedClassMetaData createRelated(String className, Object... enabled)
   {
      AbstractRelatedClassMetaData related = new AbstractRelatedClassMetaData();
      related.setClassName(className);
      if (enabled != null && enabled.length > 0)
         related.setEnabled(new HashSet<Object>(Arrays.asList(enabled)));
      return related;
   }
View Full Code Here

TOP

Related Classes of org.jboss.beans.metadata.plugins.AbstractRelatedClassMetaData

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.