コード例 #1
0
ファイル: Bot.java プロジェクト: dims12/program-ab
 /** load bot properties */
 void addProperties() {
   try {
     properties.getProperties(config_path + "/properties.txt");
   } catch (Exception ex) {
     ex.printStackTrace();
   }
 }
コード例 #2
0
ファイル: PropertiesAdapter.java プロジェクト: visik7/jpod
 @Override
 public Map<String, String> unmarshal(Properties properties) throws Exception {
   Map<String, String> map = new HashMap<String, String>();
   for (Property property : properties.getProperties()) {
     map.put(property.getName(), property.getValue());
   }
   return map;
 }
コード例 #3
0
ファイル: Domain.java プロジェクト: sgoretti/vertigo
  private static Properties buildProperties(
      final List<ConstraintDefinition> constraintDefinitions, final Properties inputProperties) {
    final PropertiesBuilder propertiesBuilder = new PropertiesBuilder();
    for (final Property property : inputProperties.getProperties()) {
      propertiesBuilder.addValue(property, inputProperties.getValue(property));
    }

    // On récupère les propriétés d'après les contraintes
    for (final ConstraintDefinition constraintDefinition : constraintDefinitions) {
      propertiesBuilder.addValue(
          constraintDefinition.getProperty(), constraintDefinition.getPropertyValue());
    }
    return propertiesBuilder.build();
  }