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

file.contract.AbstractFileManager Maven / Gradle / Ivy

Go to download

This project helps to manager local and remote file repositories.

There is a newer version: 1.0.1
Show newest version
package file.contract;

import java.util.Properties;

import loader.PropertiesLoader;
import verifier.StringVerifier;


public abstract class AbstractFileManager implements FileManager {
	private static final long serialVersionUID = 1913508232000906599L;

	private String propertieKey;
	private String repositoryPath = "";

	
	public AbstractFileManager(String propertieKey) {

		this.propertieKey = propertieKey;
	}

	protected String getRepositoryPath() {

		if (StringVerifier.isBlanck(this.repositoryPath)) {

			PropertiesLoader loader = new PropertiesLoader();
			Properties properties = loader.getPropertiesFile(PropertiesDefault.DEFAULT_PROPERTIES);
			
			loader.verifyIfValueExists(properties, this.propertieKey);
					
			this.repositoryPath = loader.getProperty(properties, this.propertieKey);
		}

		return this.repositoryPath;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy