Examples of PropertiesPersister


Examples of org.openstreetmap.osmosis.core.util.PropertiesPersister


  @Override
  public ReplicationState getState(long sequence) {
    File stateFile = sequenceFormatter.getFormattedName(sequence, ".state.txt");
    return new ReplicationState(new PropertiesPersister(stateFile).loadMap());
  }
View Full Code Here

Examples of org.openstreetmap.osmosis.core.util.PropertiesPersister


  @Override
  public void saveState(ReplicationState state) {
    File stateFile = sequenceFormatter.getFormattedName(state.getSequenceNumber(), ".state.txt");
    new PropertiesPersister(stateFile).store(state.store());

    if (saveCurrentState) {
      currentStatePersister.store(state.store());
    }
  }
View Full Code Here

Examples of org.springframework.util.PropertiesPersister

* @author Yoav Hakman
*/
public abstract class PropertiesUtils {

    public static Properties readProperties(Resource propertiesFile) {
        PropertiesPersister propertiesPersister = new DefaultPropertiesPersister();
        Properties properties = new Properties();
        try {
            propertiesPersister.load(properties, propertiesFile.getInputStream());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return properties;
    }
View Full Code Here

Examples of org.springframework.util.PropertiesPersister

    this.propertyPlaceholderConfigurer = encryptor != null ? new EncryptablePropertyPlaceholderConfigurer(encryptor) : new PropertyPlaceholderConfigurer();

    // Ensure that system properties override the spring-set properties.
    propertyPlaceholderConfigurer.setSystemPropertiesMode(PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE);

    PropertiesPersister savingPropertiesPersister = new DefaultPropertiesPersister() {

            @Override
            public void load(Properties props, InputStream is) throws IOException {
                props.put(HOSTNAME_KEY, HOSTNAME);
                CougarNodeId.initialiseNodeId(props);
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.