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

br.com.jhonsapp.repository.producer.RepositoryProducer Maven / Gradle / Ivy

Go to download

Repository is a project created by Jhonathan Camacho to facilitate the file management in local and remote repositories.

There is a newer version: 1.0.12
Show newest version
package br.com.jhonsapp.repository.producer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import br.com.jhonsapp.repository.implementation.Repository;
import br.com.jhonsapp.repository.implementation.RepositoryLocalHD;
import br.com.jhonsapp.repository.implementation.RepositoryRemoteHD;

/**
 * Class responsible for producing Repository local and remote.
 * 
 * @see RepositoryProperty
 * @see Repository
 * 
 * @author Jhonathan Camacho
 *
 */
@Component
public class RepositoryProducer {

	@Autowired
	private RepositoryProperty repositoryProperty;

	@Qualifier(Repository.LOCAL)
	@Bean
	public Repository getRepositoryLocalHD() {
		return new RepositoryLocalHD(repositoryProperty.getRootPathLocal());
	}

	@Qualifier(Repository.REMOTE)
	@Bean
	public Repository getRemoteHDFileManager() {
		return new RepositoryRemoteHD(repositoryProperty.getRootPathRemote());
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy