storage backend classes updated
This commit is contained in:
parent
545ad3160a
commit
8e90fb4a90
|
@ -16,6 +16,7 @@
|
|||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
|
|
17
pom.xml
17
pom.xml
|
@ -42,11 +42,7 @@
|
|||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-clients</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -74,15 +70,4 @@
|
|||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<target>1.8</target>
|
||||
<source>1.8</source>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -8,7 +8,7 @@ public class Constants {
|
|||
public static final String versionPrefix = "_v";
|
||||
public static final String MONGO_STORAGE = "gcube-mongo";
|
||||
|
||||
public static final String DEFAULT_MINIO_STORAGE = "default-gcube-minio";
|
||||
public static final String DEFAULT_S3_STORAGE = "default-gcube-s3";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public class BackendGenericError extends StorageHubException{
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public class IdNotFoundException extends StorageHubException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public class InvalidCallParameters extends StorageHubException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public class InvalidItemException extends StorageHubException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public class ItemAlreadyExistsException extends StorageHubException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public class ItemLockedException extends StorageHubException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public class PluginInitializationException extends StorageHubException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public class PluginNotFoundException extends StorageHubException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public abstract class StorageHubException extends Exception {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.gcube.common.storagehub.model.exceptions;
|
||||
|
||||
import org.gcube.common.clients.delegates.Unrecoverable;
|
||||
|
||||
@Unrecoverable
|
||||
public class UserNotAuthorizedException extends StorageHubException {
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,4 +12,5 @@ import lombok.Setter;
|
|||
@RootNode("nthl:externalFolder")
|
||||
public class ExternalFolder extends FolderItem {
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,6 @@ import lombok.Setter;
|
|||
public class FolderItem extends Item {
|
||||
|
||||
@NodeAttribute(value= PAYLOADBACKEND)
|
||||
PayloadBackend backend = new PayloadBackend(Constants.DEFAULT_MINIO_STORAGE, null);
|
||||
PayloadBackend backend = new PayloadBackend(Constants.DEFAULT_S3_STORAGE, null);
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,10 @@ public interface StorageBackendFactory {
|
|||
|
||||
String getName();
|
||||
|
||||
default boolean isSystemStorage() {
|
||||
return false;
|
||||
}
|
||||
|
||||
StorageBackend create(PayloadBackend payloadConfiguration) throws InvalidCallParameters;
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package org.gcube.common.storagehub.model.storages;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class StorageDescriptor {
|
||||
|
||||
String name;
|
||||
}
|
Loading…
Reference in New Issue