update
This commit is contained in:
parent
09879535d2
commit
a1b69aee6a
|
@ -14,6 +14,7 @@
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||||
org.eclipse.jdt.core.compiler.release=disabled
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
org.eclipse.jdt.core.compiler.source=1.8
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +26,10 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="storagehub">
|
<wb-module deploy-name="storagehub">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +53,10 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,7 +80,10 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,12 +107,17 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
|
<dependent-module archiveName="common-authorization-3.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/authorization-common-library/authorization-common-library">
|
||||||
<dependent-module archiveName="storagehub-script-utils-1.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/storagehub-scripting-util/storagehub-scripting-util">
|
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,7 +141,10 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="storagehub"/>
|
<property name="context-root" value="storagehub"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -148,7 +168,10 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="java-output-path" value="/storagehub-webapp_BRANCH/target/classes"/>
|
<property name="java-output-path" value="/storagehub-webapp_BRANCH/target/classes"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,7 +195,10 @@
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<faceted-project>
|
<faceted-project>
|
||||||
<fixed facet="wst.jsdt.web"/>
|
<fixed facet="wst.jsdt.web"/>
|
||||||
<installed facet="java" version="1.8"/>
|
|
||||||
<installed facet="jst.web" version="3.0"/>
|
<installed facet="jst.web" version="3.0"/>
|
||||||
<installed facet="jst.jaxrs" version="2.0"/>
|
<installed facet="jst.jaxrs" version="2.0"/>
|
||||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||||
|
<installed facet="java" version="1.8"/>
|
||||||
</faceted-project>
|
</faceted-project>
|
||||||
|
|
|
@ -8,5 +8,5 @@ FROM smartgears-distribution:4.0.0-java11-tomcat9
|
||||||
COPY ./docker/container.ini /etc/
|
COPY ./docker/container.ini /etc/
|
||||||
RUN unzip /tomcat/webapps/storagehub.war -d /tomcat/webapps/storagehub
|
RUN unzip /tomcat/webapps/storagehub.war -d /tomcat/webapps/storagehub
|
||||||
RUN rm /tomcat/webapps/storagehub.war
|
RUN rm /tomcat/webapps/storagehub.war
|
||||||
COPY ./docker/storage-settings.properties /tomcat/webapps/storagehub/classes/META-INF
|
COPY ./docker/storage-settings.properties /tomcat/webapps/storagehub/WEB-INF/classes/
|
||||||
RUN sed -i "s/{{adminId}}/$REPOUSER/g; s/{{adminPwd}}/$REPOPWD/g" /tomcat/webapps/storagehub/WEB-INF/web.xml
|
RUN sed -i "s/{{adminId}}/$REPOUSER/g; s/{{adminPwd}}/$REPOPWD/g" /tomcat/webapps/storagehub/WEB-INF/web.xml
|
|
@ -23,17 +23,16 @@ services:
|
||||||
- '8081:8080'
|
- '8081:8080'
|
||||||
minio:
|
minio:
|
||||||
image: minio/minio
|
image: minio/minio
|
||||||
command:
|
|
||||||
minio server minio_data:/data
|
|
||||||
environment:
|
|
||||||
- "MINIO_ACCESS_KEY=SHUBTEST"
|
|
||||||
- "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCY"
|
|
||||||
ports:
|
ports:
|
||||||
- '9000'
|
- "9000:9000"
|
||||||
|
- "9001:9001"
|
||||||
volumes:
|
volumes:
|
||||||
- 'minio_data:/data'
|
- minio_storage:/data
|
||||||
|
environment:
|
||||||
|
MINIO_ROOT_USER: SHUBTEST
|
||||||
|
MINIO_ROOT_PASSWORD: wJalrXUtnFEMI/K7MDENG/bPxRfiCY
|
||||||
|
command: server --console-address ":9001" /data
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
minio_data:
|
minio_storage: {}
|
||||||
driver: local
|
|
||||||
|
|
||||||
|
|
|
@ -1,44 +1,25 @@
|
||||||
<configuration scan="true" debug="false">
|
<configuration scan="true" debug="true">
|
||||||
|
|
||||||
<!-- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> -->
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
<!-- <encoder> -->
|
<encoder>Ï
|
||||||
<!-- <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> -->
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
<!-- </encoder> -->
|
</encoder>
|
||||||
<!-- </appender> -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <root level="debug"> -->
|
|
||||||
<!-- <appender-ref ref="STDOUT" /> -->
|
|
||||||
<!-- </root> -->
|
|
||||||
|
|
||||||
<appender name="FILE"
|
|
||||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>/tomcat/logs/ghn.log</file>
|
|
||||||
<append>true</append>
|
|
||||||
<encoder>
|
|
||||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0}: %msg%n
|
|
||||||
</pattern>
|
|
||||||
</encoder>
|
|
||||||
<rollingPolicy
|
|
||||||
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<fileNamePattern>${LOGFILE}/ghn.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<maxHistory>30</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<logger name="org.gcube" level="DEBUG" />
|
||||||
|
<logger name="org.gcube.smartgears" level="TRACE" />
|
||||||
|
<logger name="org.gcube.smartgears.handlers" level="TRACE"/>
|
||||||
|
<logger name="org.gcube.common.events" level="WARN" />
|
||||||
|
<logger name="org.gcube.data.publishing" level="ERROR" />
|
||||||
|
<logger name="org.gcube.documentstore" level="ERROR" />
|
||||||
|
<logger name="org.gcube.common.core.publisher.is.legacy" level="TRACE" />
|
||||||
|
<logger name="org.gcube.data.access" level="TRACE" />
|
||||||
|
|
||||||
|
|
||||||
<!-- <logger name="org.gcube" level="DEBUG" /> -->
|
<root level="WARN">
|
||||||
<!-- <logger name="org.gcube.smartgears" level="TRACE" /> -->
|
<appender-ref ref="STDOUT" />
|
||||||
<!-- <logger name="org.gcube.smartgears.handlers" level="TRACE"/> -->
|
|
||||||
<!-- <logger name="org.gcube.common.events" level="WARN" /> -->
|
|
||||||
<!-- <logger name="org.gcube.data.publishing" level="ERROR" /> -->
|
|
||||||
<!-- <logger name="org.gcube.documentstore" level="ERROR" /> -->
|
|
||||||
<!-- <logger name="org.gcube.common.core.publisher.is.legacy" level="TRACE" /> -->
|
|
||||||
<!-- <logger name="org.gcube.data.access" level="TRACE" /> -->
|
|
||||||
|
|
||||||
|
|
||||||
<root level="TRACE">
|
|
||||||
<appender-ref ref="FILE" />
|
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
|
@ -1,10 +1,10 @@
|
||||||
default.bucketName=storagehub-dev
|
default.bucketName=storagehub-dev
|
||||||
default.key=SHUBTEST
|
default.key=SHUBTEST
|
||||||
default.secret=wJalrXUtnFEMI/K7MDENG/bPxRfiCY
|
default.secret=wJalrXUtnFEMI/K7MDENG/bPxRfiCY
|
||||||
default.url=https://localhost:9000/
|
default.url=http://minio:9000
|
||||||
default.createBucket=true
|
default.createBucket=true
|
||||||
volatile.bucketName=storagehub-volatile-dev
|
volatile.bucketName=storagehub-volatile-dev
|
||||||
volatile.key=SHUBTEST
|
volatile.key=SHUBTEST
|
||||||
volatile.secret=wJalrXUtnFEMI/K7MDENG/bPxRfiCY
|
volatile.secret=wJalrXUtnFEMI/K7MDENG/bPxRfiCY
|
||||||
volatile.url=https://localhost:9000/
|
volatile.url=http://minio:9000
|
||||||
volatile.createBucket=true
|
volatile.createBucket=true
|
108
pom.xml
108
pom.xml
|
@ -1,29 +1,23 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>maven-parent</artifactId>
|
<artifactId>maven-parent</artifactId>
|
||||||
<groupId>org.gcube.tools</groupId>
|
<groupId>org.gcube.tools</groupId>
|
||||||
<version>1.1.0</version>
|
<version>1.1.0</version>
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.gcube.data.access</groupId>
|
<groupId>org.gcube.data.access</groupId>
|
||||||
<artifactId>storagehub</artifactId>
|
<artifactId>storagehub</artifactId>
|
||||||
<version>1.5.0-SNAPSHOT</version>
|
<version>1.5.0-SNAPSHOT</version>
|
||||||
<name>storagehub</name>
|
<name>storagehub</name>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/storagehub.git</connection>
|
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/storagehub.git</connection>
|
||||||
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/storagehub.git</developerConnection>
|
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/storagehub.git</developerConnection>
|
||||||
<url>https://code-repo.d4science.org/gCubeSystem/storagehub</url>
|
<url>https://code-repo.d4science.org/gCubeSystem/storagehub</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
|
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<webappDirectory>${project.basedir}/src/main/webapp/WEB-INF</webappDirectory>
|
<webappDirectory>${project.basedir}/src/main/webapp/WEB-INF</webappDirectory>
|
||||||
<jackrabbit.version>2.20.7</jackrabbit.version>
|
<jackrabbit.version>2.20.7</jackrabbit.version>
|
||||||
|
@ -37,10 +31,9 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<enunciate.version>2.14.0</enunciate.version>
|
<enunciate.version>2.14.0</enunciate.version>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<!-- <maven.compiler.source>11</maven.compiler.source>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.target>11</maven.compiler.target> -->
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -57,95 +50,73 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-parsers -->
|
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-parsers -->
|
||||||
|
|
||||||
|
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.aspectj</groupId>
|
<groupId>org.aspectj</groupId>
|
||||||
<artifactId>aspectjrt</artifactId>
|
<artifactId>aspectjrt</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-smartgears</artifactId>
|
<artifactId>common-smartgears</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-smartgears-app</artifactId>
|
<artifactId>common-smartgears-app</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>authorization-control-library</artifactId>
|
<artifactId>authorization-control-library</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>common-authorization</artifactId>
|
<artifactId>common-authorization</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-encryption</artifactId>
|
<artifactId>common-encryption</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-scope-maps</artifactId>
|
<artifactId>common-scope-maps</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-scope</artifactId>
|
<artifactId>common-scope</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>storagehub-model</artifactId>
|
<artifactId>storagehub-model</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.data.access</groupId>
|
<groupId>org.gcube.data.access</groupId>
|
||||||
<artifactId>storagehub-script-utils</artifactId>
|
<artifactId>storagehub-script-utils</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT,2.0.0)</version>
|
<version>[1.0.0-SNAPSHOT,2.0.0)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.itextpdf</groupId>
|
<groupId>com.itextpdf</groupId>
|
||||||
<artifactId>itextpdf</artifactId>
|
<artifactId>itextpdf</artifactId>
|
||||||
<version>5.5.13.2</version>
|
<version>5.5.13.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on -->
|
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bouncycastle</groupId>
|
<groupId>org.bouncycastle</groupId>
|
||||||
<artifactId>bcprov-jdk15on</artifactId>
|
<artifactId>bcprov-jdk15on</artifactId>
|
||||||
<version>1.62</version>
|
<version>1.62</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>gxJRS</artifactId>
|
<artifactId>gxJRS</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- JCR dependencies -->
|
<!-- JCR dependencies -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.jcr</groupId>
|
<groupId>javax.jcr</groupId>
|
||||||
<artifactId>jcr</artifactId>
|
<artifactId>jcr</artifactId>
|
||||||
|
@ -163,26 +134,21 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency> <groupId>org.apache.jackrabbit</groupId> <artifactId>jackrabbit-jcr-server</artifactId>
|
<!-- <dependency> <groupId>org.apache.jackrabbit</groupId> <artifactId>jackrabbit-jcr-server</artifactId>
|
||||||
<version>${jackrabbit.version}</version> </dependency> -->
|
<version>${jackrabbit.version}</version> </dependency> -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-annotations</artifactId>
|
<artifactId>jackson-annotations</artifactId>
|
||||||
<version>${jackson.version}</version>
|
<version>${jackson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-core</artifactId>
|
<artifactId>jackson-core</artifactId>
|
||||||
<version>${jackson.version}</version>
|
<version>${jackson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
<version>${jackson.version}</version>
|
<version>${jackson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-core -->
|
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-core -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.tika</groupId>
|
<groupId>org.apache.tika</groupId>
|
||||||
|
@ -194,58 +160,44 @@
|
||||||
<artifactId>tika-parsers-standard-package</artifactId>
|
<artifactId>tika-parsers-standard-package</artifactId>
|
||||||
<version>${tika.version}</version>
|
<version>${tika.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.tika</groupId>
|
|
||||||
<artifactId>tika-parser-microsoft-module</artifactId>
|
|
||||||
<version>${tika.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- needed to manage strange image types -->
|
<!-- needed to manage strange image types -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.twelvemonkeys.imageio</groupId>
|
<groupId>com.twelvemonkeys.imageio</groupId>
|
||||||
<artifactId>imageio-jpeg</artifactId>
|
<artifactId>imageio-jpeg</artifactId>
|
||||||
<version>3.3.2</version>
|
<version>3.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.twelvemonkeys.imageio</groupId>
|
<groupId>com.twelvemonkeys.imageio</groupId>
|
||||||
<artifactId>imageio-bmp</artifactId>
|
<artifactId>imageio-bmp</artifactId>
|
||||||
<version>3.3.2</version>
|
<version>3.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.twelvemonkeys.imageio</groupId>
|
<groupId>com.twelvemonkeys.imageio</groupId>
|
||||||
<artifactId>imageio-core</artifactId>
|
<artifactId>imageio-core</artifactId>
|
||||||
<version>3.3.2</version>
|
<version>3.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- jersey & weld -->
|
<!-- jersey & weld -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
<version>3.0.1</version>
|
<version>3.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/javax.interceptor/javax.interceptor-api -->
|
<!-- https://mvnrepository.com/artifact/javax.interceptor/javax.interceptor-api -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.interceptor</groupId>
|
<groupId>javax.interceptor</groupId>
|
||||||
<artifactId>javax.interceptor-api</artifactId>
|
<artifactId>javax.interceptor-api</artifactId>
|
||||||
<version>1.2.2</version>
|
<version>1.2.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/javax.enterprise/cdi-api -->
|
<!-- https://mvnrepository.com/artifact/javax.enterprise/cdi-api -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.enterprise</groupId>
|
<groupId>javax.enterprise</groupId>
|
||||||
<artifactId>cdi-api</artifactId>
|
<artifactId>cdi-api</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.ws.rs</groupId>
|
<groupId>javax.ws.rs</groupId>
|
||||||
<artifactId>javax.ws.rs-api</artifactId>
|
<artifactId>javax.ws.rs-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.containers</groupId>
|
<groupId>org.glassfish.jersey.containers</groupId>
|
||||||
<artifactId>jersey-container-servlet</artifactId>
|
<artifactId>jersey-container-servlet</artifactId>
|
||||||
|
@ -254,14 +206,12 @@
|
||||||
<groupId>org.glassfish.jersey.containers</groupId>
|
<groupId>org.glassfish.jersey.containers</groupId>
|
||||||
<artifactId>jersey-container-servlet-core</artifactId>
|
<artifactId>jersey-container-servlet-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.inject/jersey-hk2 -->
|
<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.inject/jersey-hk2 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.inject</groupId>
|
<groupId>org.glassfish.jersey.inject</groupId>
|
||||||
<artifactId>jersey-hk2</artifactId>
|
<artifactId>jersey-hk2</artifactId>
|
||||||
<version>2.30.1</version>
|
<version>2.30.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.core</groupId>
|
<groupId>org.glassfish.jersey.core</groupId>
|
||||||
<artifactId>jersey-server</artifactId>
|
<artifactId>jersey-server</artifactId>
|
||||||
|
@ -279,74 +229,60 @@
|
||||||
<artifactId>weld-servlet-core</artifactId>
|
<artifactId>weld-servlet-core</artifactId>
|
||||||
<version>3.1.0.Final</version>
|
<version>3.1.0.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.jboss/jandex -->
|
<!-- https://mvnrepository.com/artifact/org.jboss/jandex -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss</groupId>
|
<groupId>org.jboss</groupId>
|
||||||
<artifactId>jandex</artifactId>
|
<artifactId>jandex</artifactId>
|
||||||
<version>2.2.2.Final</version>
|
<version>2.2.2.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
<version>3.0.1</version>
|
<version>3.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.core/jersey-common -->
|
<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.core/jersey-common -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.core</groupId>
|
<groupId>org.glassfish.jersey.core</groupId>
|
||||||
<artifactId>jersey-common</artifactId>
|
<artifactId>jersey-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.media</groupId>
|
<groupId>org.glassfish.jersey.media</groupId>
|
||||||
<artifactId>jersey-media-json-jackson</artifactId>
|
<artifactId>jersey-media-json-jackson</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.media</groupId>
|
<groupId>org.glassfish.jersey.media</groupId>
|
||||||
<artifactId>jersey-media-multipart</artifactId>
|
<artifactId>jersey-media-multipart</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>postgresql</groupId>
|
<groupId>postgresql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
<version>9.1-901.jdbc4</version>
|
<version>9.1-901.jdbc4</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.reflections</groupId>
|
<groupId>org.reflections</groupId>
|
||||||
<artifactId>reflections</artifactId>
|
<artifactId>reflections</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>16.0</version>
|
<version>16.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-compress</artifactId>
|
<artifactId>commons-compress</artifactId>
|
||||||
<version>1.17</version>
|
<version>1.22</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.tukaani</groupId>
|
<groupId>org.tukaani</groupId>
|
||||||
<artifactId>xz</artifactId>
|
<artifactId>xz</artifactId>
|
||||||
<version>1.5</version>
|
<version>1.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
|
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
|
||||||
<artifactId>jersey-test-framework-provider-simple</artifactId>
|
<artifactId>jersey-test-framework-provider-simple</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.derby</groupId>
|
<groupId>org.apache.derby</groupId>
|
||||||
<artifactId>derby</artifactId>
|
<artifactId>derby</artifactId>
|
||||||
|
@ -359,30 +295,30 @@
|
||||||
<version>10.8.2.2</version>
|
<version>10.8.2.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
|
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>2.7</version>
|
<version>2.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.vlkan.rfos</groupId>
|
<groupId>com.vlkan.rfos</groupId>
|
||||||
<artifactId>rotating-fos</artifactId>
|
<artifactId>rotating-fos</artifactId>
|
||||||
<version>0.9.2</version>
|
<version>0.9.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>jul-to-slf4j</artifactId>
|
<artifactId>jul-to-slf4j</artifactId>
|
||||||
<version>${slf4j.version}</version>
|
<version>${slf4j.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-to-slf4j -->
|
||||||
<!-- enunciate deps -->
|
<!-- https://mvnrepository.com/artifact/org.slf4j/log4j-over-slf4j -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>log4j-over-slf4j</artifactId>
|
||||||
|
<version>2.0.7</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- enunciate deps
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.webcohesion.enunciate</groupId>
|
<groupId>com.webcohesion.enunciate</groupId>
|
||||||
<artifactId>enunciate-core-annotations</artifactId>
|
<artifactId>enunciate-core-annotations</artifactId>
|
||||||
|
@ -394,35 +330,29 @@
|
||||||
<artifactId>enunciate-rt-util</artifactId>
|
<artifactId>enunciate-rt-util</artifactId>
|
||||||
<version>${enunciate.version}</version>
|
<version>${enunciate.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Storage dependencies -->
|
<!-- Storage dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.contentmanagement</groupId>
|
<groupId>org.gcube.contentmanagement</groupId>
|
||||||
<artifactId>storage-manager-core</artifactId>
|
<artifactId>storage-manager-core</artifactId>
|
||||||
<version>[4.0.0-SNAPSHOT,5.0.0-SNAPSHOT)</version>
|
<version>[4.0.0-SNAPSHOT,5.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.contentmanagement</groupId>
|
<groupId>org.gcube.contentmanagement</groupId>
|
||||||
<artifactId>storage-manager-wrapper</artifactId>
|
<artifactId>storage-manager-wrapper</artifactId>
|
||||||
<version>[4.0.0-SNAPSHOT,5.0.0-SNAPSHOT)</version>
|
<version>[4.0.0-SNAPSHOT,5.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/io.minio/minio -->
|
<!-- https://mvnrepository.com/artifact/io.minio/minio -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.minio</groupId>
|
<groupId>io.minio</groupId>
|
||||||
<artifactId>minio</artifactId>
|
<artifactId>minio</artifactId>
|
||||||
<version>8.3.3</version>
|
<version>8.3.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.common</groupId>
|
<groupId>org.gcube.common</groupId>
|
||||||
<artifactId>storagehub-client-library</artifactId>
|
<artifactId>storagehub-client-library</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.testcontainers</groupId>
|
<groupId>org.testcontainers</groupId>
|
||||||
<artifactId>testcontainers</artifactId>
|
<artifactId>testcontainers</artifactId>
|
||||||
|
@ -436,15 +366,11 @@
|
||||||
<version>4.13.2</version>
|
<version>4.13.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.qos.logback</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>logback-classic</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
@ -512,14 +438,12 @@
|
||||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<!-- Enunciate Maven plugin
|
||||||
<!-- Enunciate Maven plugin -->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.webcohesion.enunciate</groupId>
|
<groupId>com.webcohesion.enunciate</groupId>
|
||||||
<artifactId>enunciate-maven-plugin</artifactId>
|
<artifactId>enunciate-maven-plugin</artifactId>
|
||||||
<version>${enunciate.version}</version>
|
<version>${enunciate.version}</version>
|
||||||
<configuration>
|
<configuration></configuration>
|
||||||
</configuration>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>assemble</id>
|
<id>assemble</id>
|
||||||
|
@ -528,8 +452,7 @@
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin> -->
|
||||||
|
|
||||||
<!-- Copy Enunciate Documentation from your-application/docs to your-application.war -->
|
<!-- Copy Enunciate Documentation from your-application/docs to your-application.war -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
@ -556,5 +479,4 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -17,7 +17,6 @@ import org.gcube.common.storagehub.model.exceptions.StorageHubException;
|
||||||
import org.gcube.data.access.storagehub.types.LinkType;
|
import org.gcube.data.access.storagehub.types.LinkType;
|
||||||
import org.gcube.data.access.storagehub.types.PublicLink;
|
import org.gcube.data.access.storagehub.types.PublicLink;
|
||||||
import org.gcube.smartgears.ContextProvider;
|
import org.gcube.smartgears.ContextProvider;
|
||||||
import org.gcube.smartgears.provider.ProviderFactory;
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class PublicLinkHandler {
|
public class PublicLinkHandler {
|
||||||
|
|
|
@ -15,8 +15,6 @@ import javax.jcr.version.VersionManager;
|
||||||
|
|
||||||
import org.apache.jackrabbit.JcrConstants;
|
import org.apache.jackrabbit.JcrConstants;
|
||||||
import org.gcube.common.storagehub.model.NodeConstants;
|
import org.gcube.common.storagehub.model.NodeConstants;
|
||||||
import org.gcube.common.storagehub.model.exceptions.BackendGenericError;
|
|
||||||
import org.gcube.common.storagehub.model.exceptions.StorageHubException;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,9 @@ public class ContentHandlerFactory {
|
||||||
public ContentHandler create(String mimetype) throws Exception{
|
public ContentHandler create(String mimetype) throws Exception{
|
||||||
Class<? extends ContentHandler> handlerClass = handlerMap.get(mimetype);
|
Class<? extends ContentHandler> handlerClass = handlerMap.get(mimetype);
|
||||||
if (handlerClass!=null)
|
if (handlerClass!=null)
|
||||||
return handlerClass.newInstance();
|
return handlerClass.getDeclaredConstructor().newInstance();
|
||||||
else
|
else
|
||||||
return defaultHandler.newInstance();
|
return defaultHandler.getDeclaredConstructor().newInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,6 +179,7 @@ public class ItemHandler {
|
||||||
ArchiveEntry entry;
|
ArchiveEntry entry;
|
||||||
while ((entry = input.getNextEntry()) != null) {
|
while ((entry = input.getNextEntry()) != null) {
|
||||||
String entirePath = entry.getName();
|
String entirePath = entry.getName();
|
||||||
|
log.debug("reading new entry ------> ", entirePath);
|
||||||
if (entry.isDirectory()) {
|
if (entry.isDirectory()) {
|
||||||
log.debug("creating directory with entire path {} ", entirePath);
|
log.debug("creating directory with entire path {} ", entirePath);
|
||||||
createPath(entirePath, directoryNodeMap, parentDirectoryNode, params.getSession(), params.getUser());
|
createPath(entirePath, directoryNodeMap, parentDirectoryNode, params.getSession(), params.getUser());
|
||||||
|
@ -201,7 +202,7 @@ public class ItemHandler {
|
||||||
fileNode = createFileItemInternally(params.getSession(), parentNode, input, name, "",fileDetail, params.getUser(), false);
|
fileNode = createFileItemInternally(params.getSession(), parentNode, input, name, "",fileDetail, params.getUser(), false);
|
||||||
}
|
}
|
||||||
fileNodes.add(fileNode);
|
fileNodes.add(fileNode);
|
||||||
}catch(Exception e) {
|
}catch(Throwable e) {
|
||||||
log.warn("error getting file {}",entry.getName(),e);
|
log.warn("error getting file {}",entry.getName(),e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -394,7 +395,7 @@ public class ItemHandler {
|
||||||
handler.getContent().setPayloadBackend(info.getPayloadBackend());
|
handler.getContent().setPayloadBackend(info.getPayloadBackend());
|
||||||
log.debug("UPLOAD: content payload seta as {} ", handler.getContent().getPayloadBackend());
|
log.debug("UPLOAD: content payload seta as {} ", handler.getContent().getPayloadBackend());
|
||||||
return handler;
|
return handler;
|
||||||
}catch (Exception e) {
|
}catch (Throwable e) {
|
||||||
throw new BackendGenericError(e);
|
throw new BackendGenericError(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,16 @@ import org.gcube.common.storagehub.model.items.nodes.PayloadBackend;
|
||||||
import org.gcube.data.access.storagehub.handlers.plugins.StorageBackendHandler;
|
import org.gcube.data.access.storagehub.handlers.plugins.StorageBackendHandler;
|
||||||
import org.gcube.data.access.storagehub.storage.backend.impl.GcubeMinIoStorageBackendFactory;
|
import org.gcube.data.access.storagehub.storage.backend.impl.GcubeMinIoStorageBackendFactory;
|
||||||
import org.gcube.data.access.storagehub.storage.backend.impl.S3Backend;
|
import org.gcube.data.access.storagehub.storage.backend.impl.S3Backend;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ReadinessChecker
|
@ReadinessChecker
|
||||||
public class DefaultStorageCheck implements HealthCheck{
|
public class DefaultStorageCheck implements HealthCheck{
|
||||||
|
|
||||||
|
private static Logger log = LoggerFactory.getLogger(DefaultStorageCheck.class);
|
||||||
|
|
||||||
PayloadBackend defaultPayload = StorageBackendHandler.getDefaultPayloadForFolder();
|
PayloadBackend defaultPayload = StorageBackendHandler.getDefaultPayloadForFolder();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return String.format("default storage (%s)",defaultPayload.getStorageName());
|
return String.format("default storage (%s)",defaultPayload.getStorageName());
|
||||||
|
@ -22,11 +25,14 @@ public class DefaultStorageCheck implements HealthCheck{
|
||||||
@Override
|
@Override
|
||||||
public HealthCheckResponse check() {
|
public HealthCheckResponse check() {
|
||||||
try {
|
try {
|
||||||
if (((S3Backend)new GcubeMinIoStorageBackendFactory().create(defaultPayload)).isAlive())
|
GcubeMinIoStorageBackendFactory storageFactory =new GcubeMinIoStorageBackendFactory();
|
||||||
|
storageFactory.init();
|
||||||
|
if (((S3Backend)storageFactory.create(defaultPayload)).isAlive())
|
||||||
return HealthCheckResponse.builder(getName()).up().build();
|
return HealthCheckResponse.builder(getName()).up().build();
|
||||||
else
|
else
|
||||||
return HealthCheckResponse.builder(getName()).down().withMessage("error contacting storage").build();
|
return HealthCheckResponse.builder(getName()).down().withMessage("error contacting storage").build();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error("error checking defaultStorage",e);
|
||||||
return HealthCheckResponse.builder(getName()).down().withMessage(e.getMessage()).build();
|
return HealthCheckResponse.builder(getName()).down().withMessage(e.getMessage()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ public class ScriptManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AbstractScript.class.isAssignableFrom(clazz)) {
|
if (AbstractScript.class.isAssignableFrom(clazz)) {
|
||||||
AbstractScript scriptInstance = (AbstractScript) clazz.newInstance();
|
AbstractScript scriptInstance = (AbstractScript) clazz.getDeclaredConstructor().newInstance();
|
||||||
|
|
||||||
ApplicationContext appContext = ContextProvider.get();
|
ApplicationContext appContext = ContextProvider.get();
|
||||||
String serverHost = appContext.container().configuration().hostname();
|
String serverHost = appContext.container().configuration().hostname();
|
||||||
|
|
|
@ -54,8 +54,9 @@ public class GcubeMinIoStorageBackendFactory implements StorageBackendFactory {
|
||||||
Map<String, Object> params = new HashMap<String, Object>();
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
prop.forEach((k,v) -> { if (k.toString().startsWith(PROP_PREFIX)) params.put(k.toString().replace(PROP_PREFIX, ""), v.toString());});
|
prop.forEach((k,v) -> { if (k.toString().startsWith(PROP_PREFIX)) params.put(k.toString().replace(PROP_PREFIX, ""), v);});
|
||||||
return new Metadata(params);
|
|
||||||
|
return new Metadata(params);
|
||||||
|
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new RuntimeException("error initializing MinIO", ex);
|
throw new RuntimeException("error initializing MinIO", ex);
|
||||||
|
|
|
@ -6,7 +6,6 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import org.gcube.common.security.providers.SecretManagerProvider;
|
|
||||||
import org.gcube.common.storagehub.model.exceptions.StorageIdNotFoundException;
|
import org.gcube.common.storagehub.model.exceptions.StorageIdNotFoundException;
|
||||||
import org.gcube.common.storagehub.model.items.nodes.Content;
|
import org.gcube.common.storagehub.model.items.nodes.Content;
|
||||||
import org.gcube.common.storagehub.model.items.nodes.PayloadBackend;
|
import org.gcube.common.storagehub.model.items.nodes.PayloadBackend;
|
||||||
|
@ -50,16 +49,20 @@ public class S3Backend extends StorageBackend{
|
||||||
String accessKey = (String)parameters.get("key");
|
String accessKey = (String)parameters.get("key");
|
||||||
String secret = (String)parameters.get("secret");
|
String secret = (String)parameters.get("secret");
|
||||||
String url = (String)parameters.get("url");
|
String url = (String)parameters.get("url");
|
||||||
boolean createBucket = Boolean.getBoolean((String)parameters.get("createBucket"));
|
boolean createBucket = Boolean.valueOf((String)parameters.get("createBucket"));
|
||||||
|
|
||||||
|
log.debug("parameters are: backetName = {}, url = {}, createBucket = {}",this.bucketName, url, createBucket);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
client =
|
client =
|
||||||
MinioClient.builder()
|
MinioClient.builder()
|
||||||
.endpoint(url)
|
.endpoint(url)
|
||||||
.credentials(accessKey, secret)
|
.credentials(accessKey, secret)
|
||||||
.build();
|
.build();
|
||||||
if (createBucket && !client.bucketExists(BucketExistsArgs.builder().bucket(this.bucketName).build()))
|
if (createBucket && !client.bucketExists(BucketExistsArgs.builder().bucket(this.bucketName).build())) {
|
||||||
client.makeBucket(MakeBucketArgs.builder().bucket(this.bucketName).build());
|
client.makeBucket(MakeBucketArgs.builder().bucket(this.bucketName).build());
|
||||||
|
log.debug("bucket {} created",this.bucketName);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("error initializing s3",e);
|
log.error("error initializing s3",e);
|
||||||
|
@ -67,6 +70,19 @@ public class S3Backend extends StorageBackend{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isAlive() {
|
||||||
|
|
||||||
|
boolean toReturn = true;
|
||||||
|
try {
|
||||||
|
client.bucketExists(BucketExistsArgs.builder().bucket(this.bucketName).build());
|
||||||
|
}catch (Exception e) {
|
||||||
|
log.error("error checking aliveness",e);
|
||||||
|
toReturn = false;
|
||||||
|
}
|
||||||
|
log.debug("the S3 backend is {} Alive",toReturn?"":"not");
|
||||||
|
return toReturn;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaInfo onCopy(Content content, String newParentPath, String newName) {
|
public MetaInfo onCopy(Content content, String newParentPath, String newName) {
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
[nthl:readersSet] > nt:base
|
[nthl:readersSet] > nt:base
|
||||||
+ * (nthl:accountingEntryRead)
|
+ * (nthl:accountingEntryRead)
|
||||||
|
|
||||||
[nthl:workspaceItem] > mix:referenceable, mix:title, mix:lastModified, nt:hierarchyNode, mix:lockable, mix:shareable
|
[nthl:workspaceItem] > mix:referenceable, mix:title, mix:lastModified, nt:hierarchyNode, mix:lockable
|
||||||
- hl:portalLogin (String)
|
- hl:portalLogin (String)
|
||||||
- hl:lastAction (String) mandatory
|
- hl:lastAction (String) mandatory
|
||||||
- hl:oldRemotePath (String)
|
- hl:oldRemotePath (String)
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.net.URL;
|
||||||
|
|
||||||
import org.gcube.common.security.providers.SecretManagerProvider;
|
import org.gcube.common.security.providers.SecretManagerProvider;
|
||||||
import org.gcube.common.security.secrets.AccessTokenSecret;
|
import org.gcube.common.security.secrets.AccessTokenSecret;
|
||||||
|
import org.gcube.common.security.secrets.UmaTokenSecret;
|
||||||
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
|
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -37,7 +38,7 @@ public class CreateUsers {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTokenAndScope() {
|
public void setTokenAndScope() {
|
||||||
AccessTokenSecret secret = new AccessTokenSecret("eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSSklZNEpoNF9qdDdvNmREY0NlUDFfS1l0akcxVExXVW9oMkQ2Tzk1bFNBIn0.eyJleHAiOjE2NDQyNDM4ODUsImlhdCI6MTY0NDI0MzU4NSwiYXV0aF90aW1lIjoxNjQ0MjQzNTg1LCJqdGkiOiI1NWQ4ZDc5OS1kNTIzLTQ0YmEtYTRkMC1iZjIyYzVlMTg4NzQiLCJpc3MiOiJodHRwczovL2FjY291bnRzLmRldi5kNHNjaWVuY2Uub3JnL2F1dGgvcmVhbG1zL2Q0c2NpZW5jZSIsImF1ZCI6IiUyRmdjdWJlIiwic3ViIjoiNGMxMWRlODQtZGRjOS00ZGQxLWI5N2EtZWE4MmQyZDEzOGE2IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibmV4dC5kNHNjaWVuY2Uub3JnIiwic2Vzc2lvbl9zdGF0ZSI6ImZkZTA3MGE2LTVkOTUtNDc3Ni1hMTFiLTBhZTI1MzQ5NGQyMyIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVzb3VyY2VfYWNjZXNzIjp7IiUyRmdjdWJlIjp7InJvbGVzIjpbIkluZnJhc3RydWN0dXJlLU1hbmFnZXIiLCJNZW1iZXIiXX19LCJhdXRob3JpemF0aW9uIjp7InBlcm1pc3Npb25zIjpbeyJyc2lkIjoiMTU5ZDcyMDQtNjlmYS00ZmY0LTlhOTQtMzVlMWUyMzA5MDQyIiwicnNuYW1lIjoiRGVmYXVsdCBSZXNvdXJjZSJ9XX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTHVjaW8gTGVsaWkiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJsdWNpby5sZWxpaSIsImdpdmVuX25hbWUiOiJMdWNpbyIsImZhbWlseV9uYW1lIjoiTGVsaWkiLCJlbWFpbCI6Imx1Y2lvLmxlbGlpQGlzdGkuY25yLml0In0.SGuGXnY63WJ45tdypywaopO--FCxY6ZWAX74MGVw_zdNMMQI5zgtGfhZQewFWQ6HhVINDStXqvdSDluhF9JwFXCUGvxB2BipfKQYsAQnm3I4K3kgMl26kuQIL5Im-apw2XWvImTgLshX1AzpyqzFR1Jpf_p65GCMpcHLEwo_nTGLkrZNtfRdtqakZ8S8lowGaV2J2mNf4AHhtARSLJF3GqwynF5pPUXR2iOMUrjw_FLnIuPMfAjk_jHMeYKIxXNBLsoEpELju3pr2gEkv1ZRH9bZkyg7_3hW4mGzxq_Ea9w1FBVJOlkp6vypuISLNyJZcVOnBa4Dg1KRxxlp3aZ6vA");
|
UmaTokenSecret secret = new UmaTokenSecret("eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSSklZNEpoNF9qdDdvNmREY0NlUDFfS1l0akcxVExXVW9oMkQ2Tzk1bFNBIn0.eyJleHAiOjE2NDQyNDM4ODUsImlhdCI6MTY0NDI0MzU4NSwiYXV0aF90aW1lIjoxNjQ0MjQzNTg1LCJqdGkiOiI1NWQ4ZDc5OS1kNTIzLTQ0YmEtYTRkMC1iZjIyYzVlMTg4NzQiLCJpc3MiOiJodHRwczovL2FjY291bnRzLmRldi5kNHNjaWVuY2Uub3JnL2F1dGgvcmVhbG1zL2Q0c2NpZW5jZSIsImF1ZCI6IiUyRmdjdWJlIiwic3ViIjoiNGMxMWRlODQtZGRjOS00ZGQxLWI5N2EtZWE4MmQyZDEzOGE2IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibmV4dC5kNHNjaWVuY2Uub3JnIiwic2Vzc2lvbl9zdGF0ZSI6ImZkZTA3MGE2LTVkOTUtNDc3Ni1hMTFiLTBhZTI1MzQ5NGQyMyIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVzb3VyY2VfYWNjZXNzIjp7IiUyRmdjdWJlIjp7InJvbGVzIjpbIkluZnJhc3RydWN0dXJlLU1hbmFnZXIiLCJNZW1iZXIiXX19LCJhdXRob3JpemF0aW9uIjp7InBlcm1pc3Npb25zIjpbeyJyc2lkIjoiMTU5ZDcyMDQtNjlmYS00ZmY0LTlhOTQtMzVlMWUyMzA5MDQyIiwicnNuYW1lIjoiRGVmYXVsdCBSZXNvdXJjZSJ9XX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTHVjaW8gTGVsaWkiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJsdWNpby5sZWxpaSIsImdpdmVuX25hbWUiOiJMdWNpbyIsImZhbWlseV9uYW1lIjoiTGVsaWkiLCJlbWFpbCI6Imx1Y2lvLmxlbGlpQGlzdGkuY25yLml0In0.SGuGXnY63WJ45tdypywaopO--FCxY6ZWAX74MGVw_zdNMMQI5zgtGfhZQewFWQ6HhVINDStXqvdSDluhF9JwFXCUGvxB2BipfKQYsAQnm3I4K3kgMl26kuQIL5Im-apw2XWvImTgLshX1AzpyqzFR1Jpf_p65GCMpcHLEwo_nTGLkrZNtfRdtqakZ8S8lowGaV2J2mNf4AHhtARSLJF3GqwynF5pPUXR2iOMUrjw_FLnIuPMfAjk_jHMeYKIxXNBLsoEpELju3pr2gEkv1ZRH9bZkyg7_3hW4mGzxq_Ea9w1FBVJOlkp6vypuISLNyJZcVOnBa4Dg1KRxxlp3aZ6vA");
|
||||||
SecretManagerProvider.instance.set(secret);
|
SecretManagerProvider.instance.set(secret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ public class CreateUsers {
|
||||||
|
|
||||||
private static Logger log = LoggerFactory.getLogger(CreateUsers.class);
|
private static Logger log = LoggerFactory.getLogger(CreateUsers.class);
|
||||||
|
|
||||||
private String user ="lucio.lelii";
|
private String user ="pippo.test";
|
||||||
private String user2 ="pippo.test";
|
private String user2 ="lucio.lelii";
|
||||||
private String vreWA ="vre-write-all";
|
private String vreWA ="vre-write-all";
|
||||||
private String vreRO ="vre-read-only";
|
private String vreRO ="vre-read-only";
|
||||||
private String vreWO ="vre-write-owner";
|
private String vreWO ="vre-write-owner";
|
||||||
|
@ -53,6 +53,14 @@ public class CreateUsers {
|
||||||
SecretManagerProvider.instance.set(secret);
|
SecretManagerProvider.instance.set(secret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void initialiseEnvironment() throws Exception {
|
||||||
|
this.createUser();
|
||||||
|
this.createAndAddUserToVREs();
|
||||||
|
this.createUser2AndAddItToVres();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void createAccountforManging() throws Exception{
|
public void createAccountforManging() throws Exception{
|
||||||
client.createUserAccount("service-account-sg4-test-client");
|
client.createUserAccount("service-account-sg4-test-client");
|
||||||
|
@ -72,6 +80,15 @@ public class CreateUsers {
|
||||||
System.out.println(SecretManagerProvider.instance.get().getHTTPAuthorizationHeaders());
|
System.out.println(SecretManagerProvider.instance.get().getHTTPAuthorizationHeaders());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getFolderACLsOnrROVRE() throws Exception {
|
||||||
|
client.impersonate(user);
|
||||||
|
FolderContainer vre = (FolderContainer) client.getVREFolders().getContainers().stream().filter(f -> f.get().getTitle().equals(vreWA)).findFirst().get();
|
||||||
|
FolderContainer folder = (FolderContainer) vre.list().getContainers().stream().findFirst().get();
|
||||||
|
System.out.println(folder.get().getTitle()+" "+folder.getAcls());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void createUser() throws Exception{
|
public void createUser() throws Exception{
|
||||||
client.createUserAccount(user);
|
client.createUserAccount(user);
|
||||||
|
@ -85,7 +102,7 @@ public class CreateUsers {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void addUserToVREs() throws Exception{
|
public void createAndAddUserToVREs() throws Exception{
|
||||||
client.getVreFolderManager(vreWA).createVRE(AccessType.WRITE_ALL, user);
|
client.getVreFolderManager(vreWA).createVRE(AccessType.WRITE_ALL, user);
|
||||||
client.getVreFolderManager(vreWA).setAdmin(user);
|
client.getVreFolderManager(vreWA).setAdmin(user);
|
||||||
client.getVreFolderManager(vreRO).createVRE(AccessType.READ_ONLY, user);
|
client.getVreFolderManager(vreRO).createVRE(AccessType.READ_ONLY, user);
|
||||||
|
@ -95,7 +112,7 @@ public class CreateUsers {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void createUser2() throws Exception{
|
public void createUser2AndAddItToVres() throws Exception{
|
||||||
client.impersonate(user);
|
client.impersonate(user);
|
||||||
client.createUserAccount(user2);
|
client.createUserAccount(user2);
|
||||||
client.getVreFolderManager(vreWA).addUser(user2);
|
client.getVreFolderManager(vreWA).addUser(user2);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<root level="trace">
|
<root level="TRACE">
|
||||||
<appender-ref ref="STDOUT"/>
|
<appender-ref ref="STDOUT"/>
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue