Commit 595f0159 authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch 'metadata-in-storage' into 'master'

Enable repository MetadataInStorageAspect

See merge request genesys-pgr/genesys-server!91
parents 989db43a 88f336dc
...@@ -38,6 +38,7 @@ import org.genesys.filerepository.service.BytesStorageService; ...@@ -38,6 +38,7 @@ import org.genesys.filerepository.service.BytesStorageService;
import org.genesys.filerepository.service.ImageGalleryService; import org.genesys.filerepository.service.ImageGalleryService;
import org.genesys.filerepository.service.RepositoryService; import org.genesys.filerepository.service.RepositoryService;
import org.genesys.filerepository.service.ThumbnailGenerator; import org.genesys.filerepository.service.ThumbnailGenerator;
import org.genesys.filerepository.service.aspect.MetadataInStorageAspect;
import org.genesys.filerepository.service.ftp.FtpUser; import org.genesys.filerepository.service.ftp.FtpUser;
import org.genesys.filerepository.service.ftp.RepositoryFileSystemFactory; import org.genesys.filerepository.service.ftp.RepositoryFileSystemFactory;
import org.genesys.filerepository.service.ftp.RepositoryFtpServer; import org.genesys.filerepository.service.ftp.RepositoryFtpServer;
...@@ -105,7 +106,7 @@ public class FileRepositoryConfig implements InitializingBean { ...@@ -105,7 +106,7 @@ public class FileRepositoryConfig implements InitializingBean {
public BytesStorageService bytesStorageService() { public BytesStorageService bytesStorageService() {
if (StringUtils.isNotBlank(s3AccessKey)) { if (StringUtils.isNotBlank(s3AccessKey)) {
// We have some S3 configuration, let's do that! // We have some S3 configuration, let's do that!
LOG.warn("Initializing S3 bytes storage"); LOG.warn("Initializing S3 bytes storage with {}", s3AccessKey);
return new S3StorageServiceImpl(); return new S3StorageServiceImpl();
} else { } else {
// Stick to FS storage // Stick to FS storage
...@@ -166,6 +167,16 @@ public class FileRepositoryConfig implements InitializingBean { ...@@ -166,6 +167,16 @@ public class FileRepositoryConfig implements InitializingBean {
return new GenesysImageGalleryAspects(); return new GenesysImageGalleryAspects();
} }
/**
* Maintain metadata in .json in storage
*
* @return
*/
@Bean
public MetadataInStorageAspect repositoryMetadataAspects() {
return new MetadataInStorageAspect();
}
@Bean @Bean
public TemporaryBytesManager temporaryBytesManager() { public TemporaryBytesManager temporaryBytesManager() {
return new TemporaryBytesManager(); return new TemporaryBytesManager();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment