List<String> propertyNames = properties.getPropertyNames(); for (String propName : propertyNames) { ConfigurationProperty prop = properties.getProperty(propName); LOG.info("OldValue = " + propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'"); ((setProperty == null)? "null" : setProperty.toString())); properties.setPropertyValue(propName, setProperty); ConfigurationProperty prop = properties.getProperty(propName); LOG.info(propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'");
@Override public ConfigurationProperties getConfigurationProperties(final ConnectorInfo info) { if (info == null) { throw new NotFoundException("Invalid: connector info is null"); } // create default configuration APIConfiguration apiConfig = info.createDefaultAPIConfiguration(); // retrieve the ConfigurationProperties. ConfigurationProperties properties = apiConfig.getConfigurationProperties(); if (properties == null) { throw new NotFoundException("Configuration properties"); } if (LOG.isDebugEnabled()) { properties.getPropertyNames().forEach(propName -> { LOG.debug("Property Name: {}" + "\nProperty Type: {}", properties.getProperty(propName).getName(), properties.getProperty(propName).getType()); }); } return properties; } }
ConfigurationProperty property = configProps.getProperty(propertyName);
filter(property -> (property.getValues() != null && !property.getValues().isEmpty())). forEachOrdered(property -> { properties.setPropertyValue(property.getSchema().getName(), getPropertyValue(property.getSchema().getType(), property.getValues())); });
@PreAuthorize("hasRole('" + StandardEntitlement.CONNECTOR_READ + "')") @Transactional(readOnly = true) public List<ConnBundleTO> getBundles(final String lang) { if (StringUtils.isBlank(lang)) { CurrentLocale.set(Locale.ENGLISH); } else { CurrentLocale.set(new Locale(lang)); } List<ConnBundleTO> connectorBundleTOs = new ArrayList<>(); connIdBundleManager.getConnInfoManagers().forEach((uri, cim) -> { connectorBundleTOs.addAll(cim.getConnectorInfos().stream().map(bundle -> { ConnBundleTO connBundleTO = new ConnBundleTO(); connBundleTO.setDisplayName(bundle.getConnectorDisplayName()); connBundleTO.setLocation(uri.toString()); ConnectorKey key = bundle.getConnectorKey(); connBundleTO.setBundleName(key.getBundleName()); connBundleTO.setConnectorName(key.getConnectorName()); connBundleTO.setVersion(key.getBundleVersion()); ConfigurationProperties properties = connIdBundleManager.getConfigurationProperties(bundle); connBundleTO.getProperties().addAll(properties.getPropertyNames().stream(). map(propName -> binder.build(properties.getProperty(propName))).collect(Collectors.toList())); return connBundleTO; }).collect(Collectors.toList())); }); return connectorBundleTOs; }
List<String> propertyNames = properties.getPropertyNames(); propertyNames.forEach(propName -> { ConfigurationProperty prop = properties.getProperty(propName); LOG.info("OldValue = " + propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'"); : setProperty.toString()) + "''"); properties.setPropertyValue(propName, setProperty); } catch (ObjectNotFoundException ex) { ConfigurationProperty prop = properties.getProperty(propName); LOG.info(propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'");
/** * Unit test for checking if the {@link Configuration} property type is supported */ @Test public void testPropertiesType() { assertNotNull(_configProperties); List<String> propertyNames = _configProperties.getPropertyNames(); assertNotNull(propertyNames); // go through the properties and check the type propertyNames.forEach(propertyName -> { ConfigurationProperty property = _configProperties.getProperty(propertyName); assertNotNull(property); String typeName = property.getType().getName(); LOG.ok("Property: ''" + property.getName() + "'' type ''" + typeName + "''"); assertTrue(FrameworkUtil.isSupportedConfigurationType(property.getType()), "Type " + typeName + " not allowed in configuration!"); }); } }
List<String> propertyNames = properties.getPropertyNames(); for (String propName : propertyNames) { ConfigurationProperty prop = properties.getProperty(propName); LOG.info("OldValue = " + propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'"); ((setProperty == null) ? "null" : setProperty.toString())); properties.setPropertyValue(propName, setProperty); ConfigurationProperty prop = properties.getProperty(propName); LOG.info(propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'");
/** * Unit test for checking if the {@link Configuration} property type is supported */ @Test public void testPropertiesType() { assertNotNull(_configProperties); List<String> propertyNames = _configProperties.getPropertyNames(); assertNotNull(propertyNames); //go through the properties and check the type for (String propertyName : propertyNames) { ConfigurationProperty property = _configProperties.getProperty(propertyName); assertNotNull(property); String typeName = property.getType().getName(); LOG.ok("Property: ''{0}'' type ''{1}''", property.getName(), typeName); assertTrue("Type " + typeName + " not allowed in configuration!", FrameworkUtil .isSupportedConfigurationType(property.getType())); } } }
List<String> propertyNames=properties.getPropertyNames(); for(String propName : propertyNames) { ConfigurationProperty prop = properties.getProperty(propName); LOG.info("OldValue = " + propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'"); LOG.info("Setting property ''{0}'' to value ''{1}''", propName, configObject.toString()); properties.setPropertyValue(propName, configObject); } else { LOG.warn( ConfigurationProperty prop = properties.getProperty(propName); LOG.info(propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'");
/** * Unit test for checking if the {@link Configuration} property type is supported */ @Test public void testPropertiesType() { assertNotNull(_configProperties); List<String> propertyNames = _configProperties.getPropertyNames(); assertNotNull(propertyNames); //go through the properties and check the type for (String propertyName : propertyNames) { ConfigurationProperty property = _configProperties.getProperty(propertyName); assertNotNull(property); String typeName = property.getType().getName(); LOG.ok("Property: ''{0}'' type ''{1}''", property.getName(), typeName); assertTrue("Type " + typeName + " not allowed in configuration!", FrameworkUtil .isSupportedConfigurationType(property.getType())); } } }
List<String> propertyNames = properties.getPropertyNames(); propertyNames.forEach(propName -> { ConfigurationProperty prop = properties.getProperty(propName); LOG.info("OldValue = " + propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'"); properties.setPropertyValue(propName, configObject); } else { LOG.warn( ConfigurationProperty prop = properties.getProperty(propName); LOG.info(propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'"); });
properties.getPropertyNames().forEach(propName -> { ConnConfPropSchema schema = build(properties.getProperty(propName));
List<String> propertyNames = properties.getPropertyNames(); for (String propName : propertyNames) { ConfigurationProperty prop = properties.getProperty(propName); LOG.info("OldValue = " + propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'"); LOG.info("Setting property ''{0}'' to value ''{1}''", propName, configObject.toString()); properties.setPropertyValue(propName, configObject); } else { LOG.warn( ConfigurationProperty prop = properties.getProperty(propName); LOG.info(propName + " = \'" + prop.getValue() + "\' type = \'" + prop.getType() + "\'");
.getConfigurationProperties(); if (icfConfigurationProperties == null || icfConfigurationProperties.getPropertyNames() == null || icfConfigurationProperties.getPropertyNames().isEmpty()) { LOGGER.debug("No configuration schema for {}", this); return null; for (String icfPropertyName : icfConfigurationProperties.getPropertyNames()) { ConfigurationProperty icfProperty = icfConfigurationProperties.getProperty(icfPropertyName);
for (String propName : apiConfig.getConfigurationProperties().getPropertyNames()) { LOGGER.trace("P: {} = {}", propName, apiConfig.getConfigurationProperties().getProperty(propName).getValue());