Package play

Examples of play.Configuration.keys()


  private Map<String, String> getAttributes(final String subKey) {
    final Configuration attributes = getConfiguration().getConfig(
        SettingKeys.ATTRIBUTES + "." + subKey);
    if (attributes != null) {
      final Set<String> keys = attributes.keys();
      final Map<String, String> ret = new HashMap<String, String>(
          keys.size());
      for (final String key : keys) {
        ret.put(key, attributes.getString(key));
      }
View Full Code Here


      //takes only the settings that begin with baasbox.settings
      Configuration bbSettingsToOverride=BBConfiguration.configuration.getConfig("baasbox.settings");
      //if there is at least one of them
      if (bbSettingsToOverride!=null) {
        //takes the part after the "baasbox.settings" of the key names
        Set<String> keys = bbSettingsToOverride.keys();
        Iterator<String> keysIt = keys.iterator();
        //for each setting to override
        while (keysIt.hasNext()){
          String key = keysIt.next();
          //is it a value to override?
View Full Code Here

        @Inject
        public JPAConfigProvider(Configuration configuration) {
            ImmutableSet.Builder<JPAConfig.PersistenceUnit> persistenceUnits = new ImmutableSet.Builder<JPAConfig.PersistenceUnit>();
            Configuration jpa = configuration.getConfig("jpa");
            if (jpa != null) {
                for (String name : jpa.keys()) {
                    String unitName = jpa.getString(name);
                    persistenceUnits.add(new JPAConfig.PersistenceUnit(name, unitName));
                }
            }
            jpaConfig = new DefaultJPAConfig(persistenceUnits.build());
View Full Code Here

            Configuration ebeanConf = configuration.getConfig("ebean");

            Map<String, ServerConfig> serverConfigs = new HashMap<String, ServerConfig>();

            if (ebeanConf != null) {
                for (String key: ebeanConf.keys()) {

                    ServerConfig config = new ServerConfig();
                    config.setName(key);
                    config.loadFromProperties();
                    try {
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.