#23835 implementing WORKFLOW_ACTION_LIST_GUI configuration
This commit is contained in:
parent
b629928f36
commit
b4bade9951
|
@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
|
|
||||||
- [#22883] Integrated the configurations exposed by (the new) geoportal-client (>= 1.1.0-SNAPSHOT)
|
- [#22883] Integrated the configurations exposed by (the new) geoportal-client (>= 1.1.0-SNAPSHOT)
|
||||||
- Passed to UCD/Projects geoportal client/service
|
- Passed to UCD/Projects geoportal client/service
|
||||||
|
- [#23835] Intrageted with WORKFLOW_ACTION_LIST_GUI configuration
|
||||||
|
|
||||||
## [v1.4.0] - 2022-06-08
|
## [v1.4.0] - 2022-06-08
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,14 @@ import org.gcube.application.geoportal.common.model.document.lifecycle.Lifecycle
|
||||||
import org.gcube.application.geoportal.common.model.document.relationships.Relationship;
|
import org.gcube.application.geoportal.common.model.document.relationships.Relationship;
|
||||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDeclaration;
|
import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDeclaration;
|
||||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||||
|
import org.gcube.application.geoportalcommon.geoportal.config.ActionDefinition;
|
||||||
import org.gcube.application.geoportalcommon.geoportal.config.FilePath;
|
import org.gcube.application.geoportalcommon.geoportal.config.FilePath;
|
||||||
import org.gcube.application.geoportalcommon.geoportal.config.GcubeProfile;
|
import org.gcube.application.geoportalcommon.geoportal.config.GcubeProfile;
|
||||||
import org.gcube.application.geoportalcommon.geoportal.config.ItemField;
|
import org.gcube.application.geoportalcommon.geoportal.config.ItemField;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ConfigurationDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.ConfigurationDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
|
||||||
|
import org.gcube.application.geoportalcommon.shared.geoportal.config.ActionDefinitionDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.FilePathDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.config.FilePathDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.GcubeProfileDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.config.GcubeProfileDV;
|
||||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
||||||
|
@ -104,6 +106,7 @@ public class ConvertToDataValueObjectModel {
|
||||||
|
|
||||||
List<HandlerDeclarationDV> listHandlersDV = new ArrayList<HandlerDeclarationDV>();
|
List<HandlerDeclarationDV> listHandlersDV = new ArrayList<HandlerDeclarationDV>();
|
||||||
if (handlersIds != null) {
|
if (handlersIds != null) {
|
||||||
|
LOG.info("List of input handlersIds is "+handlersIds+", converting it");
|
||||||
Map<String, List<HandlerDeclaration>> handlersMapByID = ucd.getHandlersMapByID();
|
Map<String, List<HandlerDeclaration>> handlersMapByID = ucd.getHandlersMapByID();
|
||||||
|
|
||||||
if (handlersMapByID != null) {
|
if (handlersMapByID != null) {
|
||||||
|
@ -124,6 +127,7 @@ public class ConvertToDataValueObjectModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
LOG.info("List of input handlersIds is null, reading all handlers");
|
||||||
List<HandlerDeclaration> listHandlerDeclaration = ucd.getHandlers();
|
List<HandlerDeclaration> listHandlerDeclaration = ucd.getHandlers();
|
||||||
for (HandlerDeclaration handlerDeclaration : listHandlerDeclaration) {
|
for (HandlerDeclaration handlerDeclaration : listHandlerDeclaration) {
|
||||||
LOG.debug("converting handler {}", handlerDeclaration);
|
LOG.debug("converting handler {}", handlerDeclaration);
|
||||||
|
@ -175,6 +179,7 @@ public class ConvertToDataValueObjectModel {
|
||||||
*/
|
*/
|
||||||
public static HandlerDeclarationDV toHandlerDeclarationDV(HandlerDeclaration handlerDeclaration, String profileName,
|
public static HandlerDeclarationDV toHandlerDeclarationDV(HandlerDeclaration handlerDeclaration, String profileName,
|
||||||
GEOPORTAL_CONFIGURATION_TYPE... readConfigs) throws Exception {
|
GEOPORTAL_CONFIGURATION_TYPE... readConfigs) throws Exception {
|
||||||
|
LOG.debug("toHandlerDeclarationDV called [handlerDeclaration: "+handlerDeclaration+"], [profileName: "+profileName+"], [readConfigs: "+readConfigs+"]");
|
||||||
|
|
||||||
if (handlerDeclaration == null) {
|
if (handlerDeclaration == null) {
|
||||||
LOG.warn(HandlerDeclaration.class.getSimpleName() + " is null");
|
LOG.warn(HandlerDeclaration.class.getSimpleName() + " is null");
|
||||||
|
@ -199,11 +204,12 @@ public class ConvertToDataValueObjectModel {
|
||||||
readConfigs = GEOPORTAL_CONFIGURATION_TYPE.values();
|
readConfigs = GEOPORTAL_CONFIGURATION_TYPE.values();
|
||||||
}
|
}
|
||||||
|
|
||||||
GEOPORTAL_CONFIGURATION_TYPE geoportalConfigType = null;
|
List<GEOPORTAL_CONFIGURATION_TYPE> listGeoportalConfigType = new ArrayList<GEOPORTAL_CONFIGURATION_TYPE>();
|
||||||
ArrayList<String> jsonConfigurations = null;
|
ArrayList<String> jsonConfigurations = null;
|
||||||
|
|
||||||
// this is the 'projection' field stored in the Configuration,
|
// this is the 'projection' field stored in the Configuration,
|
||||||
//if the field exists, e.g. _theDocument, it used as suffix to get the right JSON path concatenating the projection + the paths
|
// if the field exists, e.g. _theDocument, it used as suffix to get the right
|
||||||
|
// JSON path concatenating the projection + the paths
|
||||||
String projection = null;
|
String projection = null;
|
||||||
for (GEOPORTAL_CONFIGURATION_TYPE configManaged : readConfigs) {
|
for (GEOPORTAL_CONFIGURATION_TYPE configManaged : readConfigs) {
|
||||||
try {
|
try {
|
||||||
|
@ -237,7 +243,7 @@ public class ConvertToDataValueObjectModel {
|
||||||
jsonConfigurations.add(jsonValue);
|
jsonConfigurations.add(jsonValue);
|
||||||
}
|
}
|
||||||
LOG.debug("configurations found are: {}", jsonConfigurations);
|
LOG.debug("configurations found are: {}", jsonConfigurations);
|
||||||
geoportalConfigType = configManaged;
|
listGeoportalConfigType.add(configManaged);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -246,6 +252,7 @@ public class ConvertToDataValueObjectModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (jsonConfigurations == null) {
|
if (jsonConfigurations == null) {
|
||||||
String error = "No managed configurations as '"
|
String error = "No managed configurations as '"
|
||||||
+ Arrays.asList(GEOPORTAL_CONFIGURATION_TYPE.values()).toString() + "' found in the handler "
|
+ Arrays.asList(GEOPORTAL_CONFIGURATION_TYPE.values()).toString() + "' found in the handler "
|
||||||
|
@ -254,6 +261,8 @@ public class ConvertToDataValueObjectModel {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (GEOPORTAL_CONFIGURATION_TYPE geoportalConfigType : listGeoportalConfigType) {
|
||||||
|
|
||||||
switch (geoportalConfigType) {
|
switch (geoportalConfigType) {
|
||||||
case gcube_profiles: {
|
case gcube_profiles: {
|
||||||
|
|
||||||
|
@ -282,9 +291,9 @@ public class ConvertToDataValueObjectModel {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (String asJSONString : jsonConfigurations) {
|
for (String asJSONString : jsonConfigurations) {
|
||||||
LOG.debug(++i + ") the itemField is: " + asJSONString);
|
LOG.debug(++i + ") the itemField is: " + asJSONString);
|
||||||
ItemField profile = org.gcube.application.geoportal.client.utils.Serialization.read(asJSONString,
|
ItemField itemField = org.gcube.application.geoportal.client.utils.Serialization.read(asJSONString,
|
||||||
ItemField.class);
|
ItemField.class);
|
||||||
listItemFields.add(toItemFieldDV(profile));
|
listItemFields.add(toItemFieldDV(itemField));
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigurationDV<List<ItemFieldDV>> dDV = new ConfigurationDV<List<ItemFieldDV>>(listItemFields);
|
ConfigurationDV<List<ItemFieldDV>> dDV = new ConfigurationDV<List<ItemFieldDV>>(listItemFields);
|
||||||
|
@ -295,9 +304,30 @@ public class ConvertToDataValueObjectModel {
|
||||||
return hdDV;
|
return hdDV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case actions_definition: {
|
||||||
|
|
||||||
|
List<ActionDefinitionDV> listActionsDef = new ArrayList<ActionDefinitionDV>(jsonConfigurations.size());
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
for (String asJSONString : jsonConfigurations) {
|
||||||
|
LOG.debug(++i + ") the ActionDefinition is: " + asJSONString);
|
||||||
|
ActionDefinition actionDef = org.gcube.application.geoportal.client.utils.Serialization
|
||||||
|
.read(asJSONString, ActionDefinition.class);
|
||||||
|
listActionsDef.add(toActionDefinition(actionDef));
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigurationDV<List<ActionDefinitionDV>> dDV = new ConfigurationDV<List<ActionDefinitionDV>>(listActionsDef);
|
||||||
|
dDV.setConfiguration(listActionsDef);
|
||||||
|
dDV.setConfigurationType(geoportalConfigType); // -> GEOPORTAL_CONFIGURATION_TYPE.actions_definition
|
||||||
|
hdDV.setConfiguration(dDV);
|
||||||
|
LOG.info("returning {}", hdDV);
|
||||||
|
return hdDV;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Error on getting " + HandlerDeclaration.class.getSimpleName(), e);
|
LOG.error("Error on getting " + HandlerDeclaration.class.getSimpleName(), e);
|
||||||
|
@ -372,6 +402,30 @@ public class ConvertToDataValueObjectModel {
|
||||||
return ifDV;
|
return ifDV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To action definition.
|
||||||
|
*
|
||||||
|
* @param actionDefinition the action definition
|
||||||
|
* @return the action definition DV
|
||||||
|
*/
|
||||||
|
public static ActionDefinitionDV toActionDefinition(ActionDefinition actionDefinition) {
|
||||||
|
LOG.trace("toActionDefinition called");
|
||||||
|
|
||||||
|
if (actionDefinition == null) {
|
||||||
|
LOG.warn(ActionDefinition.class.getSimpleName() + " is null");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
ActionDefinitionDV actDef = new ActionDefinitionDV();
|
||||||
|
actDef.setId(actionDefinition.getId());
|
||||||
|
actDef.setCallSteps(actionDefinition.getCall_STEPS());
|
||||||
|
actDef.setDescription(actionDefinition.getDescription());
|
||||||
|
actDef.setDisplayOnPhase(actionDefinition.getDisplay_on_phase());
|
||||||
|
|
||||||
|
LOG.info("returning: " + actionDefinition);
|
||||||
|
return actDef;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To file path DV.
|
* To file path DV.
|
||||||
*
|
*
|
||||||
|
@ -715,26 +769,78 @@ public class ConvertToDataValueObjectModel {
|
||||||
|
|
||||||
public static final DateTimeFormatter FULL_FORMATTER = DateTimeFormatter.ofPattern("uuuuMMdd_HH-mm-ss");
|
public static final DateTimeFormatter FULL_FORMATTER = DateTimeFormatter.ofPattern("uuuuMMdd_HH-mm-ss");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class MyLocalDateSerializer.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Sep 9, 2022
|
||||||
|
*/
|
||||||
public static class MyLocalDateSerializer extends JsonSerializer<LocalDate> {
|
public static class MyLocalDateSerializer extends JsonSerializer<LocalDate> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialize.
|
||||||
|
*
|
||||||
|
* @param value the value
|
||||||
|
* @param gen the gen
|
||||||
|
* @param serializers the serializers
|
||||||
|
* @throws IOException Signals that an I/O exception has occurred.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void serialize(LocalDate value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
|
public void serialize(LocalDate value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
|
||||||
gen.writeString(value.format(FULL_FORMATTER));
|
gen.writeString(value.format(FULL_FORMATTER));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class ParseDeserializer.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Sep 9, 2022
|
||||||
|
*/
|
||||||
public static class ParseDeserializer extends StdDeserializer<LocalDateTime> {
|
public static class ParseDeserializer extends StdDeserializer<LocalDateTime> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new parses the deserializer.
|
||||||
|
*/
|
||||||
public ParseDeserializer() {
|
public ParseDeserializer() {
|
||||||
super(LocalDateTime.class);
|
super(LocalDateTime.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserialize.
|
||||||
|
*
|
||||||
|
* @param p the p
|
||||||
|
* @param ctxt the ctxt
|
||||||
|
* @return the local date time
|
||||||
|
* @throws IOException Signals that an I/O exception has occurred.
|
||||||
|
* @throws JsonProcessingException the json processing exception
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public LocalDateTime deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
|
public LocalDateTime deserialize(JsonParser p, DeserializationContext ctxt)
|
||||||
|
throws IOException, JsonProcessingException {
|
||||||
return LocalDateTime.parse(p.getValueAsString()); // or overloaded with an appropriate format
|
return LocalDateTime.parse(p.getValueAsString()); // or overloaded with an appropriate format
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class MyLocalDateDeserializer.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Sep 9, 2022
|
||||||
|
*/
|
||||||
public static class MyLocalDateDeserializer extends JsonDeserializer<LocalDate> {
|
public static class MyLocalDateDeserializer extends JsonDeserializer<LocalDate> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserialize.
|
||||||
|
*
|
||||||
|
* @param p the p
|
||||||
|
* @param ctxt the ctxt
|
||||||
|
* @return the local date
|
||||||
|
* @throws IOException Signals that an I/O exception has occurred.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
|
public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
|
||||||
return LocalDate.parse(p.getValueAsString(), FULL_FORMATTER);
|
return LocalDate.parse(p.getValueAsString(), FULL_FORMATTER);
|
||||||
|
@ -756,18 +862,17 @@ public class ConvertToDataValueObjectModel {
|
||||||
String keyLower = key.toLowerCase();
|
String keyLower = key.toLowerCase();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
* ObjectMapper objectMapper = new ObjectMapper(); JavaTimeModule javaTimeModule
|
||||||
JavaTimeModule javaTimeModule = new JavaTimeModule();
|
* = new JavaTimeModule(); javaTimeModule.addDeserializer(LocalDateTime.class,
|
||||||
javaTimeModule.addDeserializer(LocalDateTime.class, new ParseDeserializer());
|
* new ParseDeserializer()); // javaTimeModule.addSerializer(LocalDate.class,
|
||||||
// javaTimeModule.addSerializer(LocalDate.class, new MyLocalDateSerializer());
|
* new MyLocalDateSerializer()); objectMapper.registerModule(javaTimeModule);
|
||||||
objectMapper.registerModule(javaTimeModule);
|
*
|
||||||
|
* objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
* objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS,
|
||||||
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
|
* false); objectMapper.configure(SerializationFeature.
|
||||||
objectMapper.configure(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, false);
|
* WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, false);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// checking if the key is a Date
|
// checking if the key is a Date
|
||||||
for (String possibleDate : KEYSET_POSSIBLE_DATE) {
|
for (String possibleDate : KEYSET_POSSIBLE_DATE) {
|
||||||
if (keyLower.contains(possibleDate)) {
|
if (keyLower.contains(possibleDate)) {
|
||||||
|
@ -777,9 +882,11 @@ public class ConvertToDataValueObjectModel {
|
||||||
String jsonValue = documentDate.toJson();
|
String jsonValue = documentDate.toJson();
|
||||||
LOG.debug("jsonValue " + value);
|
LOG.debug("jsonValue " + value);
|
||||||
|
|
||||||
//LocalDate asDate = objectMapper.readerFor(LocalDate.class).readValue(jsonValue);
|
// LocalDate asDate =
|
||||||
|
// objectMapper.readerFor(LocalDate.class).readValue(jsonValue);
|
||||||
|
|
||||||
LocalDateTime asDate = org.gcube.application.geoportal.client.utils.Serialization.read(jsonValue, LocalDateTime.class);
|
LocalDateTime asDate = org.gcube.application.geoportal.client.utils.Serialization.read(jsonValue,
|
||||||
|
LocalDateTime.class);
|
||||||
LOG.info("Casted as date: " + asDate);
|
LOG.info("Casted as date: " + asDate);
|
||||||
value = asDate;
|
value = asDate;
|
||||||
break;
|
break;
|
||||||
|
@ -793,15 +900,29 @@ public class ConvertToDataValueObjectModel {
|
||||||
return documentAsMap;
|
return documentAsMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class LocalDateDeserializer.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Sep 9, 2022
|
||||||
|
*/
|
||||||
public class LocalDateDeserializer extends JsonDeserializer<LocalDate> {
|
public class LocalDateDeserializer extends JsonDeserializer<LocalDate> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserialize.
|
||||||
|
*
|
||||||
|
* @param p the p
|
||||||
|
* @param ctxt the ctxt
|
||||||
|
* @return the local date
|
||||||
|
* @throws IOException Signals that an I/O exception has occurred.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
|
public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
|
||||||
return LocalDate.parse(p.getValueAsString());
|
return LocalDate.parse(p.getValueAsString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To relationship DV.
|
* To relationship DV.
|
||||||
*
|
*
|
||||||
|
|
|
@ -360,9 +360,9 @@ public class ProjectsCaller {
|
||||||
|
|
||||||
for (ItemFieldDV itemField : orderByFields) {
|
for (ItemFieldDV itemField : orderByFields) {
|
||||||
if (itemField.getJsonFields() != null) {
|
if (itemField.getJsonFields() != null) {
|
||||||
for (String field : itemField.getJsonFields()) {
|
for (String jsonFieldPath : itemField.getJsonFields()) {
|
||||||
String fieldFullPath = String.format("%s.%s", itemField.getProjection(), field);
|
//String fieldFullPath = String.format("%s.%s", itemField.getProjection(), field);
|
||||||
orderingFields.add(fieldFullPath);
|
orderingFields.add(jsonFieldPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package org.gcube.application.geoportalcommon.geoportal.config;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@XmlRootElement(name = "actionsDefinition")
|
||||||
|
@Slf4j
|
||||||
|
public class ActionDefinition {
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
private String id;
|
||||||
|
@JsonProperty
|
||||||
|
private String title;
|
||||||
|
@JsonProperty
|
||||||
|
private String[] call_STEPS;
|
||||||
|
@JsonProperty
|
||||||
|
private String description;
|
||||||
|
@JsonProperty
|
||||||
|
private String[] display_on_phase;
|
||||||
|
@JsonProperty
|
||||||
|
private boolean searchable;
|
||||||
|
|
||||||
|
private String configID;
|
||||||
|
|
||||||
|
public ActionDefinition() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,43 +0,0 @@
|
||||||
//package org.gcube.application.geoportalcommon.geoportal.config;
|
|
||||||
//
|
|
||||||
//import java.util.List;
|
|
||||||
//
|
|
||||||
//import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
//
|
|
||||||
//import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
//
|
|
||||||
//import lombok.Data;
|
|
||||||
//import lombok.extern.slf4j.Slf4j;
|
|
||||||
//
|
|
||||||
//@Data
|
|
||||||
//@XmlRootElement
|
|
||||||
//@Slf4j
|
|
||||||
//public class HandlerGcubeProfile {
|
|
||||||
//
|
|
||||||
// @JsonProperty
|
|
||||||
// private String gcubeSecondaryType;
|
|
||||||
//
|
|
||||||
// @JsonProperty
|
|
||||||
// private String gcubeName;
|
|
||||||
//
|
|
||||||
// @JsonProperty
|
|
||||||
// private String sectionName;
|
|
||||||
//
|
|
||||||
// @JsonProperty
|
|
||||||
// private String sectionTitle;
|
|
||||||
//
|
|
||||||
// @JsonProperty
|
|
||||||
// private Integer minOccurs;
|
|
||||||
//
|
|
||||||
// @JsonProperty
|
|
||||||
// private Integer maxOccurs;
|
|
||||||
//
|
|
||||||
// @JsonProperty
|
|
||||||
// private String parentName;
|
|
||||||
//
|
|
||||||
// @JsonProperty(value = "filePaths")
|
|
||||||
// private List<FilePath> listFilePaths;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//}
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
package org.gcube.application.geoportalcommon.shared.geoportal.config;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
public class ActionDefinitionDV implements GeoportalConfigurationID, Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 6071900142588642601L;
|
||||||
|
private String id;
|
||||||
|
private String title;
|
||||||
|
private String[] callSteps;
|
||||||
|
private String description;
|
||||||
|
private String[] displayOnPhase;
|
||||||
|
|
||||||
|
private String configID;
|
||||||
|
|
||||||
|
public ActionDefinitionDV() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getID() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setID(String configID) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getCallSteps() {
|
||||||
|
return callSteps;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getDisplayOnPhase() {
|
||||||
|
return displayOnPhase;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigID() {
|
||||||
|
return configID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCallSteps(String[] callSteps) {
|
||||||
|
this.callSteps = callSteps;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDisplayOnPhase(String[] displayOnPhase) {
|
||||||
|
this.displayOnPhase = displayOnPhase;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigID(String configID) {
|
||||||
|
this.configID = configID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("ActionDefinitionDV [id=");
|
||||||
|
builder.append(id);
|
||||||
|
builder.append(", title=");
|
||||||
|
builder.append(title);
|
||||||
|
builder.append(", callSteps=");
|
||||||
|
builder.append(Arrays.toString(callSteps));
|
||||||
|
builder.append(", description=");
|
||||||
|
builder.append(description);
|
||||||
|
builder.append(", displayOnPhase=");
|
||||||
|
builder.append(Arrays.toString(displayOnPhase));
|
||||||
|
builder.append(", configID=");
|
||||||
|
builder.append(configID);
|
||||||
|
builder.append("]");
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -25,9 +25,6 @@ public class ItemFieldDV implements GeoportalConfigurationID, Serializable {
|
||||||
|
|
||||||
private String configID;
|
private String configID;
|
||||||
|
|
||||||
// This is the prefix of the document projection, e.g. _theDocument
|
|
||||||
private String projection = "_theDocument";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new item field.
|
* Instantiates a new item field.
|
||||||
*/
|
*/
|
||||||
|
@ -175,15 +172,6 @@ public class ItemFieldDV implements GeoportalConfigurationID, Serializable {
|
||||||
this.searchable = searchable;
|
this.searchable = searchable;
|
||||||
}
|
}
|
||||||
|
|
||||||
//THIS ONE MUST BE REVISITED. MUST BE PASSED IN THE CONFIGURATION
|
|
||||||
public String getProjection() {
|
|
||||||
return projection;
|
|
||||||
}
|
|
||||||
|
|
||||||
// public void setProjection(String projection) {
|
|
||||||
// this.projection = projection;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
|
@ -201,8 +189,6 @@ public class ItemFieldDV implements GeoportalConfigurationID, Serializable {
|
||||||
builder.append(searchable);
|
builder.append(searchable);
|
||||||
builder.append(", configID=");
|
builder.append(", configID=");
|
||||||
builder.append(configID);
|
builder.append(configID);
|
||||||
builder.append(", projection=");
|
|
||||||
builder.append(projection);
|
|
||||||
builder.append("]");
|
builder.append("]");
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package org.gcube.application.geoportalcommon.shared.geoportal.ucd;
|
package org.gcube.application.geoportalcommon.shared.geoportal.ucd;
|
||||||
|
|
||||||
public enum GEOPORTAL_CONFIGURATION_TYPE {
|
public enum GEOPORTAL_CONFIGURATION_TYPE {
|
||||||
item_fields("itemFields"), gcube_profiles("gcubeProfiles");
|
item_fields("itemFields"), gcube_profiles("gcubeProfiles"), actions_definition("actionsDefinition");
|
||||||
|
|
||||||
String id;
|
String id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue