Examples of ManagedPropertyImpl


Examples of org.jboss.managed.plugins.ManagedPropertyImpl

    fields.setMetaType(metaType);   
    if (metadata.getValue() != null && metadata.getValue().trim().length() > 0) {
      fields.setField(Fields.DEFAULT_VALUE, ManagedUtil.wrap(metaType, metadata.getValue()));
    }
   
    return new ManagedPropertyImpl(fields);
 
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

    {
        //GenericMetaType genericMetaType = (GenericMetaType)metaType;
        ManagedObjectImpl managedObject = new ManagedObjectImpl(propDefMap.getName());
        for (PropertyDefinition mapMemberPropDef : propDefMap.getPropertyDefinitions().values())
        {
            ManagedPropertyImpl managedProp = new ManagedPropertyImpl(mapMemberPropDef.getName());
            MetaType managedPropMetaType = ProfileServiceUtil.convertPropertyDefinitionToMetaType(mapMemberPropDef);
            managedProp.setMetaType(managedPropMetaType);
            managedProp.setManagedObject(managedObject);
            managedObject.getProperties().put(managedProp.getName(), managedProp);
        }
        GenericValue genericValue = new GenericValueSupport(new GenericMetaType(propDefMap.getName(),
                propDefMap.getDescription()), managedObject);
        populateMetaValueFromProperty(propMap, genericValue, propDefMap);
        return genericValue;
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

   * @return simpler ManagedPropertyImpl
   * @throws java.io.ObjectStreamException
   *             for any error
   */
  private Object writeReplace() throws ObjectStreamException {
    ManagedPropertyImpl managedProperty = new ManagedPropertyImpl(getManagedObject(), getFields());
    managedProperty.setTargetManagedObject(getTargetManagedObject());
    return managedProperty;
  }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

      DefaultFieldsImpl fields = new DefaultFieldsImpl("dsType");
      fields.setDescription("The datasource type");
      fields.setMetaType(SimpleMetaType.STRING);
      fields.setValue(SimpleValueSupport.wrap(dsType));
      fields.setField(Fields.READ_ONLY, Boolean.TRUE);
      ManagedPropertyImpl dsTypeMP = new ManagedPropertyImpl(fields);
      addProperty(dsTypeMP);
     
      // DataSource
//      if("local-tx-datasource".equals(dsType))
//         createLocalTxDsTemplate();
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

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

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

    * @return simpler ManagedPropertyImpl
    * @throws java.io.ObjectStreamException for any error
    */
   private Object writeReplace() throws ObjectStreamException
   {
      ManagedPropertyImpl managedProperty = new ManagedPropertyImpl(getManagedObject(), getFields());
      managedProperty.setTargetManagedObject(getTargetManagedObject());
      return managedProperty;
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

    * @return simpler ManagedPropertyImpl
    * @throws java.io.ObjectStreamException for any error
    */
   private Object writeReplace() throws ObjectStreamException
   {
      ManagedPropertyImpl managedProperty = new ManagedPropertyImpl(getManagedObject(), getFields());
      managedProperty.setTargetManagedObject(getTargetManagedObject());
      return managedProperty;
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

   public void testXADSInstanceClassFactory()
      throws Exception
   {
      XADSInstanceClassFactory icf = new XADSInstanceClassFactory();
      XADataSourceDeploymentMetaData xads = new XADataSourceDeploymentMetaData();
      ManagedPropertyImpl property = new ManagedPropertyImpl("xa-datasource-properties");
      icf.getValue(null, property, null, xads);
      InstanceClassFactory icfref = icf;
      Serializable x = xads;
      icfref.getValue(null, property, null, x);
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

               if (mpf != null)
                  mpClass = mpf.value();
               if (mpClass != null)
                  property = AbstractManagedObjectFactory.createManagedProperty(mpClass, fields);
               if (property == null)
                  property = new ManagedPropertyImpl(fields);
               // Pass the MetaMapper as an attachment
               if (mapperReturn[0] != null)
                  property.setTransientAttachment(MetaMapper.class.getName(), mapperReturn[0]);
               properties.add(property);
            }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

            }

            Map<String, ManagedProperty> newProps = new HashMap<String, ManagedProperty>(oldProps);
            // Create a beans ManagedProperty, a list of BeanMetaData ManagedObjects
            Fields fields = getFields("beans", beansType);
            ManagedPropertyImpl beansMP = new ManagedPropertyImpl(bmdfMO, fields);
            newProps.put("beans", beansMP);

            // Create a ManagedObject for each of the beans BeanMetaData
            List<BeanMetaData> beans = bmdf.getBeans();
            if(beans != null)
            {
               for(BeanMetaData bmd : beans)
               {
                  DeploymentUnit compUnit = unit.getComponent(bmd.getName());
                  if(compUnit == null)
                  {
                     log.debug("Failed to find component for bean: "+bmd.getName());
                     continue;
                  }
                  MetaData compMetaData = compUnit.getMetaData();
                  GenericValue gv = getManagedObjectValue(bmd, compMetaData, bmdfMO);
                  if(gv != null)
                  {
                     // The component managed objects need to be in the root map
                     ManagedObject compMO = (ManagedObject) gv.getValue();
                     // Use the ManagedObject name if it's not the same as the attachmentName
                     String managedObjectName = compUnit.getName();
                     if(compMO != null && compMO.getAttachmentName() != null)
                     {
                        managedObjectName = compMO.getAttachmentName().equals(compMO.getName()) ?
                              compUnit.getName() : compMO.getName();
                     }
                     // Add the managed object
                     managedObjects.put(managedObjectName, compMO);
                     // Add the bean MO to the beans list
                     tmpBeans.add(gv);
                  }
               }
            }
            GenericValue[] beanMOs = new GenericValue[tmpBeans.size()];
            tmpBeans.toArray(beanMOs);
            CollectionValueSupport values = new CollectionValueSupport(beansType, beanMOs);
            beansMP.setValue(values);
            // Update the bean factory properties
            bmdfMMO.setProperties(newProps);
         }
      }
      GenericValue[] mos = new GenericValue[tmpBFs.size()];
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.