Examples of MetaType


Examples of org.jboss.metatype.api.types.MetaType

        // There won't be any keys when loading a Configuration for the first time.
        for (String mapMemberPropName : mapMemberPropNames)
        {
            Property mapMemberProp = propMap.get(mapMemberPropName);
            MetaValue mapMemberMetaValue = compositeValue.get(mapMemberPropName);
            MetaType mapMemberMetaType = compositeValue.getMetaType().getType(mapMemberPropName);
            PropertyAdapter propertyAdapter = PropertyAdapterFactory.getPropertyAdapter(mapMemberMetaType);
            PropertyDefinition mapMemberPropDef = propDefMap.get(mapMemberPropName);
            if (mapMemberProp == null)
            {
                if (mapMemberPropDef != null)
                    mapMemberProp = propertyAdapter.convertToProperty(mapMemberMetaValue, mapMemberPropDef);
                else
                {
                    // If the member prop has no associated prop def, this is an "open map".
                    if (!mapMemberMetaType.isSimple() && !mapMemberMetaType.isEnum())
                    {
                        log.debug("Map member prop [" + mapMemberMetaType + "] is not a simple type - skipping...");
                        continue;
                    }
                    // Create a PropertySimple and populate it.
View Full Code Here

Examples of org.jboss.metatype.api.types.MetaType

  }
 
  public static <T> void getTranslatorValues(MetaValue pValue,
      PropertyMap map, PropertyList list) throws Exception {
    MetaType metaType = pValue.getMetaType();
    MapCompositeValueSupport unwrappedvalueMap = null;
    if (metaType.isComposite()) {
      unwrappedvalueMap = (MapCompositeValueSupport) pValue;

      for (String key : unwrappedvalueMap.getMetaType().keySet()) {
        map = new PropertyMap("property");
        map.put(new PropertySimple("name", key));
View Full Code Here

Examples of org.jboss.metatype.api.types.MetaType

  }


  public static <T> void getTranslatorValues(MetaValue pValue,
      PropertyMap map, PropertyList list) throws Exception {
    MetaType metaType = pValue.getMetaType();
    MapCompositeValueSupport unwrappedvalue = null;
    if (metaType.isComposite()) {
      unwrappedvalue = (MapCompositeValueSupport)pValue;

      for (String key : unwrappedvalue.getMetaType().keySet()) {
        map = new PropertyMap("properties");//$NON-NLS-1$
        map.put(new PropertySimple("name", key));//$NON-NLS-1$
View Full Code Here

Examples of org.jboss.metatype.api.types.MetaType

   */
  public static <T> void getSourceMappingValue(MetaValue pValue,
      Collection<Map<String, String>> list) {
    Map<String, String> map = new HashMap<String, String>();
    list.add(map);
    MetaType metaType = pValue.getMetaType();
    if (metaType.isCollection()) {
      for (MetaValue value : ((CollectionValueSupport) pValue)
          .getElements()) {
        GenericValueSupport genValue = ((GenericValueSupport) value);
        ManagedObject mo = (ManagedObject) genValue.getValue();
        String sourceName = mo.getName();
View Full Code Here

Examples of org.jboss.metatype.api.types.MetaType

   */
  public static <T> void getPropertyValues(MetaValue pValue,
      Collection<Map<String, String>> list) {
    Map<String, String> map = new HashMap<String, String>();
    list.add(map);
    MetaType metaType = pValue.getMetaType();
    if (metaType.isCollection()) {
      for (MetaValue value : ((CollectionValueSupport) pValue)
          .getElements()) {
        CompositeValueSupport compValue = ((CompositeValueSupport) value);
        for (MetaValue propValue : compValue.values()) {
          String propertyName = ((CompositeValueSupport) propValue)
View Full Code Here

Examples of org.jboss.metatype.api.types.MetaType

    return getManagedComponent(connection, DQPTYPE, BUFFERSERVICE);
  }

  public static String stringValue(MetaValue v1) throws Exception {
    if (v1 != null) {
      MetaType type = v1.getMetaType();
      if (type instanceof SimpleMetaType) {
        SimpleValue simple = (SimpleValue) v1;
        return simple.getValue().toString();
      }
      throw new Exception("Failed to convert value to string value"); //$NON-NLS-1$
View Full Code Here

Examples of org.jboss.metatype.api.types.MetaType

    return null;
  }

  public static Boolean booleanValue(MetaValue v1) throws Exception {
    if (v1 != null) {
      MetaType type = v1.getMetaType();
      if (type instanceof SimpleMetaType) {
        SimpleValue simple = (SimpleValue) v1;
        return Boolean.valueOf(simple.getValue().toString());
      }
      throw new Exception("Failed to convert value to boolean value"); //$NON-NLS-1$
View Full Code Here

Examples of org.jboss.metatype.api.types.MetaType

    return null;
  }

  public static Double doubleValue(MetaValue v1) throws Exception {
    if (v1 != null) {
      MetaType type = v1.getMetaType();
      if (type instanceof SimpleMetaType) {
        SimpleValue simple = (SimpleValue) v1;
        return Double.valueOf(simple.getValue().toString());
      }
      throw new Exception("Failed to convert value to double value"); //$NON-NLS-1$
View Full Code Here

Examples of org.jboss.metatype.api.types.MetaType

    return null;
  }
 
  public static Long longValue(MetaValue v1) throws Exception {
    if (v1 != null) {
      MetaType type = v1.getMetaType();
      if (type instanceof SimpleMetaType) {
        SimpleValue simple = (SimpleValue) v1;
        return Long.valueOf(simple.getValue().toString());
      }
      throw new Exception("Failed to convert value to long value"); //$NON-NLS-1$
View Full Code Here

Examples of org.jboss.metatype.api.types.MetaType

    return null;
  }
 
  public static Integer integerValue(MetaValue v1) throws Exception {
    if (v1 != null) {
      MetaType type = v1.getMetaType();
      if (type instanceof SimpleMetaType) {
        SimpleValue simple = (SimpleValue) v1;
        return Integer.valueOf(simple.getValue().toString());
      }
      throw new Exception("Failed to convert value to integer value"); //$NON-NLS-1$
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.