code: public static Object prepareParameter( String rawValue, Class<?> clazz ) throws TargetException {
  
  		// Simple types
  		Object result;
  		if( clazz == int.class || clazz == Integer.class )
  			result = Integer.parseInt( rawValue );
  		else if( clazz == long.class || clazz == Long.class )
  			result = Long.parseLong( rawValue );
  		else if( clazz == boolean.class || clazz == Boolean.class )
  			result = Boolean.parseBoolean( rawValue );
  
  		// Arrays of string
  		else if( clazz == String[].class ) {
  			List<String> parts = Utils.splitNicely( rawValue, "," );
  			result = parts.toArray( new String[ parts.size()]);
  		}
  
  		// Capabilities
  		else if( clazz == Capability[].class ) {
  			List<Capability> caps = new ArrayList<> ();
  			for( String s : Utils.splitNicely( rawValue, "," )) {
  				try {
  					caps.add( Capability.valueOf( s ));
  				} catch( Exception e ) {
  					throw new TargetException( "Unknown capability: " + s );
  				}
  			}
  
  			result = caps.toArray( new Capability[ caps.size()]);
  		}
  
  		// Default: keep the string
  		else
  			result = rawValue;
  
  		return result;
  	}
docs: Prepares the parameter to pass it to the REST API.
  @param rawValue the raw value, as a string
  @param clazz the class associated with the input parameter
  @return the object, converted to the right class
  @throws TargetException