*/
@Action(
aliases = {"editPropertiesFile", "propertiesFile"})
public boolean editPropertiesFile(final String name, final String type, final String key, final String value) {
if (new File(name + ".properties").exists()) {
final PropertiesFile file = new PropertiesFile(name + ".properties");
if (type.toLowerCase().equals("boolean"))
file.setBoolean(key, Boolean.valueOf(value.toString()));
else if (type.toLowerCase().equals("long"))
file.setLong(key, Long.valueOf(value.toString()));
else if (type.toLowerCase().equals("int"))
file.setInt(key, Integer.valueOf(value.toString()));
else if (type.toLowerCase().equals("string"))
file.setString(key, value.toString());
else if (type.toLowerCase().equals("double"))
file.setDouble(key, Double.valueOf(value.toString()));
file.save();
return true;
}
return false;
}