Improving library

This commit is contained in:
Luca Frosini 2023-05-29 16:47:02 +02:00
parent a3ed8a3d8d
commit c097da60e6
4 changed files with 15 additions and 3 deletions

View File

@ -2,6 +2,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for StorageHub Application Persistence
## [v3.3.0-SNAPSHOT]
- Added GENERATING_APPLICATION_NAME and GENERATING_APPLICATION_METADATA_VERSION to be used in Metadata
## [v3.2.0]
- Added dependency to be able to compile with JDK 11

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.data-publishing</groupId>
<artifactId>storagehub-application-persistence</artifactId>
<version>3.2.0</version>
<version>3.3.0-SNAPSHOT</version>
<name>StorageHub Application Persistence</name>
<description>
This library allows any application to persist in its workspace home any

View File

@ -4,6 +4,9 @@ import org.gcube.common.storagehub.model.Metadata;
public interface MetadataMatcher {
public static final String GENERATING_APPLICATION_NAME = "Generating Application Name";
public static final String GENERATING_APPLICATION_METADATA_VERSION = "Generating Application Version";
public boolean check(Metadata metadata);
}

View File

@ -200,8 +200,12 @@ public class StorageHubManagement {
public void removePersistedFile(String filename, String mimeType) throws Exception {
getPersistedFile(filename, mimeType);
if(this.persitedFile !=null) {
this.persitedFile.delete();
removePersistedFile(this.persitedFile);
}
public void removePersistedFile(FileContainer fileContainer) throws Exception {
if(fileContainer !=null) {
fileContainer.delete();
}
}