br.com.jhonsapp.repository.producer.RepositoryProducer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of repository Show documentation
Show all versions of repository Show documentation
Repository is a project created by Jhonathan Camacho to facilitate the file management in local and remote repositories.
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