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

br.com.jhonsapp.file.manager.contract.AbstractFileManager Maven / Gradle / Ivy

package br.com.jhonsapp.file.manager.contract;

import java.util.Properties;

import br.com.jhonsapp.util.loader.PropertiesLoader;
import br.com.jhonsapp.util.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