feature_24570 #11

Merged
francesco.mangiacrapa merged 25 commits from feature_24570 into master 2023-03-06 14:23:11 +01:00
25 changed files with 362 additions and 198 deletions

View File

@ -1,5 +1,8 @@
# Changelog for org.gcube.application.cms.concessioni-lifecycle
## [v1.0.4-SNAPSHOT] - 2023-03-03
- [#24702] Fixed the default-lc-managers dependency
## [v1.0.3] - 2023-01-10
- Pom updates
- Fixes default access

View File

@ -4,7 +4,7 @@
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.3</version>
<version>1.0.4-SNAPSHOT</version>
<name>GNA Concessioni Lifecycle</name>
@ -44,6 +44,7 @@
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>default-lc-managers</artifactId>
<scope>provided</scope>
</dependency>

View File

@ -1,9 +1,13 @@
# Changelog for org.gcube.application.cms.ckan-plugin
## [v1.1.1-SNAPSHOT] - 2023-02-23
- [#24570] Integrated the UnPublish operation
## [v1.0.1] - 2023-01-10
- Pom updates
- ## [v1.0.0] - 2022-02-24
## [v1.0.0] - 2022-02-24
- First release
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>default-lc-managers</artifactId>
<version>1.0.1</version>
<version>1.1.1-SNAPSHOT</version>
<name>gCube CMS - Default LC Managers</name>

View File

@ -1,12 +1,22 @@
package org.gcube.application.cms.plugins.implementations;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import java.util.HashMap;
import java.util.Map;
import org.gcube.application.cms.implementations.ProjectAccess;
import org.gcube.application.cms.implementations.utils.UserUtils;
import org.gcube.application.cms.plugins.LifecycleManager;
import org.gcube.application.cms.plugins.PluginManagerInterface;
import org.gcube.application.cms.plugins.faults.*;
import org.gcube.application.cms.plugins.faults.EventException;
import org.gcube.application.cms.plugins.faults.InitializationException;
import org.gcube.application.cms.plugins.faults.InsufficientPrivileges;
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
import org.gcube.application.cms.plugins.faults.InvalidProfileException;
import org.gcube.application.cms.plugins.faults.MaterializationException;
import org.gcube.application.cms.plugins.faults.ShutDownException;
import org.gcube.application.cms.plugins.faults.StepException;
import org.gcube.application.cms.plugins.faults.UnrecognizedEventException;
import org.gcube.application.cms.plugins.faults.UnrecognizedStepException;
import org.gcube.application.cms.plugins.implementations.executions.GuardedEventManager;
import org.gcube.application.cms.plugins.implementations.executions.GuardedStepExecution;
import org.gcube.application.cms.plugins.reports.EventExecutionReport;
@ -25,10 +35,9 @@ import org.gcube.application.geoportal.common.model.plugins.OperationDescriptor;
import org.gcube.application.geoportal.common.model.plugins.PluginDescriptor;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDeclaration;
import org.gcube.application.geoportal.common.utils.ContextUtils;
import java.util.HashMap;
import java.util.Map;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public abstract class AbstractLifeCycleManager extends AbstractPlugin implements LifecycleManager {
@ -118,7 +127,12 @@ public abstract class AbstractLifeCycleManager extends AbstractPlugin implements
@Override
public StepExecutionReport performStep(StepExecutionRequest request) throws StepException, InvalidPluginRequestException, InvalidProfileException, ConfigurationException, InsufficientPrivileges {
log.info("Serving Request {}",request);
log.info("Serving Request - caller {}, ucd id {}, document id {}, step {}",
request.getCaller(),
request.getUseCaseDescriptor().getId(),
request.getDocument().getId(),
request.getStep());
log.debug("Serving Request full log {}",request);
log.debug("Checking is STEP {} is supported by {}",request.getStep(),DESCRIPTOR.getId());
if(!registeredSteps.containsKey(request.getStep()))

View File

@ -1,13 +1,13 @@
package org.gcube.application.cms.plugins.implementations;
import java.util.List;
import java.util.Map;
import org.gcube.application.cms.plugins.Plugin;
import org.gcube.application.cms.plugins.faults.InvalidProfileException;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDeclaration;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import java.util.List;
import java.util.Map;
public abstract class AbstractPlugin implements Plugin {

View File

@ -1,7 +1,7 @@
package org.gcube.application.cms.plugins.implementations;
import com.vdurmont.semver4j.Semver;
import lombok.extern.slf4j.Slf4j;
import java.util.Collections;
import org.bson.Document;
import org.gcube.application.cms.plugins.IndexerPluginInterface;
import org.gcube.application.cms.plugins.LifecycleManager;
@ -13,33 +13,39 @@ import org.gcube.application.cms.plugins.implementations.executions.GuardedStepE
import org.gcube.application.cms.plugins.reports.EventExecutionReport;
import org.gcube.application.cms.plugins.reports.StepExecutionReport;
import org.gcube.application.cms.plugins.requests.BaseRequest;
import org.gcube.application.geoportal.common.model.JSONPathWrapper;
import org.gcube.application.geoportal.common.model.configuration.Configuration;
import org.gcube.application.geoportal.common.model.configuration.Index;
import org.gcube.application.geoportal.common.model.document.filesets.RegisteredFileSet;
import org.gcube.application.geoportal.common.model.document.lifecycle.LifecycleInformation;
import org.gcube.application.geoportal.common.model.plugins.OperationDescriptor;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.common.utils.Files;
import java.util.Collections;
import com.vdurmont.semver4j.Semver;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class Default3PhaseManager extends SimpleLifeCycleManager implements LifecycleManager {
protected static class Phases {
public static final String PENDING_APPROVAL="Pending Approval";
public static final String PUBLISHED="Published";
public static final String PUBLISHED=SimpleLifeCycleManager.Phases.PUBLISHED;
}
protected static class STEPS{
public static final class STEPS{
public static final OperationDescriptor SUBMIT=new OperationDescriptor("SUBMIT-FOR-REVIEW","Submits the Draft for reviewing");
public static final OperationDescriptor REJECT=new OperationDescriptor("REJECT-DRAFT","Rejects the submitted Draft");
public static final OperationDescriptor APPROVE=new OperationDescriptor("APPROVE-SUBMITTED","Approves the submitted Draft");
public static final OperationDescriptor UNPUBLISH = new OperationDescriptor("UNPUBLISH","UnPublish the project. DeMaterialize and DeIndex the project");
static {
SUBMIT.setAppliableToPhases(Collections.singletonList(LifecycleInformation.CommonPhases.DRAFT_PHASE));
REJECT.setAppliableToPhases(Collections.singletonList(Phases.PENDING_APPROVAL));
APPROVE.setAppliableToPhases(Collections.singletonList(Phases.PENDING_APPROVAL));
UNPUBLISH.setAppliableToPhases(Collections.singletonList(Phases.PUBLISHED));
}
}
@ -92,6 +98,9 @@ public class Default3PhaseManager extends SimpleLifeCycleManager implements Life
return executeReject(theReport);
}
});
//Updated by Francesco
setStep(d3PhaseUnPublishStep());
}
public Default3PhaseManager() {
@ -100,6 +109,40 @@ public class Default3PhaseManager extends SimpleLifeCycleManager implements Life
DESCRIPTOR.setVersion(new Semver("1.0.0"));
DESCRIPTOR.setLabel("Default 3-Phase");
}
//Updated by Francesco. DeIndexing (only) from PublicIndex and InternalIndex (GIS-CENTROIDS plugin with 'public' and "internal" flag)
protected GuardedStepExecution d3PhaseUnPublishStep() {
return new GuardedStepExecution(STEPS.UNPUBLISH) {
@Override
protected StepExecutionReport run() throws Exception {
log.info( STEPS.UNPUBLISH+ " running...");
//DeMaterialize
JSONPathWrapper wrapper = new JSONPathWrapper(theReport.getTheRequest().getDocument().getTheDocument().toJson());
for (String s : wrapper.getMatchingPaths("$..[?(@." + RegisteredFileSet.PAYLOADS + ")]")){
log.info("Requesting dematerialization for {} ",s);
for(MaterializationPlugin mat : getMaterializers(theReport.getTheRequest()))
theReport = deMaterialize(theReport,mat,new Document("fileSetPath",s));
if(!theReport.getToSetLifecycleInformation().getLastOperationStatus().equals(LifecycleInformation.Status.OK))
break;
}
//DeIndex
if(theReport.getToSetLifecycleInformation().getLastOperationStatus().equals(LifecycleInformation.Status.OK)) {
for(IndexerPluginInterface indexer : getIndexers(theReport.getTheRequest())) {
log.info("Requesting deindexing for {} ",indexer.getDescriptor());
theReport = deIndex(theReport,indexer,getPublicIndexParams(theReport.getTheRequest()));
theReport = deIndex(theReport,indexer,getInternalIndexParams(theReport.getTheRequest()));
}
}
if(theReport.getToSetLifecycleInformation().getLastOperationStatus().equals(LifecycleInformation.Status.OK))
theReport.getToSetLifecycleInformation().setPhase(LifecycleInformation.CommonPhases.DRAFT_PHASE);
return theReport;
}
};
}
@Override
@ -122,6 +165,8 @@ public class Default3PhaseManager extends SimpleLifeCycleManager implements Life
}
return toReturn;
}
protected Document getInternalIndexParams(BaseRequest req){
Document callParameters = new Document();

View File

@ -1,16 +1,23 @@
package org.gcube.application.cms.plugins.implementations;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import java.util.HashMap;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
import org.gcube.application.cms.serialization.Serialization;
import org.gcube.application.geoportal.common.model.document.accounting.User;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDeclaration;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.HashMap;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@ToString

View File

@ -1,6 +1,9 @@
package org.gcube.application.cms.plugins.implementations;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.bson.Document;
import org.gcube.application.cms.plugins.IndexerPluginInterface;
import org.gcube.application.cms.plugins.LifecycleManager;
@ -10,7 +13,12 @@ import org.gcube.application.cms.plugins.faults.IndexingException;
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
import org.gcube.application.cms.plugins.faults.MaterializationException;
import org.gcube.application.cms.plugins.implementations.executions.GuardedStepExecution;
import org.gcube.application.cms.plugins.reports.*;
import org.gcube.application.cms.plugins.reports.DocumentHandlingReport;
import org.gcube.application.cms.plugins.reports.EventExecutionReport;
import org.gcube.application.cms.plugins.reports.IndexDocumentReport;
import org.gcube.application.cms.plugins.reports.MaterializationReport;
import org.gcube.application.cms.plugins.reports.Report;
import org.gcube.application.cms.plugins.reports.StepExecutionReport;
import org.gcube.application.cms.plugins.requests.BaseExecutionRequest;
import org.gcube.application.cms.plugins.requests.BaseRequest;
import org.gcube.application.cms.plugins.requests.IndexDocumentRequest;
@ -28,9 +36,7 @@ import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDec
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import org.gcube.application.geoportal.common.utils.Files;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SimpleLifeCycleManager extends AbstractLifeCycleManager implements LifecycleManager {
@ -41,14 +47,22 @@ public class SimpleLifeCycleManager extends AbstractLifeCycleManager implements
public SimpleLifeCycleManager() {
DESCRIPTOR.setId(PLUGIN_ID);
}
//Updated by Francesco
protected static class Phases {
public static final String PUBLISHED="Published";
public static final String UNPUBLISHED="UnPublished";
}
//Updated by Francesco
private static class Steps {
public static final OperationDescriptor PUBLISH = new OperationDescriptor("PUBLISH","Materialize & index project");
public static final OperationDescriptor UNPUBLISH = new OperationDescriptor("UNPUBLISH","UnPublish the project. DeMaterialize and DeIndex the project");
static{
PUBLISH.setAppliableToPhases(Collections.singletonList(LifecycleInformation.CommonPhases.DRAFT_PHASE));
UNPUBLISH.setAppliableToPhases(Collections.singletonList(Phases.PUBLISHED));
}
}
@ -112,13 +126,45 @@ public class SimpleLifeCycleManager extends AbstractLifeCycleManager implements
theReport = index(theReport,indexer,getPublicIndexParams(theReport.getTheRequest()));
// setPhase
if(theReport.getToSetLifecycleInformation().getLastOperationStatus().equals(LifecycleInformation.Status.OK))
theReport.getToSetLifecycleInformation().setPhase("PUBLISHED");
//TODO CHANGED THE SET PHASE ID
//theReport.getToSetLifecycleInformation().setPhase("PUBLISHED");
theReport.getToSetLifecycleInformation().setPhase(Phases.PUBLISHED);
}
return theReport;
}
});
}
//Updated by Francesco. DeIndexing (only) from PublicIndexParams (GIS-CENTROIDS plugin with 'public' flag)
setStep(new GuardedStepExecution(Steps.UNPUBLISH) {
@Override
protected StepExecutionReport run() throws Exception {
log.info(Steps.UNPUBLISH+ " running...");
//DeMaterialize
JSONPathWrapper wrapper = new JSONPathWrapper(theReport.getTheRequest().getDocument().getTheDocument().toJson());
for (String s : wrapper.getMatchingPaths("$..[?(@." + RegisteredFileSet.PAYLOADS + ")]")){
log.info("Requesting dematerialization for {} ",s);
for(MaterializationPlugin mat : getMaterializers(theReport.getTheRequest()))
theReport = deMaterialize(theReport,mat,new Document("fileSetPath",s));
if(!theReport.getToSetLifecycleInformation().getLastOperationStatus().equals(LifecycleInformation.Status.OK))
break;
}
//DeIndex
if(theReport.getToSetLifecycleInformation().getLastOperationStatus().equals(LifecycleInformation.Status.OK)) {
for(IndexerPluginInterface indexer : getIndexers(theReport.getTheRequest())) {
log.info("Requesting deindexing for {} ",indexer.getDescriptor());
theReport = deIndex(theReport,indexer,getPublicIndexParams(theReport.getTheRequest()));
}
}
if(theReport.getToSetLifecycleInformation().getLastOperationStatus().equals(LifecycleInformation.Status.OK))
theReport.getToSetLifecycleInformation().setPhase(LifecycleInformation.CommonPhases.DRAFT_PHASE);
return theReport;
}
});
}
protected void blockNonDraft(EventExecutionReport report) throws InvalidPluginRequestException {
Boolean force = false;
try {

View File

@ -1,11 +1,12 @@
package org.gcube.application.cms.plugins.implementations.executions;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.cms.plugins.reports.EventExecutionReport;
import org.gcube.application.cms.plugins.requests.EventExecutionRequest;
import org.gcube.application.geoportal.common.model.plugins.OperationDescriptor;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public abstract class GuardedEventManager extends GuardedExecution<EventExecutionRequest,EventExecutionReport>{

View File

@ -1,9 +1,5 @@
package org.gcube.application.cms.plugins.implementations.executions;
import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.cms.plugins.faults.InsufficientPrivileges;
import org.gcube.application.cms.plugins.faults.StepException;
import org.gcube.application.cms.plugins.reports.DocumentHandlingReport;
@ -12,6 +8,11 @@ import org.gcube.application.geoportal.common.model.plugins.OperationDescriptor;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDeclaration;
import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RequiredArgsConstructor
@ -28,14 +29,14 @@ public abstract class GuardedExecution<R extends BaseExecutionRequest,T extends
protected T theReport;
protected void checks() throws ConfigurationException, InsufficientPrivileges {
protected void checks() throws ConfigurationException, InsufficientPrivileges, StepException {
if(theReport.getTheRequest()==null) throw new RuntimeException("Unexpected state : request cannot be null");
// Check document phase
if(op.getAppliableToPhases()!=null&&!op.getAppliableToPhases().isEmpty()) {
String currentPhase = theReport.getTheRequest().getDocument().getLifecycleInformation().getPhase();
if(!op.getAppliableToPhases().contains(currentPhase))
new StepException("Document must be in one of the following phases : "+ op.getAppliableToPhases());
throw new StepException("Document must be in one of the following phases : "+ op.getAppliableToPhases());
}
}

View File

@ -1,13 +1,15 @@
package org.gcube.application.cms.plugins.implementations.executions;
import org.gcube.application.cms.plugins.implementations.RoleManager;
import lombok.NonNull;
import org.gcube.application.cms.plugins.faults.InsufficientPrivileges;
import org.gcube.application.cms.plugins.faults.StepException;
import org.gcube.application.cms.plugins.implementations.RoleManager;
import org.gcube.application.cms.plugins.reports.StepExecutionReport;
import org.gcube.application.cms.plugins.requests.StepExecutionRequest;
import org.gcube.application.geoportal.common.model.plugins.OperationDescriptor;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import lombok.NonNull;
public abstract class GuardedStepExecution extends GuardedExecution<StepExecutionRequest, StepExecutionReport>{
@ -16,7 +18,7 @@ public abstract class GuardedStepExecution extends GuardedExecution<StepExecutio
}
@Override
protected void checks() throws ConfigurationException, InsufficientPrivileges {
protected void checks() throws ConfigurationException, InsufficientPrivileges, StepException {
super.checks();
RoleManager r = new RoleManager(config);
if(!r.canInvokeStep(theReport.getTheRequest().getStep(),theReport.getTheRequest().getCaller()))

View File

@ -1,8 +1,12 @@
package org.gcube.application.cms.plugins;
import org.gcube.application.cms.plugins.faults.StepException;
import org.gcube.application.cms.plugins.implementations.Default3PhaseManager;
import org.gcube.application.geoportal.common.model.plugins.OperationDescriptor;
public class SimpleLifecycleTests {
// NB cannot use test commons, need to separate modules
// NB cannot use test commons, need to separate modules
// extends
// BasicPluginTest {
//
@ -21,4 +25,26 @@ public class SimpleLifecycleTests {
// manager.performStep()
// }
public static void main(String[] args) {
System.out.println("Check start");
OperationDescriptor op = Default3PhaseManager.STEPS.APPROVE;
try {
// Check document phase
if (op.getAppliableToPhases() != null && !op.getAppliableToPhases().isEmpty()) {
String currentPhase = "Pending Approval";
if (!op.getAppliableToPhases().contains(currentPhase)) {
System.out.println("check KO");
throw new StepException(
"Document must be in one of the following phases : " + op.getAppliableToPhases());
}
}
System.out.println("check OK");
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -1,6 +1,9 @@
# Changelog for org.gcube.application.geoportal-service
## [v1.0.13-SNAPSHOT] - 2023-02-23
- Update version to next snapshot
## [v1.0.12] - 2023-01-10
- Refactored UserUtils into framework plugin

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-service</artifactId>
<version>1.0.12</version>
<version>1.0.13-SNAPSHOT</version>
<name>Geoportal Service</name>
<packaging>war</packaging>

View File

@ -6,6 +6,7 @@
padding: 10px;
background: white;
width: 100%;
height: 100px;
}
.navbar-fixed-top {

View File

@ -1,5 +1,8 @@
# Changelog for org.gcube.application.cms.notifications-plugins
## [v1.0.3-SNAPSHOT] - 2023-03-03
- [#24702] Fixed the default-lc-managers dependency
## [v1.0.2] - 2023-01-10
- Pom updates

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>notifications-plugins</artifactId>
<version>1.0.2</version>
<version>1.0.3-SNAPSHOT</version>
<name>gCube CMS - Notifications Plugins</name>
@ -54,6 +54,7 @@
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>default-lc-managers</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.application.cms</groupId>

85
pom.xml
View File

@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<modelVersion>4.0.0</modelVersion>
<parent>
@ -22,16 +23,16 @@
<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>
<!-- <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> -->
<!--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>-->
<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>
<plugin-framework-version>1.0.3</plugin-framework-version>
@ -75,10 +76,10 @@
<!-- Utilities & tests -->
<module>cms-test-commons</module>
<module>use-cases</module>
<module>use-cases</module>
</modules>
</modules>
@ -164,7 +165,7 @@
</dependency>
<!-- CUSTOM : CONCESSIONI-->
<!-- CUSTOM : CONCESSIONI -->
<dependency>
<groupId>org.gcube.application.cms</groupId>
@ -287,37 +288,37 @@
<build>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>flatten</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>false</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>flatten</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>false</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>

View File

@ -1,5 +1,9 @@
# Changelog for org.gcube.application.cms.sdi-plugins
## [v1.0.4-SNAPSHOT] - 2023-03-02
- Fixed the import from joda-time to java.time
- [#24702] Fixed the default-lc-managers dependency
## [v1.0.3] - 2023-01-24
- Fixes [#24476](https://support.d4science.org/issues/24476)

View File

@ -1,116 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<modelVersion>4.0.0</modelVersion>
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">
<modelVersion>4.0.0</modelVersion>
<artifactId>sdi-plugins</artifactId>
<version>1.0.3</version>
<name>gCube CMS - SDI Plugins</name>
<artifactId>sdi-plugins</artifactId>
<version>1.0.4-SNAPSHOT</version>
<name>gCube CMS - SDI Plugins</name>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.4</version>
</parent>
<parent>
<groupId>org.gcube.application.cms</groupId>
<artifactId>gcube-cms-suite</artifactId>
<version>1.0.4</version>
</parent>
<properties>
<gitBaseUrl>https://code-repo.d4science.org/gCubeSystem</gitBaseUrl>
</properties>
<properties>
<gitBaseUrl>https://code-repo.d4science.org/gCubeSystem</gitBaseUrl>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>cms-plugin-framework</artifactId>
<version>${plugin-framework-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>cms-plugin-framework</artifactId>
<version>${plugin-framework-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<scm>
<connection>scm:git:${gitBaseUrl}/gcube-cms-suite</connection>
<developerConnection>scm:git:${gitBaseUrl}/gcube-cms-suite</developerConnection>
<url>${gitBaseUrl}/gcube-cms-suite</url>
</scm>
<scm>
<connection>scm:git:${gitBaseUrl}/gcube-cms-suite</connection>
<developerConnection>scm:git:${gitBaseUrl}/gcube-cms-suite</developerConnection>
<url>${gitBaseUrl}/gcube-cms-suite</url>
</scm>
<dependencies>
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>cms-plugin-framework</artifactId>
</dependency>
<dependencies>
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>cms-plugin-framework</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>default-lc-managers</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>default-lc-managers</artifactId>
<scope>provided</scope>
</dependency>
<!-- SDI -->
<dependency>
<groupId>org.gcube.spatial.data</groupId>
<artifactId>gis-interface</artifactId>
<version>[2.4.6,3.0.0-SNAPSHOT)</version>
</dependency>
<!-- SDI -->
<dependency>
<groupId>org.gcube.spatial.data</groupId>
<artifactId>gis-interface</artifactId>
<version>[2.4.6,3.0.0-SNAPSHOT)</version>
</dependency>
<!-- DT -->
<dependency>
<groupId>org.gcube.data.transfer</groupId>
<artifactId>data-transfer-library</artifactId>
<version>[1.2.1,2.0.0-SNAPSHOT)</version>
</dependency>
<!-- DT -->
<dependency>
<groupId>org.gcube.data.transfer</groupId>
<artifactId>data-transfer-library</artifactId>
<version>[1.2.1,2.0.0-SNAPSHOT)</version>
</dependency>
<!-- POSTGRES DRIVERS -->
<dependency>
<groupId>net.postgis</groupId>
<artifactId>postgis-jdbc</artifactId>
<version>2.5.0</version>
</dependency>
<!-- POSTGRES DRIVERS -->
<dependency>
<groupId>net.postgis</groupId>
<artifactId>postgis-jdbc</artifactId>
<version>2.5.0</version>
</dependency>
<!-- GEO JSON -->
<!-- GEO JSON -->
<dependency>
<groupId>de.grundid.opendatalab</groupId>
<artifactId>geojson-jackson</artifactId>
<version>1.14</version>
</dependency>
<dependency>
<groupId>de.grundid.opendatalab</groupId>
<artifactId>geojson-jackson</artifactId>
<version>1.14</version>
</dependency>
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>cms-test-commons</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.gcube.application.cms</groupId>
<artifactId>cms-test-commons</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-uberjar</id>
<phase>package</phase>
</execution>
<execution>
<id>make-servicearchive</id>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-uberjar</id>
<phase>package</phase>
</execution>
<execution>
<id>make-servicearchive</id>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</plugins>
</build>
</project>

View File

@ -1,5 +1,11 @@
package org.gcube.application.cms.sdi;
import static org.junit.Assume.assumeTrue;
import java.sql.SQLException;
import java.time.Instant;
import java.util.List;
import org.gcube.application.cms.implementations.ISInterface;
import org.gcube.application.cms.implementations.ImplementationProvider;
import org.gcube.application.cms.plugins.faults.InvalidProfileException;
@ -8,24 +14,14 @@ import org.gcube.application.cms.sdi.engine.PostgisTable;
import org.gcube.application.cms.sdi.engine.SDIManagerWrapper;
import org.gcube.application.cms.sdi.faults.SDIInteractionException;
import org.gcube.application.cms.sdi.model.MappingObject;
import org.gcube.application.cms.sdi.plugins.SDIIndexerPlugin;
import org.gcube.application.cms.tests.TestProfiles;
import org.gcube.application.cms.tests.model.BasicTests;
import org.gcube.application.cms.tests.plugins.BasicPluginTest;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.joda.time.Instant;
import org.joda.time.format.DateTimeFormatter;
import org.junit.Test;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.List;
import static org.junit.Assume.assumeTrue;
public class LayerCreationTest extends BasicTests {

View File

@ -1,5 +1,7 @@
package org.gcube.application.cms.sdi.plugins;
import java.io.IOException;
import org.gcube.application.cms.serialization.Serialization;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.document.identification.SpatialReference;
@ -9,8 +11,6 @@ import org.geojson.LngLatAlt;
import org.geojson.Point;
import org.junit.Test;
import java.io.IOException;
public class GeoJSONTests {
@Test

View File

@ -1,6 +1,12 @@
package org.gcube.application.cms.sdi.plugins;
import com.fasterxml.jackson.core.JsonProcessingException;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assume.assumeTrue;
import java.util.Arrays;
import org.bson.Document;
import org.gcube.application.cms.plugins.IndexerPluginInterface;
import org.gcube.application.cms.plugins.faults.PluginExecutionException;
@ -25,10 +31,7 @@ import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.junit.Test;
import java.util.Arrays;
import static junit.framework.TestCase.*;
import static org.junit.Assume.assumeTrue;
import com.fasterxml.jackson.core.JsonProcessingException;
public class IndexerTest extends BasicPluginTest {

View File

@ -1,6 +1,11 @@
package org.gcube.application.cms.sdi.plugins;
import com.fasterxml.jackson.core.JsonProcessingException;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assume.assumeTrue;
import java.io.File;
import java.io.IOException;
import org.bson.Document;
import org.gcube.application.cms.plugins.faults.PluginExecutionException;
import org.gcube.application.cms.plugins.reports.MaterializationReport;
@ -20,11 +25,7 @@ import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assume.assumeTrue;
import com.fasterxml.jackson.core.JsonProcessingException;
public class MaterializerTests extends BasicPluginTest {