Package org.jboss.managed.plugins

Examples of org.jboss.managed.plugins.DefaultFieldsImpl


                  pdescription = mpa.description();
            }
            // Generate a name if there is none
            if (pname == null)
               pname = "arg#" + i;
            Fields fields =  new DefaultFieldsImpl(pname);
            if (pdescription != null)
               fields.setField(Fields.DESCRIPTION, pdescription);
            MetaType metaType = metaTypeFactory.resolve(pinfo.getParameterType());
            fields.setField(Fields.META_TYPE, metaType);
            // Delegate others (legal values, min/max etc.) to the constraints factory
            try
            {
               Class<? extends ManagedParameterConstraintsPopulatorFactory> factoryClass = opConstraintsFactor;
               if (factoryClass == ManagementParameter.NULL_CONSTRAINTS.class)
View Full Code Here


   private void populate()
   {
      populateDefaultValues();
      // Pass the
      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))
View Full Code Here

                        log.debug("Failed to created Fields", e);
                     }
                  }
               }
               if (fields == null)
                  fields = new DefaultFieldsImpl();

               if( propertyInfo instanceof Serializable )
               {
                  Serializable info = Serializable.class.cast(propertyInfo);
                  fields.setField(Fields.PROPERTY_INFO, info);
View Full Code Here

                  pdescription = mpa.description();
            }
            // Generate a name if there is none
            if (pname == null)
               pname = "arg#" + i;
            Fields fields =  new DefaultFieldsImpl(pname);
            if (pdescription != null)
               fields.setField(Fields.DESCRIPTION, pdescription);
            MetaType metaType = metaTypeFactory.resolve(pinfo.getParameterType());
            fields.setField(Fields.META_TYPE, metaType);
            // Delegate others (legal values, min/max etc.) to the constraints factory
            try
            {
               Class<? extends ManagedParameterConstraintsPopulatorFactory> factoryClass = opConstraintsFactor;
               if (factoryClass == ManagementParameter.NULL_CONSTRAINTS.class)
View Full Code Here

                                   boolean isID,
                                   MetaType metaType,
                                   MetaValue value,
                                   ManagedObjectImpl mo)
   {
      DefaultFieldsImpl fields = new DefaultFieldsImpl();
      fields.setDescription(fieldDescr);
      fields.setMandatory(mandatory);
      fields.setMetaType(metaType);
      fields.setName(fieldName);
      ManagedPropertyImpl mp = new ManagedPropertyImpl(mo, fields);
      if(isID)
      {
         Map<String, Annotation> annotations = new HashMap<String, Annotation>();
         Map<String, Object> idFields = Collections.emptyMap();
View Full Code Here

                  {
                     log.debug("Failed to created Fields", e);
                  }
               }
               if (fields == null)
                  fields = new DefaultFieldsImpl();

               if( propertyInfo instanceof Serializable )
               {
                  Serializable info = Serializable.class.cast(propertyInfo);
                  fields.setField(Fields.PROPERTY_INFO, info);
View Full Code Here

                  pdescription = mpa.description();
            }
            // Generate a name if there is none
            if (pname == null)
               pname = "arg#" + i;
            Fields fields =  new DefaultFieldsImpl(pname);
            if (pdescription != null)
               fields.setField(Fields.DESCRIPTION, pdescription);
            MetaMapper[] paramMapper = {null};
            MetaType metaType = getMetaType(pinfo, pinfo.getParameterType(), metaData, true, paramMapper);
            fields.setField(Fields.META_TYPE, metaType);
            // Delegate others (legal values, min/max etc.) to the constraints factory
            try
            {
               Class<? extends ManagedParameterConstraintsPopulatorFactory> factoryClass = opConstraintsFactor;
               if (factoryClass == ManagementParameter.NULL_CONSTRAINTS.class)
View Full Code Here

    * @param type - the property type
    * @return return the fields implementation
    */
   protected Fields getFields(String name, MetaType type)
   {
      DefaultFieldsImpl fields = new DefaultFieldsImpl();
      fields.setMetaType(type);
      fields.setName(name);
      fields.setField(Fields.MAPPED_NAME, name);
      fields.setMandatory(false);
      fields.setDescription("The bean controller state");

      return fields;
   }
View Full Code Here

                  Map<String, ManagedProperty> oldProps = mmo.getProperties();
                  Map<String, ManagedProperty> newProps = new HashMap<String, ManagedProperty>(oldProps);
                  if(bmdAliases != null && bmdAliases.size() > 0)
                  {
                     ArrayMetaType aliasType = new ArrayMetaType(SimpleMetaType.STRING, false);
                     DefaultFieldsImpl fields = getFields("alias", aliasType);
                     fields.setDescription("Aliases of the bean");
                     String[] aliases = new String[bmdAliases.size()];
                     Iterator<?> i = bmdAliases.iterator();
                     for(int n = 0; i.hasNext(); n++)
                     {
                        aliases[n] = i.next().toString();
                     }
                     ArrayValueSupport value = new ArrayValueSupport(aliasType, aliases);
                     fields.setValue(value);
                     ManagedPropertyImpl aliasesMP = new ManagedPropertyImpl(bmdMO, fields);
                     newProps.put("alias", aliasesMP);
                  }
                  // Add a state property
                  DefaultFieldsImpl stateFields = getFields("state", ControllerStateMetaType.TYPE);
                  stateFields.setViewUse(new ViewUse[]{ViewUse.STATISTIC});
                  EnumValue stateValue = getState(bmd.getName(), kernel);
                  stateFields.setValue(stateValue);
                  stateFields.setDescription("The bean controller state");
                  ManagedPropertyImpl stateMP = new ManagedPropertyImpl(mmo, stateFields);
                  newProps.put("state", stateMP);
                  // Update the properties
                  mmo.setProperties(newProps);
               }
View Full Code Here

    * @param type - the property type
    * @return return the fields implementation
    */
   protected DefaultFieldsImpl getFields(String name, MetaType type)
   {
      DefaultFieldsImpl fields = new DefaultFieldsImpl();
      fields.setMetaType(type);
      fields.setName(name);
      fields.setField(Fields.MAPPED_NAME, name);
      fields.setMandatory(false);

      return fields;
   }
View Full Code Here

TOP

Related Classes of org.jboss.managed.plugins.DefaultFieldsImpl

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.