Component refactored. Changed Event Manager
This commit is contained in:
parent
01db0ae870
commit
413f6516d9
|
@ -1,10 +1,10 @@
|
|||
package org.gcube.application.cms.caches;
|
||||
|
||||
import org.gcube.application.cms.implementations.utils.UserUtils;
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.gcube.application.cms.implementations.utils.UserUtils;
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
import org.gcube.application.geoportal.common.utils.ContextUtils;
|
||||
|
||||
@Slf4j
|
||||
/**
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package org.gcube.application.cms.caches;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@ToString
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
package org.gcube.application.cms.caches;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.TemporalAmount;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.TemporalAmount;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.gcube.application.cms.implementations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.cms.caches.Engine;
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
|
||||
|
@ -7,8 +9,6 @@ import org.gcube.application.geoportal.common.utils.ISUtils;
|
|||
import org.gcube.common.resources.gcore.GenericResource;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DefaultISProvider implements ISInterface, Engine<ISInterface> {
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.gcube.application.cms.implementations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
|
||||
import org.gcube.common.resources.gcore.GenericResource;
|
||||
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ISInterface {
|
||||
|
||||
public DatabaseConnection queryForDatabase(String category, String platform,String flagName, String flagValue) throws ConfigurationException;
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
package org.gcube.application.cms.implementations;
|
||||
|
||||
|
||||
import lombok.Synchronized;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.gcube.application.cms.caches.Engine;
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.gcube.application.cms.caches.Engine;
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
|
||||
|
||||
import lombok.Synchronized;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class ImplementationProvider {
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.gcube.application.cms.implementations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.gcube.application.cms.implementations.faults.InvalidUserRoleException;
|
||||
import org.gcube.application.cms.implementations.faults.ProjectNotFoundException;
|
||||
|
@ -10,8 +12,6 @@ import org.gcube.application.geoportal.common.model.document.relationships.Relat
|
|||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ProjectAccess {
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.application.cms.implementations;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.gcube.application.geoportal.common.model.configuration.Archive;
|
||||
import org.gcube.application.geoportal.common.model.document.filesets.RegisteredFile;
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
|
@ -11,7 +11,13 @@ import org.gcube.common.storagehub.client.dsl.FolderContainer;
|
|||
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
|
||||
import org.gcube.common.storagehub.model.exceptions.StorageHubException;
|
||||
|
||||
import java.io.InputStream;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.Synchronized;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class WorkspaceManager {
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
package org.gcube.application.cms.implementations.utils;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.AccountingInfo;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
|
@ -11,11 +14,9 @@ import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
|||
import org.gcube.common.authorization.utils.manager.SecretManager;
|
||||
import org.gcube.common.authorization.utils.manager.SecretManagerProvider;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class UserUtils {
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package org.gcube.application.cms.plugins;
|
||||
|
||||
import org.gcube.application.cms.plugins.faults.*;
|
||||
import org.gcube.application.cms.plugins.faults.EventException;
|
||||
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.StepException;
|
||||
import org.gcube.application.cms.plugins.reports.EventExecutionReport;
|
||||
import org.gcube.application.cms.plugins.reports.StepExecutionReport;
|
||||
import org.gcube.application.cms.plugins.requests.BaseRequest;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.gcube.application.cms.plugins;
|
||||
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
|
||||
|
||||
public interface PluginManagerInterface {
|
||||
|
||||
public Plugin getById(String pluginID) throws ConfigurationException;
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
package org.gcube.application.cms.plugins;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.reflections.Reflections;
|
||||
import org.reflections.util.ConfigurationBuilder;
|
||||
import org.reflections.util.FilterBuilder;
|
||||
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.reflections.Reflections;
|
||||
import org.reflections.util.ConfigurationBuilder;
|
||||
import org.reflections.util.FilterBuilder;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class PluginsReflections {
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
|
||||
/**
|
||||
* The Class EventManager.
|
||||
*
|
||||
|
@ -11,9 +13,9 @@ import java.util.List;
|
|||
*
|
||||
* Dec 11, 2023
|
||||
*/
|
||||
public class EventManager implements EventManagerInterface<ItemObservable> {
|
||||
public class EventManager implements EventManagerInterface<ItemObserved<Project>> {
|
||||
|
||||
private HashMap<Event, List<EventListener<ItemObservable>>> listeners = new HashMap<Event, List<EventListener<ItemObservable>>>();
|
||||
private HashMap<Event, List<EventListener<ItemObserved<Project>>>> listeners = new HashMap<Event, List<EventListener<ItemObserved<Project>>>>();
|
||||
|
||||
/**
|
||||
* The Class Event.
|
||||
|
@ -87,10 +89,10 @@ public class EventManager implements EventManagerInterface<ItemObservable> {
|
|||
* @param eventType the event type
|
||||
* @param listener the listener
|
||||
*/
|
||||
public void subscribe(Event eventType, EventListener<ItemObservable> listener) {
|
||||
List<EventListener<ItemObservable>> list = listeners.get(eventType);
|
||||
public void subscribe(Event eventType, EventListener<ItemObserved<Project>> listener) {
|
||||
List<EventListener<ItemObserved<Project>>> list = listeners.get(eventType);
|
||||
if (list == null)
|
||||
list = new ArrayList<EventListener<ItemObservable>>();
|
||||
list = new ArrayList<EventListener<ItemObserved<Project>>>();
|
||||
|
||||
list.add(listener);
|
||||
listeners.put(eventType, list);
|
||||
|
@ -102,8 +104,8 @@ public class EventManager implements EventManagerInterface<ItemObservable> {
|
|||
* @param eventType the event type
|
||||
* @param listener the listener
|
||||
*/
|
||||
public void unsubscribe(Event eventType, EventListener<ItemObservable> listener) {
|
||||
List<EventListener<ItemObservable>> list = listeners.get(eventType);
|
||||
public void unsubscribe(Event eventType, EventListener<ItemObserved<Project>> listener) {
|
||||
List<EventListener<ItemObserved<Project>>> list = listeners.get(eventType);
|
||||
if (list == null)
|
||||
return;
|
||||
|
||||
|
@ -117,10 +119,10 @@ public class EventManager implements EventManagerInterface<ItemObservable> {
|
|||
* @param eventType the event type
|
||||
* @param item the item
|
||||
*/
|
||||
public void notify(Event eventType, ItemObservable item) {
|
||||
public void notify(Event eventType, ItemObserved<Project> item) {
|
||||
for (EventManager.Event event : listeners.keySet()) {
|
||||
if (event.equals(eventType)) {
|
||||
for (EventListener<ItemObservable> eventListner : listeners.get(eventType)) {
|
||||
for (EventListener<ItemObserved<Project>> eventListner : listeners.get(eventType)) {
|
||||
eventListner.updated(item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ package org.gcube.application.cms.plugins.events;
|
|||
|
||||
public interface ItemObservable {
|
||||
|
||||
public String getId();
|
||||
public String getProjectId();
|
||||
|
||||
public String getUCD_Id();
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.gcube.application.cms.plugins.events;
|
|||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
@ -18,14 +19,24 @@ import lombok.extern.slf4j.Slf4j;
|
|||
public class ItemObserved<T extends Project> implements ItemObservable {
|
||||
User caller;
|
||||
Context context;
|
||||
UseCaseDescriptor useCaseDescriptor;
|
||||
T project;
|
||||
EventManager.Event event;
|
||||
|
||||
public String getId() {
|
||||
log.debug("Called getId");
|
||||
|
||||
public String getProjectId() {
|
||||
log.debug("Called getProjectId");
|
||||
if (project == null)
|
||||
return null;
|
||||
return project.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUCD_Id() {
|
||||
log.debug("Called getUCD_Id");
|
||||
if (useCaseDescriptor == null)
|
||||
return null;
|
||||
return useCaseDescriptor.getId();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.gcube.application.cms.plugins.model;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Deque;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Properties;
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
|
@ -18,11 +28,11 @@ package org.gcube.application.cms.plugins.model;
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package org.gcube.application.cms.plugins.reports;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
||||
import org.gcube.application.cms.plugins.faults.PluginExecutionException;
|
||||
|
@ -12,8 +11,11 @@ import org.gcube.application.geoportal.common.model.document.Project;
|
|||
import org.gcube.application.geoportal.common.model.document.identification.IdentificationReference;
|
||||
import org.gcube.application.geoportal.common.model.document.lifecycle.LifecycleInformation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
|
||||
@Data
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package org.gcube.application.cms.plugins.reports;
|
||||
|
||||
import lombok.ToString;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
||||
import org.gcube.application.cms.plugins.requests.EventExecutionRequest;
|
||||
import org.gcube.application.geoportal.common.model.document.lifecycle.LifecycleInformation;
|
||||
|
||||
import lombok.ToString;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ToString(callSuper = true)
|
||||
@Slf4j
|
||||
public class EventExecutionReport extends DocumentHandlingReport<EventExecutionRequest>{
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package org.gcube.application.cms.plugins.reports;
|
||||
|
||||
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
||||
import org.gcube.application.cms.plugins.requests.IndexDocumentRequest;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
||||
import org.gcube.application.cms.plugins.requests.IndexDocumentRequest;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package org.gcube.application.cms.plugins.reports;
|
||||
|
||||
import lombok.NonNull;
|
||||
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
||||
import org.gcube.application.cms.plugins.requests.MaterializationRequest;
|
||||
|
||||
import lombok.NonNull;
|
||||
|
||||
|
||||
public class MaterializationReport extends DocumentHandlingReport<MaterializationRequest>{
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package org.gcube.application.cms.plugins.reports;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.cms.plugins.faults.PluginExecutionException;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.gcube.application.cms.plugins.faults.PluginExecutionException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
package org.gcube.application.cms.plugins.reports;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
||||
import org.gcube.application.cms.plugins.faults.PluginExecutionException;
|
||||
import org.gcube.application.cms.plugins.requests.EventExecutionRequest;
|
||||
import org.gcube.application.cms.plugins.requests.StepExecutionRequest;
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
package org.gcube.application.cms.plugins.requests;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString(callSuper = true)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.gcube.application.cms.plugins.requests;
|
||||
|
||||
import lombok.*;
|
||||
import org.bson.Document;
|
||||
import org.gcube.application.cms.plugins.faults.InvalidPluginRequestException;
|
||||
import org.gcube.application.cms.serialization.Serialization;
|
||||
|
@ -8,6 +7,12 @@ import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
|||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString(callSuper = true)
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package org.gcube.application.cms.plugins.requests;
|
||||
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package org.gcube.application.cms.plugins.requests;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.ToString;
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.ToString;
|
||||
|
||||
@ToString(callSuper = true)
|
||||
public class IndexDocumentRequest extends BaseExecutionRequest{
|
||||
public IndexDocumentRequest(@NonNull UseCaseDescriptor useCaseDescriptor, @NonNull User caller, @NonNull Context context, Project document) {
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package org.gcube.application.cms.plugins.requests;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.ToString;
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.ToString;
|
||||
|
||||
@ToString(callSuper = true)
|
||||
public class MaterializationRequest extends BaseExecutionRequest{
|
||||
public MaterializationRequest(@NonNull UseCaseDescriptor useCaseDescriptor, @NonNull User caller, @NonNull Context context, Project document) {
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package org.gcube.application.cms.plugins.requests;
|
||||
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.Context;
|
||||
import org.gcube.application.geoportal.common.model.document.accounting.User;
|
||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
package org.gcube.application.cms.serialization;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.gcube.application.geoportal.common.JSONSerializationProvider;
|
||||
|
||||
import com.jayway.jsonpath.Configuration;
|
||||
import com.jayway.jsonpath.Option;
|
||||
import com.jayway.jsonpath.spi.json.JacksonJsonProvider;
|
||||
import com.jayway.jsonpath.spi.json.JsonProvider;
|
||||
import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider;
|
||||
import com.jayway.jsonpath.spi.mapper.MappingProvider;
|
||||
import org.gcube.application.geoportal.common.JSONSerializationProvider;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class JacksonProvider implements JSONSerializationProvider {
|
||||
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
package org.gcube.application.cms.serialization;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import com.vdurmont.semver4j.Semver;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.io.IOException;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.bson.types.ObjectId;
|
||||
import org.gcube.application.cms.plugins.model.ComparableVersion;
|
||||
import org.gcube.application.geoportal.common.model.document.Project;
|
||||
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Iterator;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import com.vdurmont.semver4j.Semver;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class Serialization {
|
||||
|
|
Loading…
Reference in New Issue