@Override public void readConfiguration (JSONObject rootNode) throws ConfigurationException { // read the predictable super.readConfiguration(rootNode); }
@Override public void readConfiguration (JSONObject rootNode) throws ConfigurationException { super.readConfiguration(rootNode); _baseFactory.readConfiguration(rootNode); }
@Override public void readConfiguration (JSONObject rootNode) throws ConfigurationException { super.readConfiguration(rootNode); gradients.clear(); try { readGradients(getPropertyValue(GRADIENTS), gradients); } catch (JSONException e) { throw new ConfigurationException("Error configuring factory "+ this.getClass().getName(), e); } }
/** * Initialize needed construction values from a properties list. * * @param rootNode The root node of all configuration information for this * factory. * @throws ConfigurationException If something goes wrong in configuration. */ public void readConfiguration (JSONObject rootNode) throws ConfigurationException { try { _configurationNode = getConfigurationNode(rootNode); for (ConfigurableFactory<?> child: _children) { child.readConfiguration(rootNode); } _configured = true; } catch (JSONException e) { throw new ConfigurationException("Error configuring factory "+this.getClass().getName(), e); } }
sourceFactory.readConfiguration(props); PyramidIO source = sourceFactory.produce(PyramidIO.class); destinationFactory.readConfiguration(props); PyramidIO destination = destinationFactory.produce(PyramidIO.class); serializerFactory.readConfiguration(props); TileSerializer<?> serializer = serializerFactory.produce(TileSerializer.class); paramFactory.readConfiguration(props); CopyParameters params = paramFactory.produce(CopyParameters.class);
factory.readConfiguration( mergeQueryConfigOptions( layerConfig, requestParams ) );
factoryA.readConfiguration(new JSONObject("{root: {branch: {type: \"A\", a: {value: 1}}}}")); TestConstruct a = factoryA.produce(TestConstruct.class); Assert.assertEquals("A", a._name); factoryB.readConfiguration(new JSONObject("{root: {branch: {type: \"B\", b: {value: 2}}}}")); TestConstruct b = factoryB.produce(TestConstruct.class); Assert.assertEquals("B", b._name); factoryC.readConfiguration(new JSONObject("{root: {branch: {type: \"C\", c: {value: 3}}}}")); TestConstruct c = factoryC.produce(TestConstruct.class); Assert.assertEquals("C", c._name);
for (DefaultTileSerializerFactoryProvider provider: defaults) { ConfigurableFactory<? extends TileSerializer<?>> factory = provider.createFactory(null); factory.readConfiguration(new JSONObject()); typeDescriptors.add(factory.produce(TileSerializer.class).getBinTypeDescription());