Package org.jboss.metatype.api.values

Examples of org.jboss.metatype.api.values.MetaValue


      assertNotNull(component);
     
      log.info("Properties: "+component.getProperties().keySet());
     
      ManagedOperation o = getOperation(component, "listMessageCountersAsHTML", new String[0]);
      MetaValue v = o.invoke(new MetaValue[0]);
      assertNotNull("null operation return value", v);
      log.debug("result" + v);
   }
View Full Code Here


   public void testTopicOperations() throws Exception
   {
      ManagedComponent component = getManagementView().getComponent("testCreateTopic", TopicType);
      ManagedOperation o = getOperation(component, "listAllSubscriptionsAsHTML", new String[0]);
      MetaValue v = o.invoke(new MetaValue[0]);
      assertNotNull("null operation return value", v);
      log.debug("result" + v);
   }
View Full Code Here

               f.setField(Fields.MAPPED_NAME, mappedName);
         }
        
         ManagedPropertyImpl newProperty = new ManagedPropertyImpl(f);
        
         MetaValue v = defaultValues.get(name);
         if(v != null)
         {
            newProperty.setValue(v);
         }
        
View Full Code Here

   @Override
   public MetaValue getValue(BeanInfo beanInfo, ManagedProperty property,
         MetaData metaData,
         XADataSourceDeploymentMetaData attachment)
   {
      MetaValue metaValue = null;
      if("xa-datasource-properties".equals(property.getName()))
      {
         List<XAConnectionPropertyMetaData> list = attachment.getXADataSourceProperties();
         if(list != null)
         {
            MapCompositeValueSupport map = new MapCompositeValueSupport(SimpleMetaType.STRING);
            for(XAConnectionPropertyMetaData prop : list)
            {
               MetaValue svalue = SimpleValueSupport.wrap(prop.getValue());
               map.put(prop.getName(), svalue);
            }
            metaValue = map;
         }
      }
View Full Code Here

      if (propertyInfo != null)
      {
         Object attachment = getManagedObject().getAttachment();
         if (attachment != null)
         {
            MetaValue metaValue = value;
            InstanceClassFactory icf = getMOFactory().getInstanceClassFactory(attachment.getClass());
            BeanInfo beanInfo = propertyInfo.getBeanInfo();
            icf.setValue(beanInfo, this, attachment, metaValue);
         }
      }
View Full Code Here

      // Check if the property is readable
      if(propertyInfo != null && propertyInfo.isReadable() == false)
         return null;
     
      MetaValue value = null;
      if("config-property".equals(property.getName()))
      {
         MapCompositeValueSupport mapValue = new MapCompositeValueSupport(SimpleMetaType.STRING);
         List<ManagedConnectionFactoryPropertyMetaData> list = attachment.getManagedConnectionFactoryProperties();
         if(list != null)
         {
            for(ManagedConnectionFactoryPropertyMetaData prop : list)
            {
               String name = prop.getName();              
               MetaValue svalue = SimpleValueSupport.wrap(prop.getValue());
               mapValue.put(name, svalue);
               MetaValue stype = SimpleValueSupport.wrap(prop.getType());
               mapValue.put(name+".type", stype);
            }
         }
         value = mapValue;
      }
View Full Code Here

            ManagedConnectionFactoryPropertyMetaData prop = new ManagedConnectionFactoryPropertyMetaData();
            prop.setName(name);
            String svalue = (String) getMetaValueFactory().unwrap(mapValue.get(name));
            prop.setValue(svalue);
            String nameType = name+".type";
            MetaValue typeValue = mapValue.get(nameType);
            if(typeValue != null)
            {
               String type = (String) getMetaValueFactory().unwrap(typeValue);
               prop.setType(type);
            }
View Full Code Here

   @Override
   public MetaValue getValue(BeanInfo beanInfo, ManagedProperty property,
         MetaData metaData,
         T attachment)
   {
      MetaValue value = null;
      if("connection-properties".equals(property.getName()))
      {
         MapCompositeValueSupport mapValue = new MapCompositeValueSupport(SimpleMetaType.STRING);
         List<DataSourceConnectionPropertyMetaData> list = attachment.getDataSourceConnectionProperties();
         if(list != null)
         {
            for(DataSourceConnectionPropertyMetaData prop : list)
            {
               MetaValue wrapped = SimpleValueSupport.wrap(prop.getValue());
               mapValue.put(prop.getName(), wrapped);
            }
         }
         value = mapValue;
      }
View Full Code Here

                              Class<? extends DefaultValueBuilder> factoryClass = defaultsFactory.value();
                              builder = factoryClass.newInstance();
                        }
                        if(builder != null)
                        {
                           MetaValue defaultMV = builder.buildMetaValue(defaultValue);
                           if(defaultMV != null)
                              fields.setField(Fields.DEFAULT_VALUE, defaultMV);
                        }
                        else
                        {
View Full Code Here

      Object val = getSimpleValue(compVal, "description");
      if (val != null)
      {
         assertTrue(val instanceof String);
      }
      MetaValue mv = compVal.get("configuration");
      assertTrue(mv instanceof CollectionValue);
      CollectionValue config = (CollectionValue) mv;
      MetaValue[] elements = config.getElements();
      for (MetaValue element : elements)
      {
View Full Code Here

TOP

Related Classes of org.jboss.metatype.api.values.MetaValue

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.