Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.Configuration.containsKey()


    {
        final Configuration config = _vHostConfig.getConfig();

        String defaultValue;

        if(config.containsKey("queues.exchange"))
        {
            defaultValue = config.getString("queues.exchange");
        }
        else
        {
View Full Code Here


                // trim the host name
                if (StringUtils.isNotEmpty(host)) {
                    host = host.trim();
                }
                final String portKey = key.replace(LoadBalancerConstants.HOST, LoadBalancerConstants.PORT);
                if (subset.containsKey(portKey)) {
                    int port = subset.getInt(portKey);
                    // save host and port for future creation of server list
                    hostAndPortPairs.add(Pair.of(host, port));
                }
            }
View Full Code Here

                // trim the host name
                if (StringUtils.isNotEmpty(host)) {
                    host = host.trim();
                }
                final String portKey = key.replace(LoadBalancerConstants.HOST, LoadBalancerConstants.PORT);
                if (subset.containsKey(portKey)) {
                    int port = subset.getInt(portKey);
                    // save host and port for future creation of server list
                    hostAndPortPairs.add(Pair.of(host, port));
                }
            }
View Full Code Here

        if(securityConfigUrl != null) {
            try {
              Configuration securityConfig = null;
        securityConfig = new PropertiesConfiguration(securityConfigUrl);

        if (securityConfig.containsKey("security.profile.base")) {
          final String baseP = securityConfig.getString("security.profile.base");
          if (profiles.contains(baseP)) {
            log.warn("Cycle in security configuration detected: {} -> {}", profiles, baseP);
            return securityConfig;
          } else {
View Full Code Here

        if (subset == null)
        {
            throw new IllegalArgumentException("Mapped property '" + name + "' does not exist.");
        }

        return subset.containsKey(key);
    }

    /**
     * @see org.apache.commons.beanutils.DynaBean#get(java.lang.String, int)
     */
 
View Full Code Here

    }

    @Override
    public List<Object> getList(String key, List<Object> defaultValue) {
        final Configuration mem = getInMemoryConfiguration();
        if (mem.containsKey(key))
            return mem.getList(key, defaultValue);
        else
            return super.getList(key, defaultValue);
    }
View Full Code Here

    }

    @Override
    public List<Object> getList(String key) {
        final Configuration mem = getInMemoryConfiguration();
        if (mem.containsKey(key))
            return mem.getList(key);
        else
            return super.getList(key);
    }
}
View Full Code Here

        Iterator it = config.getKeys();
        while (it.hasNext())
        {
            String key = (String) it.next();
            assertTrue("The saved configuration doesn't contain the key '" + key + "'", checkConfig.containsKey(key));

            Object value = checkConfig.getProperty(key);
            if (value instanceof byte[])
            {
                byte[] array = (byte[]) value;
View Full Code Here

    }

    @Override
    public List<Object> getList(String key, List<?> defaultValue) {
        final Configuration mem = getInMemoryConfiguration();
        if (mem.containsKey(key))
            return mem.getList(key, defaultValue);
        else
            return super.getList(key, defaultValue);
    }
View Full Code Here

    }

    @Override
    public List<Object> getList(String key) {
        final Configuration mem = getInMemoryConfiguration();
        if (mem.containsKey(key))
            return mem.getList(key);
        else
            return super.getList(key);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.