/** * Sets the configuration information for this tenant's * configured adapters. * * @param configurations A list of configuration properties, one set of properties * for each configured adapter. The list's content will be * copied into a new list in order to prevent modification * of the list after this method has been invoked. * @throws NullPointerException if the list is {@code null}. * @return This tenant for command chaining. */ @JsonProperty(TenantConstants.FIELD_ADAPTERS) public TenantObject setAdapterConfigurations(final List<Map<String, Object>> configurations) { if (configurations == null) { this.adapterConfigurations = null; } else { configurations.stream().forEach(map -> { final JsonObject config = new JsonObject(map); addAdapterConfiguration(config); }); } return this; }
/** * Sets the configuration information for this tenant's * configured adapters. * * @param configurations A list of configuration properties, one set of properties * for each configured adapter. The list's content will be * copied into a new list in order to prevent modification * of the list after this method has been invoked. * @throws NullPointerException if the list is {@code null}. * @return This tenant for command chaining. */ @JsonProperty(TenantConstants.FIELD_ADAPTERS) public TenantObject setAdapterConfigurations(final List<Map<String, Object>> configurations) { if (configurations == null) { this.adapterConfigurations = null; } else { configurations.stream().forEach(map -> { final JsonObject config = new JsonObject(map); addAdapterConfiguration(config); }); } return this; }
/** * Sets the configuration information for this tenant's * configured adapters. * * @param configurations The configuration properties for this tenant's * configured adapters or {@code null} in order to * remove any existing configuration. * @return This tenant for command chaining. */ @JsonIgnore public TenantObject setAdapterConfigurations(final JsonArray configurations) { if (configurations == null) { this.adapterConfigurations = null; } else { this.adapterConfigurations = new HashMap<>(); configurations.stream().filter(obj -> JsonObject.class.isInstance(obj)).forEach(config -> { addAdapterConfiguration((JsonObject) config); }); } return this; }
/** * Sets the configuration information for this tenant's * configured adapters. * * @param configurations The configuration properties for this tenant's * configured adapters or {@code null} in order to * remove any existing configuration. * @return This tenant for command chaining. */ @JsonIgnore public TenantObject setAdapterConfigurations(final JsonArray configurations) { if (configurations == null) { this.adapterConfigurations = null; } else { this.adapterConfigurations = new HashMap<>(); configurations.stream().filter(obj -> JsonObject.class.isInstance(obj)).forEach(config -> { addAdapterConfiguration((JsonObject) config); }); } return this; }