public void raConfigure(ConfigProperties properties) { port_ = DEFAULT_TFTP_PORT; if (properties.getProperty(PORT_CONFIG_PROPERTY) != null) port_ = (Integer) properties.getProperty(PORT_CONFIG_PROPERTY).getValue(); mode_ = ServerMode.GET_AND_PUT; }
.getProperties()) { if (newProperties.getProperty(configProperty.getName()) == null) { newProperties.addProperty(configProperty); .getProperties()) { if (entityProperty.getValue() == null) { throw new InvalidConfigurationException("the property "
public static ConfigProperties toProperties(PropertiesInfo propertiesInfo) throws ManagementConsoleException { ConfigProperties properties = new ConfigProperties(); for (String key : propertiesInfo.keySet()) { String[] nameAndType = key.split(" :: ", 2); // obtain a value depending on the type of property //String value = propertiesInfo.getProperty(key); Object value = propertiesInfo.getProperty(key); try { Class clazz = Class.forName(nameAndType[1]); Constructor con = clazz.getConstructor(String.class); value = con.newInstance((String)value); } catch (Exception e) { throw new ManagementConsoleException("Value of " + nameAndType[0] + " is not supported for type " + nameAndType[1] + "."); } Property property = new Property(nameAndType[0], nameAndType[1], value); properties.addProperty(property); } return properties; } }
public void createResourceAdaptorEntity(String resourceAdaptorID, String entityName) throws ManagementConsoleException { ResourceAdaptorID id = (ResourceAdaptorID) managementConsole.getComponentIDMap().get(resourceAdaptorID); resourceManagementMBeanUtils.createResourceAdaptorEntity(id, entityName, new ConfigProperties()); }
public static PropertiesInfo toPropertiesInfo(ConfigProperties properties) { PropertiesInfo propertiesInfo = new PropertiesInfo(); if (properties == null) return propertiesInfo; for (Property property : properties.getProperties()) { String key = property.getName() + " :: " + property.getType(); String value = property.getValue().toString(); propertiesInfo.setProperty(key, value); } return propertiesInfo; }
public void raConfigure(ConfigProperties properties) { port_ = DEFAULT_TFTP_PORT; if (properties.getProperty(PORT_CONFIG_PROPERTY) != null) port_ = (Integer) properties.getProperty(PORT_CONFIG_PROPERTY).getValue(); mode_ = ServerMode.GET_AND_PUT; }
public void setAsText(String text) { try { ConfigProperties properties = new ConfigProperties(); String props = text; if (props.charAt(0) == '[') { propValue = propString.substring(sep2 + 1, propString .length()); properties.addProperty(new ConfigProperties.Property( propString.substring(0, sep1), propType, (propValue.equals("null") ? null
@SuppressWarnings("unchecked") public void raConfigure(ConfigProperties properties) { String httpClientFactoryClassName = (String) properties.getProperty(CFG_PROPERTY_HTTP_CLIENT_FACTORY) .getValue(); if (!httpClientFactoryClassName.isEmpty()) { try { httpClientFactory = ((Class<? extends HttpAsyncClientFactory>) Class .forName(httpClientFactoryClassName)).newInstance(); } catch (Exception e) { tracer.severe("failed to load http client factory class", e); } } else { this.maxTotal = (Integer) properties.getProperty(CFG_PROPERTY_MAX_CONNECTIONS_TOTAL).getValue(); this.defaultMaxPerRoute = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_MAX_CONNECTIONS_PER_ROUTE) .getValue(); this.connectTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_CONNECT_TIMEOUT).getValue(); this.socketTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_SOCKET_TIMEOUT).getValue(); } }
ConfigProperties props = new ConfigProperties(); Element propsNode = (Element) propsNodeList.item(0); String propertyType = property.getAttribute("type"); String propertyValue = property.getAttribute("value"); props.addProperty(new ConfigProperties.Property( propertyName, propertyType, ConfigProperties.Property.toObject(propertyType,
/** * {@inheritDoc} */ @Override public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
/** * Creates an instance of the {@link ConfigProperties} for this component * * @return */ public ConfigProperties getDefaultConfigPropertiesInstance() { ConfigProperties defaultProperties = new ConfigProperties(); for (ConfigPropertyDescriptor mConfigProperty : getDescriptor().getConfigProperties()) { Object configPropertyValue = mConfigProperty.getConfigPropertyValue() == null ? null : ConfigProperties.Property.toObject(mConfigProperty.getConfigPropertyType(), mConfigProperty .getConfigPropertyValue()); defaultProperties.addProperty(new ConfigProperties.Property(mConfigProperty.getConfigPropertyName(), mConfigProperty.getConfigPropertyType(), configPropertyValue)); } return defaultProperties; }
/** * {@inheritDoc} */ @Override public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { // TODO properties need to be validated in raVerifyConfiguration setAddressNpi((Integer) properties.getProperty("addressNpi").getValue()); setAddressRange((String) properties.getProperty("addressRange").getValue()); setAddressTon((Integer) properties.getProperty("addressTon").getValue()); setEnquireLinkTimeout((Integer) properties.getProperty("enquireLinkTimeout").getValue()); setHost((String) properties.getProperty("host").getValue()); setPassword((String) properties.getProperty("password").getValue()); setPort((Integer) properties.getProperty("port").getValue()); setSystemId((String) properties.getProperty("systemId").getValue()); setSystemType((String) properties.getProperty("systemType").getValue()); }
@Override public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(ACCT_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }
public void raConfigure(ConfigProperties properties) { parseApplicationIds((String) properties.getProperty(AUTH_APPLICATION_IDS).getValue()); }