File Repository issueshttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues2017-04-03T18:48:53+02:00https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/1Upgrade maven to multi-project setup2017-04-03T18:48:53+02:00Matija ObrezaUpgrade maven to multi-project setupWe intend to add modules to `file-repository` that are optional.
Introduce the parent POM, multi-project setup for this project:
* `file-repository-parent` will contain configuration for all modules, that's the primary `pom.xml`
*...We intend to add modules to `file-repository` that are optional.
Introduce the parent POM, multi-project setup for this project:
* `file-repository-parent` will contain configuration for all modules, that's the primary `pom.xml`
* `file-repository` will contain the current project code
* `file-repository-ftpserver` is the new module that adds FTP server support using Apache Mina https://mina.apache.org/ftpserver-project/embedding_ftpserver.html
1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/2file-repository-ftpserver module2017-04-04T11:27:51+02:00Matija Obrezafile-repository-ftpserver moduleUse Apache Mina's https://mina.apache.org/ftpserver-project/embedding_ftpserver.html to add FTP support to the project.
Code goes to the `file-repository-ftpserver` module.Use Apache Mina's https://mina.apache.org/ftpserver-project/embedding_ftpserver.html to add FTP support to the project.
Code goes to the `file-repository-ftpserver` module.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/3Dependency on application-blocks-core2017-10-27T16:21:20+02:00Matija ObrezaDependency on application-blocks-coreAdd dependency on genesys-pgr/application-blocks-core.
Rebrand package names from `org.genesys2.server.filerepository` to `org.gensys.filerepository`.Add dependency on genesys-pgr/application-blocks-core.
Rebrand package names from `org.genesys2.server.filerepository` to `org.gensys.filerepository`.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/4Include querydsl support2017-10-27T16:21:21+02:00Matija ObrezaInclude querydsl supportInclude querydsl support for file-repository-core moduleInclude querydsl support for file-repository-core module1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/5(ftp) Require FTPS2017-10-27T16:21:21+02:00Matija Obreza(ftp) Require FTPSConfigure FTP server to require FTPS, plain-text FTP should not be enabled.Configure FTP server to require FTPS, plain-text FTP should not be enabled.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/6(ftp) Data ports range2017-10-27T16:21:21+02:00Matija Obreza(ftp) Data ports range[Background information](https://en.wikipedia.org/wiki/FTPS#Firewall_incompatibilities)
Make DATA port range configurable so that the firewall can be configured to open these ports.
Please see if the External IP can also be defined...[Background information](https://en.wikipedia.org/wiki/FTPS#Firewall_incompatibilities)
Make DATA port range configurable so that the firewall can be configured to open these ports.
Please see if the External IP can also be defined as a setting. This is because the FTP Control connection comes in through a load balancer and goes to one of the servers. The DATA connection must then be established to the correct server and we may need to tell the client the proper external IP.1.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/7(ftp) Interact with existing UserServices2018-09-20T10:00:32+02:00Matija Obreza(ftp) Interact with existing UserServicesThe JUnit test code uses a simple extension of the `AbstractUserManager`. This is a good starting point to implement the **user manager** for the RepositoryFtpServer that makes use of the Spring Security's `UserService`.
Alternatively...The JUnit test code uses a simple extension of the `AbstractUserManager`. This is a good starting point to implement the **user manager** for the RepositoryFtpServer that makes use of the Spring Security's `UserService`.
Alternatively, the `UserServiceImpl` from **application-blocks-security** can be used.1.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/8(ftp) RepositoryFilesystemView2017-04-06T14:47:36+02:00Matija Obreza(ftp) RepositoryFilesystemViewThe `FileSystemView createFileSystemView(User user)` method of the `RepositoryFileSystemFactory ` now creates a blank view.
Integrate the `org.genesys.filerepository.service.RepositoryService` to list and manage files from the repository.The `FileSystemView createFileSystemView(User user)` method of the `RepositoryFileSystemFactory ` now creates a blank view.
Integrate the `org.genesys.filerepository.service.RepositoryService` to list and manage files from the repository.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/9(ftp) Serve files from repository2017-04-05T14:31:48+02:00Matija Obreza(ftp) Serve files from repositoryImplement serving of the file bytes from the repository.
Ideally this should support random access to file bytes.Implement serving of the file bytes from the repository.
Ideally this should support random access to file bytes.1.0https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/10(ftp) Upload bytes to repository2017-10-27T16:21:21+02:00Matija Obreza(ftp) Upload bytes to repositorySave uploaded data to the repository.
Ideally random access, appending and upload resuming should work.Save uploaded data to the repository.
Ideally random access, appending and upload resuming should work.1.0https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/11(ftp) Folders navigation2017-04-06T14:47:36+02:00Matija Obreza(ftp) Folders navigationUsing FileZilla with the local Repository FTP server shows that folder creation and navigation is messy.
Improve folder navigation, listing, creation and deletion.
Add unit tests.Using FileZilla with the local Repository FTP server shows that folder creation and navigation is messy.
Improve folder navigation, listing, creation and deletion.
Add unit tests.1.0https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/12(ftp) Document ftp code2017-10-27T16:21:21+02:00Matija Obreza(ftp) Document ftp codeReview the code, use sane method and variable names, add comments where required.Review the code, use sane method and variable names, add comments where required.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/13(ftp) keystore for tests2017-10-27T16:21:21+02:00Matija Obreza(ftp) keystore for testsJenkins build fails with
```
Key store could not be loaded from ftpserver.jks
```
Provide a default keystore for testing.Jenkins build fails with
```
Key store could not be loaded from ftpserver.jks
```
Provide a default keystore for testing.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/14Virus scanning2017-10-27T16:21:21+02:00Matija ObrezaVirus scanningBefore storing the data to `BytesStorage` the bytes must be scanned for viruses. Allow for configuration of ClamAV service (host and port) in the properties file.
When ClamAV daemon is configured, uploaded data is passed to the scanner ...Before storing the data to `BytesStorage` the bytes must be scanned for viruses. Allow for configuration of ClamAV service (host and port) in the properties file.
When ClamAV daemon is configured, uploaded data is passed to the scanner and if when clean, persisted to storage. In case of detected infection throw a new `VirusFoundException`.
The https://github.com/cdarras/clamav-client is MIT licensed and can be linked to in Apache v2 projects. Avoid GPL.
```xml
<dependency>
<groupId>xyz.capybara</groupId>
<artifactId>clamav-client</artifactId>
<version>1.0.4</version>
</dependency>
```1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/15FTP tests fail at SSL2017-10-27T16:21:21+02:00Matija ObrezaFTP tests fail at SSLServer loads certificate from `ftpserver.jks`, client connection fails:
```
07:04:08,049 main DEBUG SslConfigurationFactory:323 - Loading key store from "/builds/genesys-pgr/file-repository/file-repository-ftpserver/target/test-classes/...Server loads certificate from `ftpserver.jks`, client connection fails:
```
07:04:08,049 main DEBUG SslConfigurationFactory:323 - Loading key store from "/builds/genesys-pgr/file-repository/file-repository-ftpserver/target/test-classes/ftpserver.jks", using the key store type "jks"
07:04:08,050 main DEBUG SslConfigurationFactory:293 - Trying to load store from file
07:04:08,307 main INFO RepositoryFtpServer:204 - Starting FTP server on port 8021
07:04:08,356 main DEBUG DefaultFtpServerContext:277 - Intializing shared thread pool executor with max threads of 20
07:04:08,404 main INFO DefaultFtpServer:89 - FTP server started
07:04:08,545 NioProcessor-1 INFO FtpLoggingFilter:186 - CREATED
07:04:08,559 pool-3-thread-1 INFO FtpLoggingFilter:186 - OPENED
07:04:08,867 pool-3-thread-1 WARN FtpLoggingFilter:130 - EXCEPTION :
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:519)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:947)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:535)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:703)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:659)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:648)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1120)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1666)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1634)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1800)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1083)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:907)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.apache.mina.filter.ssl.SslHandler.unwrap(SslHandler.java:754)
at org.apache.mina.filter.ssl.SslHandler.unwrapHandshake(SslHandler.java:689)
at org.apache.mina.filter.ssl.SslHandler.handshake(SslHandler.java:575)
at org.apache.mina.filter.ssl.SslHandler.messageReceived(SslHandler.java:360)
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:500)
... 15 more
```1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/16Bytes persistence2017-10-27T16:21:21+02:00Matija ObrezaBytes persistenceCurrent implementations of `BytesStorageService` store data at paths as specified in the repository. Methods `upsert`, `remove`, `get` generally accept `String path, String filename`. Folder structure of bytes persistence should not be d...Current implementations of `BytesStorageService` store data at paths as specified in the repository. Methods `upsert`, `remove`, `get` generally accept `String path, String filename`. Folder structure of bytes persistence should not be dependent on repository item `path`.
Instead of using the **repository path** as the path for bytes in storage, the bytes should be stored independently of the repository path and use the `UUID` of the item instead.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/17Write metadata with bytes2017-10-27T16:21:21+02:00Matija ObrezaWrite metadata with bytesOn update of repository file data also write this information as JSON to the `bytesStorage` along with the bytes.
This allows for reconstructing the repository database and serves as backup.On update of repository file data also write this information as JSON to the `bytesStorage` along with the bytes.
This allows for reconstructing the repository database and serves as backup.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/18Thumbnails storage2017-10-27T16:21:21+02:00Matija ObrezaThumbnails storageRelates to #16.
Image thumbnail bytes are now stored at `imageGallery2.getPath() + THUMB_PATH`. Considering #16, the thumbnails should be stored in `/_thumbs/` directory, excluding the gallery path.Relates to #16.
Image thumbnail bytes are now stored at `imageGallery2.getPath() + THUMB_PATH`. Considering #16, the thumbnails should be stored in `/_thumbs/` directory, excluding the gallery path.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/19AWS V4 Signature2017-10-09T18:39:36+02:00Matija ObrezaAWS V4 SignatureImplement V4 signature algorithmImplement V4 signature algorithm1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/20Type modifier2017-10-27T16:21:21+02:00Maxym BorodenkoType modifierNeed to change type modifier for `uuid` setter in `RepositoryFile` model.
See comment https://gitlab.croptrust.org/genesys-pgr/genesys-server/issues/182#note_8032Need to change type modifier for `uuid` setter in `RepositoryFile` model.
See comment https://gitlab.croptrust.org/genesys-pgr/genesys-server/issues/182#note_80321.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/21Bug with updateImageMetadata2017-10-27T16:21:21+02:00Andrey Lugovskiya.lugovskiy@aimprosoft.comBug with updateImageMetadataorg.genesys.filerepository.service.impl.RepositoryServiceImpl#updateImageMetadata there are refreshed source model instead target.org.genesys.filerepository.service.impl.RepositoryServiceImpl#updateImageMetadata there are refreshed source model instead target.1.02017-10-24https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/22ACL support2018-09-05T15:47:59+02:00Matija ObrezaACL supportEnable ACL support on `RepositoryFile`. That means we depend on **app-blocks-security** module instead of **core** alone.
Add permission checks on services.
This issue is closely related to #23 Enable ACL support on `RepositoryFile`. That means we depend on **app-blocks-security** module instead of **core** alone.
Add permission checks on services.
This issue is closely related to #23 1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/23Repository Paths2018-09-21T14:51:14+02:00Matija ObrezaRepository PathsThe repository does not manage paths of repository files, they are plain attributes. To be able to manage and control access to various areas of the repository we need to introduce a new `RepositoryFolder` entity with ACL support.
All `...The repository does not manage paths of repository files, they are plain attributes. To be able to manage and control access to various areas of the repository we need to introduce a new `RepositoryFolder` entity with ACL support.
All `RepositoryFile` on that `RepositoryPath` inherit ACL permissions from the path, but also retain their own ACL entries. This allows for efficient management of permissions over various paths in the repository and handles file movement.
# Parent path
The parent path must exist for every path, except repository root. The path OID must have a parent OID set so that permissions are properly propagated.
# Renaming paths
The **repository path** is designed to be immutable and it's `path` attribute cannot be modified. Entries have to be moved first and the path deleted in order to "change it".
# Path ownership
The path OID is owned by whoever creates it.1.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/24Release 0.92017-12-18T21:36:35+01:00Matija ObrezaRelease 0.9Release 0.9Release 0.9Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/25"Owning entity" of repository file2020-04-14T08:41:12+02:00Matija Obreza"Owning entity" of repository fileFor purposes of automatic cleanup (deleting files from repository) and permission management we need to somehow record what entity "owns" the repository entry.
1. Adding a file must require specifying its owning entity and when that ent...For purposes of automatic cleanup (deleting files from repository) and permission management we need to somehow record what entity "owns" the repository entry.
1. Adding a file must require specifying its owning entity and when that entity is removed, we should also remove the files associated with it.
1. The owning entity, when an instance of `AclEntity`, should also provide default permissions for the file.
All calls to add repository file should somehow provide information on the owning entity. But because we don't know the rest of the data model that may be difficult.
We need an entity listener that will delete files associated with entities that no longer exist.
In some cases, the owning entity could be the `Folder` implemented in #23 but even that entity requires an owner.1.1https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/26Permission checks fail2018-04-30T12:52:49+02:00Matija ObrezaPermission checks failPermission checks fail because of different parameter names between the interface and service implementation.
genesys-pgr/application-blocks#29Permission checks fail because of different parameter names between the interface and service implementation.
genesys-pgr/application-blocks#291.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/27FTP and Spring Security2018-08-31T17:38:20+02:00Matija ObrezaFTP and Spring SecurityWe introduced permission checks on RepositoryService some time ago. The FTP server does not switch to the currently logged
in user when invoking repository methods.We introduced permission checks on RepositoryService some time ago. The FTP server does not switch to the currently logged
in user when invoking repository methods.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/28Hibernate 52020-04-14T09:15:16+02:00Matija ObrezaHibernate 5The project works with Hibernate 4. Update to Hibernate 5.
genesys-pgr/application-blocks#31The project works with Hibernate 4. Update to Hibernate 5.
genesys-pgr/application-blocks#312.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/29Apache Mina logging2023-09-01T08:17:21+02:00Matija ObrezaApache Mina loggingPlease explore how we can reduce the verbosity of apache mina (FTP). The logs are filling up with:
```
10:02:50,349 pool-4-thread-19 ERROR o.a.f.i.DefaultFtpHandler:157 - Exception caught, closing session
javax.net.ssl.SSLHandshakeExce...Please explore how we can reduce the verbosity of apache mina (FTP). The logs are filling up with:
```
10:02:50,349 pool-4-thread-19 ERROR o.a.f.i.DefaultFtpHandler:157 - Exception caught, closing session
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:519)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:947)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:535)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:703)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:659)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:648)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1120)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at sun.security.ssl.EngineInputRecord.bytesInCompletePacket(EngineInputRecord.java:156)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:868)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.apache.mina.filter.ssl.SslHandler.unwrap(SslHandler.java:754)
at org.apache.mina.filter.ssl.SslHandler.unwrapHandshake(SslHandler.java:689)
at org.apache.mina.filter.ssl.SslHandler.handshake(SslHandler.java:575)
at org.apache.mina.filter.ssl.SslHandler.messageReceived(SslHandler.java:360)
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:500)
... 15 more
```
Can we just log the exception message?Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/30Blacklist originalFilenames in Repository2019-10-18T16:37:43+02:00Matija ObrezaBlacklist originalFilenames in RepositoryWe need a mechanism to prevent users from uploading `Thumbs.db` and files starting with `.` or `~`.
The configuration options should be declared in *application.properties*.
`addFile` or `addImage` should throw an exception if the `rep...We need a mechanism to prevent users from uploading `Thumbs.db` and files starting with `.` or `~`.
The configuration options should be declared in *application.properties*.
`addFile` or `addImage` should throw an exception if the `repositoryFile.originalFilename` is invalid.
Perhaps use the ant file matcher instead of regexp?Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/31FileRepository metadata file name conflict2020-01-31T10:41:08+01:00Matija ObrezaFileRepository metadata file name conflict`MetadataInStorageAspect` saves `{uuid}.json` next to the `{uuid}{extension}` file.
When the extension is `.json`, the metadata will overwrite actual file contents.`MetadataInStorageAspect` saves `{uuid}.json` next to the `{uuid}{extension}` file.
When the extension is `.json`, the metadata will overwrite actual file contents.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/32JOINED inheritance strategy2020-04-03T09:35:41+02:00Matija ObrezaJOINED inheritance strategy`RepositoryFile` uses `TABLE_PER_CLASS` inheritance strategy and that's causing performance problems when querying (e.g. `Dataset#files` problem described in genesys-pgr/genesys-server#509).
Simple testing (comments in genesys-pgr/gene...`RepositoryFile` uses `TABLE_PER_CLASS` inheritance strategy and that's causing performance problems when querying (e.g. `Dataset#files` problem described in genesys-pgr/genesys-server#509).
Simple testing (comments in genesys-pgr/genesys-server!535) shows that using JOINED inheritance results in much better performance.
Update code and `liquibase-changeLog.yml` for use of `@Inheritance(strategy = InheritanceType.JOINED)` in `RepositoryFile` class.
Database migration must include:
1. Copy data from `repository_image` to `repository_file`
1. Drop unnecessary columns.
1. Copy data from `repository_document` to `repository_file`
1. Drop unnecessary columns.
I hope that primary key `id` is unique across these tables.1.1Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/33Bump version2020-04-03T09:33:05+02:00Matija ObrezaBump version!38 and #32 introduce a database model change. Bump version.!38 and #32 introduce a database model change. Bump version.1.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/35Always generate thumbnails for images2020-08-18T11:29:07+02:00Matija ObrezaAlways generate thumbnails for imagesThe current implementation generates image thumbnails only for images that are linked to an image gallery.
It would be more sensible to generate thumbnails for any image added to the file repository and then remove the thumbnails when ...The current implementation generates image thumbnails only for images that are linked to an image gallery.
It would be more sensible to generate thumbnails for any image added to the file repository and then remove the thumbnails when the image is removed.
Please move thumbnail generation to `RepositoryServiceImpl`.
This will be helpful for grin-global/grin-global-ui!792.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/36Java 112021-01-04T11:17:00+01:00Maxym BorodenkoJava 11Upgrade to Java 11.Upgrade to Java 11.3.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/37Test coverage 70%2021-07-23T14:14:46+02:00Matija ObrezaTest coverage 70%In this ticket add unit tests or remove unused code from this project to reach code coverage of **70%**.In this ticket add unit tests or remove unused code from this project to reach code coverage of **70%**.3.2Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/38Upgrade dependencies2021-07-23T11:03:36+02:00Matija ObrezaUpgrade dependenciesPlease upgrade maven dependencies where possible.Please upgrade maven dependencies where possible.3.1Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/39Renaming folders: Security aspects2021-11-05T19:38:08+01:00Matija ObrezaRenaming folders: Security aspectsPlease update the `renameFolder` method to properly check that the user has `MANAGE` permission on the source folder -- and that the user has `WRITE` permission in the destination folder (if it exists -- or `ADMINISTRATOR` role if target...Please update the `renameFolder` method to properly check that the user has `MANAGE` permission on the source folder -- and that the user has `WRITE` permission in the destination folder (if it exists -- or `ADMINISTRATOR` role if target parent is `/`).
After creating the new `RepositoryFolder` the permissions assigned directly to the source folder are **copied** to the target folder.3.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/40webp thumbnails2022-03-15T21:03:12+01:00Matija Obrezawebp thumbnailsI would like to add support for `.webp` thumbnail generation from source images.
https://github.com/haraldk/TwelveMonkeys
```xml
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-webp</artifactId>
<versi...I would like to add support for `.webp` thumbnail generation from source images.
https://github.com/haraldk/TwelveMonkeys
```xml
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-webp</artifactId>
<version>3.8.1</version>
</dependency>
```
Please note the instructions in https://github.com/haraldk/TwelveMonkeys#deploying-the-plugins-in-a-web-app3.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/41Download folder as Zip archive2022-03-18T18:31:57+01:00Matija ObrezaDownload folder as Zip archiveAdd the API to stream the contents of selected folder as a ZIP archive.Add the API to stream the contents of selected folder as a ZIP archive.3.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/42Extract ZIP archive2022-03-31T14:39:14+02:00Matija ObrezaExtract ZIP archiveAdd API option to extract an existing ZIP archive in file repository into the current folder. The source `.zip` file should remain in the folder.
Folders in the ZIP file needs to be recreated in the folder of the archive file.
For the ...Add API option to extract an existing ZIP archive in file repository into the current folder. The source `.zip` file should remain in the folder.
Folders in the ZIP file needs to be recreated in the folder of the archive file.
For the Unit test you can recycle the *downloadZip()*, upload to another folder and unpack it.3.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/43DatabaseBytesStorage2022-09-06T15:58:45+02:00Matija ObrezaDatabaseBytesStorageSome want to store all the file bytes in their database for simple backup and restore. This is mostly usable for smaller genebanks.
Please add a new `DatabaseStorageServiceImpl` that will keep bytes in the database.Some want to store all the file bytes in their database for simple backup and restore. This is mostly usable for smaller genebanks.
Please add a new `DatabaseStorageServiceImpl` that will keep bytes in the database.4.0Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/44Dependencies2023-10-12T20:35:58+02:00Matija ObrezaDependenciesCheck https://sbom.sonatype.com/report/T1-118f0f57da8c6b3097cc-378c01d9c77d3-1695215191-a829ea95f2d2446889e7d748bd0ac9f8 and update dependencies.Check https://sbom.sonatype.com/report/T1-118f0f57da8c6b3097cc-378c01d9c77d3-1695215191-a829ea95f2d2446889e7d748bd0ac9f8 and update dependencies.5.1Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/45Spotbugs2024-03-05T10:46:04+01:00Matija ObrezaSpotbugsAdd Spotbugs to gradle as in genesys-pgr/application-blocks!147 and fix the obvious problems.Add Spotbugs to gradle as in genesys-pgr/application-blocks!147 and fix the obvious problems.5.2Artem HrybeniukArtem Hrybeniuk