Examples of ManagedPropertyImpl


Examples of org.jboss.managed.plugins.ManagedPropertyImpl

         mmo.setParent(parentMO);
         Map<String, ManagedProperty> oldProps = mmo.getProperties();
         Map<String, ManagedProperty> newProps = new HashMap<String, ManagedProperty>(oldProps);
         // Add a state property
         Fields stateFields = getFields("state", ControllerStateMetaType.TYPE);
         ManagedPropertyImpl stateMP = new ManagedPropertyImpl(mmo, stateFields);
         newProps.put("state", stateMP);
         mmo.setProperties(newProps);
      }
      return new GenericValueSupport(AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE, mo);
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

      DefaultFieldsImpl fields = new DefaultFieldsImpl("destinationType");
      fields.setDescription("The destination type");
      fields.setMetaType(SimpleMetaType.STRING);
      fields.setValue(SimpleValueSupport.wrap(destinationType));
      fields.setField(Fields.READ_ONLY, Boolean.TRUE);
      ManagedPropertyImpl destTypeMP = new ManagedPropertyImpl(fields);
      addProperty(destTypeMP);

      if(getProperties() == null) return;
      for(ManagedProperty property : getProperties().values())
      {
         // Create a new (non-writethrough) managed property
         Fields f = property.getFields();
        
         ManagedPropertyImpl newProperty = new ManagedPropertyImpl(f);
        
         // Skip non configuration properties except clustered
         if(newProperty.hasViewUse(ViewUse.CONFIGURATION) == false
               && property.getName().equals("clustered") == false)
            continue;
        
         // Override
         addProperty(newProperty);
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedPropertyImpl

      DefaultFieldsImpl fields = new DefaultFieldsImpl("destinationType");
      fields.setDescription("The destination type");
      fields.setMetaType(SimpleMetaType.STRING);
      fields.setValue(SimpleValueSupport.wrap(destinationType));
      fields.setField(Fields.READ_ONLY, Boolean.TRUE);
      ManagedPropertyImpl destTypeMP = new ManagedPropertyImpl(fields);
      addProperty(destTypeMP);

      // FIXME
      if(getProperties() == null) return;
      for(ManagedProperty property : getProperties().values())
      {
         // Create a new (non-writethrough) managed property
         Fields f = property.getFields();
        
         ManagedPropertyImpl newProperty = new ManagedPropertyImpl(f);
        
         // Override
         addProperty(newProperty);
      }
   }
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

    public MetaValue convertToMetaValue(PropertyMap propMap, PropertyDefinitionMap propDefMap, MetaType metaType) {
        //GenericMetaType genericMetaType = (GenericMetaType)metaType;
        ManagedObjectImpl managedObject = new ManagedObjectImpl(propDefMap.getName());
        for (PropertyDefinition mapMemberPropDef : propDefMap.getMap().values()) {
            ManagedPropertyImpl managedProp = new ManagedPropertyImpl(mapMemberPropDef.getName());
            MetaType managedPropMetaType = ConversionUtils.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

   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

      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
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.