Registers a JsonValueProcessor.<br>
[Java -&gt; JSON]

@param key the property name to use as key
@param jsonValueProcessor the processor to register
165986
public void registerJsonValueProcessor( String key, JsonValueProcessor jsonValueProcessor ) {
      if( key != null && jsonValueProcessor != null ) {
         keyMap.put( key, jsonValueProcessor );
      }
   }
329393
private void registerJsonSchemaRepository(Element element, ParserContext parserContext) {
        BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(JsonSchemaRepository.class);
        addLocationsToBuilder(element, builder);
        parseSchemasElement(element, builder, parserContext);
        parserContext.getRegistry().registerBeanDefinition(element.getAttribute(ID), builder.getBeanDefinition());
    }
619742
private static void addProcessor(final String key, final Processor processor) throws IllegalStateException {
        if (!ARCH_TO_PROCESSOR.containsKey(key)) {
            ARCH_TO_PROCESSOR.put(key, processor);
        } else {
            final String msg = "Key " + key + " already exists in processor map";
            throw new IllegalStateException(msg);
        }
    }
1076819
public void registerJsonValueProcessor( Class beanClass, Class propertyType, JsonValueProcessor jsonValueProcessor ) {
      if( beanClass != null && propertyType != null && jsonValueProcessor != null ) {
         beanTypeMap.put( beanClass, propertyType, jsonValueProcessor );
      }
   }
600369
public static @Nonnull Entry<String,JsonElement> field(String key, JsonElement value) {
        Entry<String, JsonElement> entry = new Entry<String,JsonElement>() {

            @Override
            public String getKey() {
                return key;
            }

            @Override
            public JsonElement getValue() {
                return value;
            }

            @Override
            public JsonElement setValue(JsonElement value) {
                throw new UnsupportedOperationException("entries are immutable");
            }};
            return entry;
    }
538461
protected void setJsonValue(JsonObjectBuilder builder, T value) {
    // I don't like this - there should really be a way to construct a disconnected JSONValue...
    if (value instanceof Boolean) {
      builder.add("value", (Boolean) value);
    } else if (value instanceof Double) {
      builder.add("value", (Double) value);
    } else if (value instanceof Integer) {
      builder.add("value", (Integer) value);
    } else if (value instanceof Long) {
      builder.add("value", (Long) value);
    } else if (value instanceof BigInteger) {
      builder.add("value", (BigInteger) value);
    } else if (value instanceof BigDecimal) {
      builder.add("value", (BigDecimal) value);
    } else if (value == null) {
      builder.addNull("value");
    } else {
      builder.add("value", value.toString());
    }
  }
454369
private void processKeyValue(Map<ConfigurationKey, Object> properties, ConfigurationKey key, Object value) {
        if (value instanceof String) {
            value = key.convertValue((String) value);
        }
        if (key.isValidValue(value)) {
            Object previous = properties.put(key, value);
            if (previous != null && !previous.equals(value)) {
                throw ConfigurationLogger.LOG.configurationKeyHasDifferentValues(key.get(), previous, value);
            }
        } else {
            throw ConfigurationLogger.LOG.invalidConfigurationPropertyValue(value, key.get());
        }
    }
47731
private static void addProcessors(final Processor processor, final String... keys) throws IllegalStateException {
        for (final String key : keys) {
            addProcessor(key, processor);
        }
    }
701891
public final <S, T> void registerConverter(ConverterKey<S,T> key, Converter<S, T> converter) {	

        if (key.getInputClass() == null) {
            throw new IllegalArgumentException("Input Class must not be null");
        }
        if (key.getOutputClass() == null) {
            throw new IllegalArgumentException("Output Class must not be null");
        }
        if (converter == null) {
            throw new IllegalArgumentException("Converter must not be null");
        }

        if (key.getQualifierAnnotation() == null) {
            throw new IllegalArgumentException("Qualifier must not be null");
        }

        Converter<?,?> old = registeredConverters.putIfAbsent(key, converter);
        if (old != null && (!isSameConverter(old, converter))) {
        	throw new IllegalStateException("Converter already registered for key: " + key);
        }
    }
1092772
public JsonArray getPropAsJsonArray(String key) {
    JsonElement jsonElement = this.jsonParser.parse(getProp(key));
    Preconditions.checkArgument(jsonElement.isJsonArray(),
        "Value for key " + key + " is malformed, it must be a JsonArray: " + jsonElement);
    return jsonElement.getAsJsonArray();
  }
463477
public void setProperty(String key, String value)
	{
		if (properties == null)
			properties = new Hashtable<String, String>();
		properties.put(key, value);
	}
220967
public JSONObject put(String key, Map<?, ?> value) throws JSONException {
		this.put(key, new JSONObject(value));
		return this;
	}
907832
public void set(PropertyKey key, String value) {
    put(key, value, Source.RUNTIME);
  }
189293
@Override
    public <T> void setJsonProperty(String propertyName, T value) {
        setProperty(propertyName, value);

    }
798462
protected <T> JsonObject buildSuccessAndCache(String key, T value) {
        JsonObject json = JsonObject.create();
        json.addData(key, value);
        json.addData(WebResponseConstant.MESSAGE_CACHE, 1);
        json.setStatus(GlobalResponseStatusMsg.OK.getMessage().getCode());
        return json;
    }
303277
public static void addAsyncProperty(String key, String value, TransactionLogger transactionLogger) {

    FlowContextFactory.deserializeNativeFlowContext(transactionLogger.getFlowContextAsync(transactionLogger));
    transactionLogger.properties.put(key, value);

  }
285515
public JaversBuilder registerValueGsonTypeAdapter(Class valueType, TypeAdapter nativeAdapter) {
        registerValue(valueType);
        jsonConverterBuilder().registerNativeTypeAdapter(valueType, nativeAdapter);
        return this;
    }