Package org.jboss.metatype.api.values

Examples of org.jboss.metatype.api.values.SimpleValue


         // Try casting this to a DsDataSourceTemplateInfo
         destinationType = ((HornetQDestinationTemplateInfo)info).getDestinationType();
      }
      else
      {
         SimpleValue dsTypeSV = (SimpleValue) destTypeMP.getValue();
         destinationType = dsTypeSV.getValue().toString();
      }

      String destinationName = (String) getProperty(info, "name");
      if(destinationName == null)
         throw new IllegalStateException("Destination name has not been specified!");
View Full Code Here


   {
      boolean found = false;
      for(MetaValue v : values.getElements())
      {
         MapCompositeValueSupport c = (MapCompositeValueSupport) v;
         SimpleValue bindingName = (SimpleValue)c.get("bindingName");
         if(bindingName != null && bindingName.getValue().equals(name))
         {
            found = true;
            c.put("port", SimpleValueSupport.wrap(port));
         }
      }
View Full Code Here

         if(prop != null)
         {
            MetaType type = prop.getMetaType();
            if(type.isSimple())
            {
               SimpleValue value = (SimpleValue) prop.getValue();
               String n = value.getValue().toString();
               matches = name.equals(n);
            }
            else if(type.isArray())
            {
               ArrayValue value = (ArrayValue) prop.getValue();
View Full Code Here

   @Override
   public ObjectName unwrapMetaValue(MetaValue metaValue)
   {
      CompositeValue compositeValue = (CompositeValue) metaValue;
      SimpleValue domain = (SimpleValue) compositeValue.get("domain");
      String domainUnwrap = domain.toString();
      MetaValue keys = compositeValue.get("keyPropertyList");
      Hashtable keysUnwrap = null;
      if(keys instanceof PropertiesMetaValue)
         keysUnwrap = (PropertiesMetaValue) keys;
      try
View Full Code Here

   public Version unwrapMetaValue(MetaValue metaValue)
   {
      if (SimpleMetaType.STRING.equals(metaValue.getMetaType()) == false)
         throw new IllegalArgumentException("Not a string: " + metaValue);
     
      SimpleValue simple = (SimpleValue) metaValue;
      String value = (String) simple.getValue();
      return Version.parseVersion(value);
   }
View Full Code Here

      }

      @Override
      public File unwrapMetaValue(MetaValue metaValue)
      {
         SimpleValue svalue = (SimpleValue) metaValue;
         File f = null;
         if (svalue != null)
         {
            f = new File(svalue.getValue().toString());
         }
         return f;
      }
View Full Code Here

      if (value instanceof MetaValue)
      {
         MetaValue metaValue = (MetaValue)value;
         if (metaValue.getMetaType().isSimple() == false)
            throw new IllegalArgumentException("Can only get ref from simple value: " + value);
         SimpleValue svalue = (SimpleValue) metaValue;
         return svalue.getValue();
      }
      return value;
   }
View Full Code Here

         // Try casting this to a DsDataSourceTemplateInfo
         destinationType = ((JmsDestinationTemplateInfo)info).getDestinationType();
      }
      else
      {
         SimpleValue dsTypeSV = (SimpleValue) destTypeMP.getValue();
         destinationType = dsTypeSV.getValue().toString();
      }

      JmsDestinationMetaData destination = new JmsDestinationMetaData();
     
      String destinationName = (String) getProperty(info, "name");
View Full Code Here

         role.setAttribute("name", name);
        
         // For each attribute: read, write, create
         for(String attribute : attributes)
         {
            SimpleValue v = (SimpleValue) row.get(attribute);
            if(v != null && v.getValue() != null)
            {
               role.setAttribute(attribute, ((Boolean)v.getValue()).toString());
            }
         }
         security.appendChild(role);
      }
      return security;
View Full Code Here

         if(prop != null)
         {
            MetaType type = prop.getMetaType();
            if(type.isSimple())
            {
               SimpleValue value = (SimpleValue) prop.getValue();
               String n = value.getValue().toString();
               matches = name.equals(n);
            }
            else if(type.isArray())
            {
               ArrayValue value = (ArrayValue) prop.getValue();
View Full Code Here

TOP

Related Classes of org.jboss.metatype.api.values.SimpleValue

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.