Package org.jboss.managed.plugins

Examples of org.jboss.managed.plugins.DefaultFieldsImpl


 
  public static ManagedProperty createProperty(String name,
      MetaType type, String displayName, String description,
      boolean mandatory, boolean readOnly, Serializable defaultValue) {

    DefaultFieldsImpl fields = new DefaultFieldsImpl(name);
    fields.setDescription(description);
    fields.setField(Fields.MAPPED_NAME,displayName);
    fields.setMetaType(type);
    fields.setField(Fields.MANDATORY, SimpleValueSupport.wrap(mandatory));
    fields.setField(Fields.READ_ONLY, SimpleValueSupport.wrap(readOnly));
    fields.setField(TEIID_PROPERTY, SimpleValueSupport.wrap(true));
   
    if (defaultValue != null) {
      fields.setField(Fields.DEFAULT_VALUE, SimpleValueSupport.wrap(defaultValue));
    }
    return  new ManagedPropertyImpl(fields);   
  }
View Full Code Here


   
    addProperty(ManagedPropertyUtil.createProperty(ADDITIONAL_CONNECTION_PROPS, SimpleMetaType.STRING,"Addtional Connection Properties", "Addtional Connection properties. (comma separated name value pairs)", false, false, null));//$NON-NLS-1$ //$NON-NLS-2$
  }

  static ManagedPropertyImpl buildConfigProperty() {
    DefaultFieldsImpl fields = new DefaultFieldsImpl("config-property");//$NON-NLS-1$ 
    fields.setDescription("The config-property type"); //$NON-NLS-1$ 
    fields.setMetaType(new MapCompositeMetaType (SimpleMetaType.STRING));
    ManagedPropertyImpl dsTypeMP = new ManagedPropertyImpl(fields);
    return dsTypeMP;
  }
View Full Code Here

    addProperty(ManagedPropertyUtil.createProperty(SERVER_NAME, SimpleMetaType.STRING,"Database Server Name", "Database Server Name", false, false, null));//$NON-NLS-1$ //$NON-NLS-2$
    addProperty(ManagedPropertyUtil.createProperty(ADDITIONAL_DS_PROPS, SimpleMetaType.STRING,"Addtional Data Source Properties", "Addtional Data source properties. (comma separated name value pairs)", false, false, null));//$NON-NLS-1$ //$NON-NLS-2$
  }

  static ManagedPropertyImpl buildConfigProperty() {
    DefaultFieldsImpl fields = new DefaultFieldsImpl("config-property");//$NON-NLS-1$ 
    fields.setDescription("The config-property type"); //$NON-NLS-1$ 
    fields.setMetaType(new MapCompositeMetaType (SimpleMetaType.STRING));
    ManagedPropertyImpl dsTypeMP = new ManagedPropertyImpl(fields);
    return dsTypeMP;
  }
View Full Code Here

                String sName = ManagedUtil.getSimpleValue(mo, "name", String.class);//$NON-NLS-1$
                if (sName.equals(sourceName)) {
                 
                  ManagedProperty translatorProperty = mo.getProperty("translatorName"); //$NON-NLS-1$
                  if (translatorProperty == null) {
                    translatorProperty = new WritethroughManagedPropertyImpl(mo, new DefaultFieldsImpl("translatorName")); //$NON-NLS-1$
                  }
                  translatorProperty.setValue(ManagedUtil.wrap(SimpleMetaType.STRING, translatorName));
                 
                  // set the jndi name for the ds.
                  ManagedProperty jndiProperty = mo.getProperty("connectionJndiName"); //$NON-NLS-1$
                  if (jndiProperty == null) {
                    jndiProperty = new WritethroughManagedPropertyImpl(mo, new DefaultFieldsImpl("connectionJndiName")); //$NON-NLS-1$
                  }
                  jndiProperty.setValue(ManagedUtil.wrap(SimpleMetaType.STRING, dsName));
                }
            }
        } else {
View Full Code Here

    if (description != null) {
      ExtendedPropertyMetadata extended = new ExtendedPropertyMetadata(metadata.getName(), metadata.getType(), description, metadata.getValue());
      return ManagedPropertyUtil.convert(extended);
    }
   
    DefaultFieldsImpl fields = new DefaultFieldsImpl(metadata.getName());
    SimpleMetaType metaType = SimpleMetaType.resolve(metadata.getType());
    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

   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 pinfo = Serializable.class.cast(propertyInfo);
                  fields.setField(Fields.PROPERTY_INFO, pinfo);
View Full Code Here

            String pdescription = pinfo.getDescription();

            // 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};
            Class<?> paramType = loadTypeClass(pinfo.getType(), mbeanLoader);
            MetaType metaType = getMetaType(pinfo, paramType, metaData, true, null, paramMapper);
            fields.setField(Fields.META_TYPE, metaType);


            ManagedParameterImpl mp = new ManagedParameterImpl(fields);
            if(paramMapper[0] != null)
               mp.setTransientAttachment(MetaMapper.class.getName(), paramMapper[0]);
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

   }

   private void populate()
   {
      // Add the destination type as a ManagedProperty
      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())
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.