This commit is contained in:
Fabio Sinibaldi 2022-12-06 15:15:02 +01:00
parent 8eeb5dee1e
commit ec0b826313
32 changed files with 135 additions and 41 deletions

View File

@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.spatial.data.gcube-sdi-suite
## [v1.0.3-SNAPSHOT] - 2022-12-07
- Updated plugin framework
## [v1.0.2] - 2021-02-24
-Introduced module sdi-plugins
-Introduced module notifications-plugins

View File

@ -4,5 +4,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
This library contains gcube-cms plugins for ckan materializations
## [v1.0.1-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.0] - 2022-02-24
- First release

View File

@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>ckan-plugins</artifactId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
<name>gCube CMS - CKAN Plugins</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<properties>

View File

@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.application.cms-plugin-framework
## [v1.0.2-SNAPSHOT] 2022-01-17
- Fixes #2435
## [v1.0.1] 2022-01-17
- Serialization Features

View File

@ -4,12 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>cms-plugin-framework</artifactId>
<version>1.0.1</version>
<version>1.0.2-SNAPSHOT</version>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>

View File

@ -228,6 +228,7 @@ public class SimpleLifeCycleManager extends AbstractLifeCycleManager implements
new MaterializationRequest(request.getUseCaseDescriptor(),request.getCaller(), request.getContext(), request.getDocument());
Document params = new Document();
params.putAll(parameters);
String workspace = request.getUseCaseDescriptor().getId() + request.getContext().getId();
params.put("workspace", Files.fixFilename(workspace));

View File

@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.application.cms.cms-test-commons
## [v1.0.3-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.2] - 2022-01-17
- Profiles

View File

@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>cms-test-commons</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
<name>CMS Test Commons</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>

View File

@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
This library contains custom extensions for the support of GNA "concessioni" use case
## [v1.0.2-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.1] - 2022-01-17
- Serialization adaptation

View File

@ -4,14 +4,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>concessioni-lifecycle</artifactId>
<version>1.0.1</version>
<version>1.0.2-SNAPSHOT</version>
<name>GNA Concessioni Lifecycle</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<properties>

View File

@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
This library contains custom BEANS for the support of GNA "concessioni" use case
## [v1.0.2-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.1] - 2022-01-17
- Defaults Evaluation

View File

@ -6,14 +6,14 @@
<groupId>org.gcube.application.cms</groupId>
<artifactId>concessioni-model</artifactId>
<version>1.0.1</version>
<version>1.0.2-SNAPSHOT</version>
<name>GNA Concessioni Model</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<properties>

View File

@ -4,5 +4,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
This library contains gcube-cms plugins for processing via gCube Dataminer
## [v1.0.1-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.0] - 2022-02-24
- First release

View File

@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dataminer-plugins</artifactId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
<name>gCube CMS - Dataminer Plugins</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<dependencyManagement>

View File

@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.application.geoportal-client
## [v1.1.1-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.1.0] - 2022-02-01

View File

@ -4,14 +4,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-client</artifactId>
<version>1.1.0</version>
<version>1.1.1-SNAPSHOT</version>
<name>Geoportal Client</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>

View File

@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.application.geoportal-common
## [v1.0.10-SNAPSHOT] - 2022-12-07
- Pom updates
# [v1.0.9] - 2022-01-17
- Minor fixes in model
- Schema and jsonPath support

View File

@ -3,14 +3,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>geoportal-common</artifactId>
<version>1.0.9</version>
<version>1.0.10-SNAPSHOT</version>
<name>Geoportal Common</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<properties>

View File

@ -14,8 +14,10 @@ public class GCubeTest {
// InterfaceConstants.SERVICE_CLASS="Application";
// InterfaceConstants.SERVICE_NAME="GeoPortal";
testContext = "/pred4s/preprod/preVRE";
// testContext= "/gcube/devsec/devVRE";
// testContext = "/d4science.research-infrastructures.eu/D4OS/GNA";
testContext= "/gcube/devsec/devVRE";
System.out.println("TEST CONTEXT = "+testContext);
return testContext;

View File

@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.application.geoportal-service
## [v1.0.11-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.10] 2022-01-17
- Plugin Management
- Profiled Document : FileSet Registration

View File

@ -4,14 +4,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-service</artifactId>
<version>1.0.10</version>
<version>1.0.11-SNAPSHOT</version>
<name>Geoportal Service</name>
<packaging>war</packaging>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<properties>

View File

@ -4,5 +4,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
This library contains gcube-cms plugins for images materializations
## [v1.0.1-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.0] - 2022-02-24
- First release

View File

@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>images-plugins</artifactId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
<name>gCube CMS - Images Plugins</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>

View File

@ -4,5 +4,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
This library contains gcube-cms plugins for notitfications events
## [v1.0.1-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.0] - 2022-02-24
- First release

View File

@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>notifications-plugins</artifactId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
<name>gCube CMS - Notifications Plugins</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<properties>

24
pom.xml
View File

@ -9,7 +9,7 @@
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<packaging>pom</packaging>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
<name>Gcube CMS Suite</name>
<description>gCube CMS Suite is a set of components designed to manage complex space-temporal Documents defined by metadata Profiles.</description>
@ -22,19 +22,19 @@
<gitBaseUrl>https://code-repo.d4science.org/gCubeSystem</gitBaseUrl>
<!-- prod -->
<gcube-bom-version>2.0.2</gcube-bom-version>
<gcube-smartgears-bom-version>2.1.1</gcube-smartgears-bom-version>
<gcube-portal-bom-version>3.6.3</gcube-portal-bom-version>
<storagehub-version-range>[1.0.0,2.0.0-SNAPSHOT)</storagehub-version-range>
<plugin-framework-version>1.0.1</plugin-framework-version>
<!-- <gcube-bom-version>2.0.2</gcube-bom-version>-->
<!-- <gcube-smartgears-bom-version>2.1.1</gcube-smartgears-bom-version>-->
<!-- <gcube-portal-bom-version>3.6.3</gcube-portal-bom-version>-->
<!-- <storagehub-version-range>[1.0.0,2.0.0-SNAPSHOT)</storagehub-version-range>-->
<!-- <plugin-framework-version>1.0.1</plugin-framework-version>-->
<!--dev -->
<!-- <gcube-bom-version>2.1.0-SNAPSHOT</gcube-bom-version>-->
<!-- <gcube-smartgears-bom-version>2.2.0-SNAPSHOT</gcube-smartgears-bom-version>-->
<!-- <gcube-portal-bom-version>3.7.0-SNAPSHOT</gcube-portal-bom-version>-->
<!-- <storagehub-version-range>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</storagehub-version-range>-->
<!--&lt;!&ndash; <storagehub-version-range>[1.0.0,2.0.0-SNAPSHOT)</storagehub-version-range>&ndash;&gt;-->
<!-- <plugin-framework-version>1.0.1-SNAPSHOT</plugin-framework-version>-->
<gcube-bom-version>2.1.0-SNAPSHOT</gcube-bom-version>
<gcube-smartgears-bom-version>2.2.0-SNAPSHOT</gcube-smartgears-bom-version>
<gcube-portal-bom-version>3.7.0-SNAPSHOT</gcube-portal-bom-version>
<storagehub-version-range>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</storagehub-version-range>
<!-- <storagehub-version-range>[1.0.0,2.0.0-SNAPSHOT)</storagehub-version-range>-->
<plugin-framework-version>1.0.2-SNAPSHOT</plugin-framework-version>
</properties>

View File

@ -4,5 +4,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
This library contains gcube-cms plugins for indexing and materializations in gCube SDI
## [v1.0.1-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.0] - 2022-02-24
- First release

View File

@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>sdi-plugins</artifactId>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
<name>gCube CMS - SDI Plugins</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>
<properties>

View File

@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for org.gcube.application.geoportal-client
## [v1.0.3-SNAPSHOT] - 2022-12-07
- Pom updates
## [v1.0.2] - 2022-02-24
- Updated parent

View File

@ -4,12 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>use-cases</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
<name>CMS Use cases</name>
<parent>
<artifactId>gcube-cms-suite</artifactId>
<groupId>org.gcube.application.cms</groupId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
</parent>

View File

@ -50,7 +50,7 @@ public class ExportConcessioniAsProjects {
public static void main(String[] args) throws InterruptedException, IOException {
// read from imported folder
File dir= new File("/Users/fabioisti/git/gcube-cms-suite/import1668778302348");
File dir= new File("/Users/fabioisti/git/gcube-cms-suite/import1669889538860");
// select only cluster
// dir = new File(dir,"cluster_1");
@ -110,7 +110,7 @@ public class ExportConcessioniAsProjects {
AtomicLong warnCount = new AtomicLong(0);
AtomicLong errCount = new AtomicLong(0);
ExecutorService service = Executors.newFixedThreadPool(1);
ExecutorService service = Executors.newFixedThreadPool(3);
long startProcess = System.currentTimeMillis();

View File

@ -0,0 +1,49 @@
package org.gcube.application.cms.usecases;
import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
import org.gcube.application.cms.tests.TokenSetter;
import org.gcube.application.geoportal.common.model.document.Project;
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
import org.gcube.application.geoportal.common.model.rest.StepExecutionRequest;
import org.gcube.application.geoportal.common.rest.Projects;
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import java.rmi.RemoteException;
import java.util.HashMap;
import java.util.concurrent.atomic.AtomicLong;
import static org.gcube.application.geoportal.client.plugins.GeoportalAbstractPlugin.projects;
@Slf4j
public class PublishSubmitted {
public static void main(String[] args) throws RemoteException {
TokenSetter.set(GCubeTest.getContext());
Projects<Project> client=projects("profiledConcessioni").build();
QueryRequest query = new QueryRequest();
query.setFilter(Document.parse("{\"_lifecycleInformation._lastOperationStatus\":{\"$eq\":\"OK\"},\"_lifecycleInformation._phase\":{\"$eq\":\"Pending Approval\"}}"));
AtomicLong count=new AtomicLong();
final StepExecutionRequest step = new StepExecutionRequest();
step.setStepID("APPROVE-SUBMITTED");
HashMap<String,String> errors = new HashMap<>();
client.query(query).forEachRemaining(project -> {
try{
log.info("Publishing N {}, ID {} ",count.incrementAndGet(),project.getId());
client.performStep(project.getId(), step);
}catch(Throwable t){
t.printStackTrace(System.err);
errors.put(project.getId(),t.getMessage());
}
});
System.out.println("Performed OP on "+count.get()+" projects.");
System.out.println("Errors count : "+errors.size());
errors.forEach((k,v) -> System.err.println(k+"\t"+v));
}
}