Package org.jboss.metatype.plugins.types

Examples of org.jboss.metatype.plugins.types.MutableCompositeMetaType.addItem()


            {
                for (PropertyDefinition mapMemberPropDef : propDefMap.getPropertyDefinitions().values())
                {
                    String mapMemberDesc = (propDefMap.getDescription() != null) ? propDefMap.getDescription() : "none";
                    MetaType mapMemberMetaType = ProfileServiceUtil.convertPropertyDefinitionToMetaType(mapMemberPropDef);
                    compositeMetaType.addItem(mapMemberPropDef.getName(), mapMemberDesc, mapMemberMetaType);
                }
            }
        }
        return new CompositeValueSupport(compositeMetaType);
    }
View Full Code Here


      // non xa ds
      propValues.put("driver-class", SimpleValueSupport.wrap("org.hsqldb.jdbcDriver"));
      propValues.put("connection-url", SimpleValueSupport.wrap("jdbc:hsqldb:."));
      // A metadata type with a null type-mapping, JBAS-6215
      MutableCompositeMetaType metadataType = new MutableCompositeMetaType("org.jboss.resource.metadata.mcf.DBMSMetaData", "metadata type");
      metadataType.addItem("typeMapping", "The jdbc type mapping", SimpleMetaType.STRING);
      HashMap<String, MetaValue> items = new HashMap<String, MetaValue>();
      items.put("typeMapping", null);
      CompositeValueSupport metadata = new CompositeValueSupport(metadataType, items);
      propValues.put("metadata", metadata);
View Full Code Here

            compositeMetaType = new MutableCompositeMetaType(name, desc);
            if (propDefMap != null) {
                for (PropertyDefinition mapMemberPropDef : propDefMap.getOrderedPropertyDefinitions()) {
                    String mapMemberDesc = (propDefMap.getDescription() != null) ? propDefMap.getDescription() : "none";
                    MetaType mapMemberMetaType = ConversionUtils.convertPropertyDefinitionToMetaType(mapMemberPropDef);
                    compositeMetaType.addItem(mapMemberPropDef.getName(), mapMemberDesc, mapMemberMetaType);
                }
            }
        }
        return new CompositeValueSupport(compositeMetaType);
    }
View Full Code Here

            for (PropertyDefinition mapMemberPropDef : propDefMap.getOrderedPropertyDefinitions()) {
                if (mapMemberPropDef.getName().equals("name"))
                    continue;
                String mapMemberDesc = (propDefMap.getDescription() != null) ? propDefMap.getDescription() : "none";
                MetaType mapMemberMetaType = ConversionUtils.convertPropertyDefinitionToMetaType(mapMemberPropDef);
                compositeMetaType.addItem(mapMemberPropDef.getName(), mapMemberDesc, mapMemberMetaType);
            }
        }
        return new CompositeValueSupport(compositeMetaType);
    }
View Full Code Here

      // non xa ds
      propValues.put("driver-class", SimpleValueSupport.wrap("org.hsqldb.jdbcDriver"));
      propValues.put("connection-url", SimpleValueSupport.wrap("jdbc:hsqldb:."));
      // A metadata type with a null type-mapping, JBAS-6215
      MutableCompositeMetaType metadataType = new MutableCompositeMetaType("org.jboss.resource.metadata.mcf.DBMSMetaData", "metadata type");
      metadataType.addItem("typeMapping", "The jdbc type mapping", SimpleMetaType.STRING);
      HashMap<String, MetaValue> items = new HashMap<String, MetaValue>();
      items.put("typeMapping", null);
      CompositeValueSupport metadata = new CompositeValueSupport(metadataType, items);
      propValues.put("metadata", metadata);
View Full Code Here

     
      TableValue expected = new TableValueSupport(tableType);
      String[] itemNames = DefaultMetaTypeFactory.MAP_ITEM_NAMES;
     
      MutableCompositeMetaType compositeType = new MutableCompositeMetaType(TestSimpleComposite.class.getName(), TestSimpleComposite.class.getName());
      compositeType.addItem("something", "something", SimpleMetaType.STRING);
      compositeType.freeze();

      String[] compositeNames = { "something" };
      CompositeValue compositeValue = new CompositeValueSupport(compositeType, compositeNames, new MetaValue[] { SimpleValueSupport.wrap("Hello") });
     
View Full Code Here

     
      TableValue expected = new TableValueSupport(tableType);
      String[] itemNames = DefaultMetaTypeFactory.MAP_ITEM_NAMES;
     
      MutableCompositeMetaType compositeType = new MutableCompositeMetaType(TestSimpleComposite.class.getName(), TestSimpleComposite.class.getName());
      compositeType.addItem("something", "something", SimpleMetaType.STRING);
      compositeType.freeze();

      String[] compositeNames = { "something" };
      CompositeValue compositeValue = new CompositeValueSupport(compositeType, compositeNames, new MetaValue[] { SimpleValueSupport.wrap("Hello") });
     
View Full Code Here

public class TestOverrideCompositeBuilder implements MetaTypeBuilder, MetaValueBuilder<TestOverrideComposite>
{
   public MetaType buildMetaType()
   {
      MutableCompositeMetaType result = new MutableCompositeMetaType(TestOverrideComposite.class.getName(), TestOverrideComposite.class.getName());
      result.addItem("somethingElse", "somethingElse", SimpleMetaType.STRING);
      result.freeze();
      return result;
   }

   public MetaValue buildMetaValue(MetaType metaType, TestOverrideComposite object)
View Full Code Here

    * @throws Exception for any problem
    */
   public void testSimpleAnnotation() throws Exception
   {
      MutableCompositeMetaType compositeType = new MutableCompositeMetaType(TestAnnotation.class.getName(), TestAnnotation.class.getName());
      compositeType.addItem("something", "something", SimpleMetaType.STRING);
      compositeType.freeze();

      String[] compositeNames = { "something" };
      CompositeValue expected = new CompositeValueSupport(compositeType, compositeNames, new MetaValue[] { SimpleValueSupport.wrap("Hello") });
     
View Full Code Here

    * @throws Exception for any problem
    */
   public void testSimpleComposite() throws Exception
   {
      MutableCompositeMetaType compositeType = new MutableCompositeMetaType(TestSimpleComposite.class.getName(), TestSimpleComposite.class.getName());
      compositeType.addItem("something", "something", SimpleMetaType.STRING);
      compositeType.freeze();

      String[] compositeNames = { "something" };
      CompositeValue expected = new CompositeValueSupport(compositeType, compositeNames, new MetaValue[] { SimpleValueSupport.wrap("Hello") });
     
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.