All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.prezi.pride.config.PrideConfigurationHandler Maven / Gradle / Ivy

There is a newer version: 0.12.3
Show newest version
package com.prezi.pride.config;

import com.prezi.pride.Module;
import com.prezi.pride.vcs.VcsManager;
import org.apache.commons.configuration.Configuration;

public class PrideConfigurationHandler extends AbstractConfigurationHandler {
	public PrideConfigurationHandler(VcsManager vcsManager) {
		super(vcsManager);
	}

	@Override
	protected Module loadModule(Configuration config, String prefix) {
		String moduleName = config.getString(prefix + ".name");
		String vcsType = config.getString(prefix + ".vcs");
		return new Module(moduleName, getVcsManager().getVcs(vcsType, config));
	}

	@Override
	protected void saveModule(Configuration config, String prefix, Module module) {
		config.setProperty(prefix + ".name", module.getName());
		config.setProperty(prefix + ".vcs", module.getVcs().getType());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy