From b4bade9951b89c1f149ef36d06960ba4bfec65df Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Mon, 12 Sep 2022 15:03:33 +0200 Subject: [PATCH] #23835 implementing WORKFLOW_ACTION_LIST_GUI configuration --- CHANGELOG.md | 1 + .../ConvertToDataValueObjectModel.java | 317 ++++++++++++------ .../geoportal/ProjectsCaller.java | 6 +- .../geoportal/config/ActionDefinition.java | 34 ++ .../geoportal/config/HandlerGcubeProfile.java | 43 --- .../geoportal/config/ActionDefinitionDV.java | 103 ++++++ .../shared/geoportal/config/ItemFieldDV.java | 14 - .../ucd/GEOPORTAL_CONFIGURATION_TYPE.java | 2 +- 8 files changed, 361 insertions(+), 159 deletions(-) create mode 100644 src/main/java/org/gcube/application/geoportalcommon/geoportal/config/ActionDefinition.java delete mode 100644 src/main/java/org/gcube/application/geoportalcommon/geoportal/config/HandlerGcubeProfile.java create mode 100644 src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/config/ActionDefinitionDV.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 81c5fbb..a1a08e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) - Passed to UCD/Projects geoportal client/service +- [#23835] Intrageted with WORKFLOW_ACTION_LIST_GUI configuration ## [v1.4.0] - 2022-06-08 diff --git a/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataValueObjectModel.java b/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataValueObjectModel.java index 1c9178e..45e0a68 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataValueObjectModel.java +++ b/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataValueObjectModel.java @@ -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.useCaseDescriptor.HandlerDeclaration; 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.GcubeProfile; import org.gcube.application.geoportalcommon.geoportal.config.ItemField; import org.gcube.application.geoportalcommon.shared.geoportal.ConfigurationDV; import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV; 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.GcubeProfileDV; import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV; @@ -104,6 +106,7 @@ public class ConvertToDataValueObjectModel { List listHandlersDV = new ArrayList(); if (handlersIds != null) { + LOG.info("List of input handlersIds is "+handlersIds+", converting it"); Map> handlersMapByID = ucd.getHandlersMapByID(); if (handlersMapByID != null) { @@ -124,6 +127,7 @@ public class ConvertToDataValueObjectModel { } } } else { + LOG.info("List of input handlersIds is null, reading all handlers"); List listHandlerDeclaration = ucd.getHandlers(); for (HandlerDeclaration handlerDeclaration : listHandlerDeclaration) { LOG.debug("converting handler {}", handlerDeclaration); @@ -175,7 +179,8 @@ public class ConvertToDataValueObjectModel { */ public static HandlerDeclarationDV toHandlerDeclarationDV(HandlerDeclaration handlerDeclaration, String profileName, GEOPORTAL_CONFIGURATION_TYPE... readConfigs) throws Exception { - + LOG.debug("toHandlerDeclarationDV called [handlerDeclaration: "+handlerDeclaration+"], [profileName: "+profileName+"], [readConfigs: "+readConfigs+"]"); + if (handlerDeclaration == null) { LOG.warn(HandlerDeclaration.class.getSimpleName() + " is null"); return null; @@ -199,24 +204,25 @@ public class ConvertToDataValueObjectModel { readConfigs = GEOPORTAL_CONFIGURATION_TYPE.values(); } - GEOPORTAL_CONFIGURATION_TYPE geoportalConfigType = null; + List listGeoportalConfigType = new ArrayList(); ArrayList jsonConfigurations = null; - - //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 + + // 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 String projection = null; for (GEOPORTAL_CONFIGURATION_TYPE configManaged : readConfigs) { try { LOG.debug("searching '" + configManaged.getId() + "' in the configuration " + configuration); LOG.trace("contains " + configManaged.getId() + ": " + configuration.containsKey(configManaged.getId())); - + try { projection = configuration.getString("projection"); - }catch (Exception e) { + } catch (Exception e) { // TODO: handle exception } - + ArrayList> listHashMapConfig = configuration .get(configManaged.getId(), ArrayList.class); LOG.debug("hashMapConfig found is: {}", listHashMapConfig); @@ -227,17 +233,17 @@ public class ConvertToDataValueObjectModel { for (LinkedHashMap config : listHashMapConfig) { Document document = new Document(config); - + // //THIS PART MUST BE REVISITED // if(projection!=null) // document.append("projection", projection); - + String jsonValue = document.toJson(); LOG.debug("config is: {}", jsonValue); jsonConfigurations.add(jsonValue); } LOG.debug("configurations found are: {}", jsonConfigurations); - geoportalConfigType = configManaged; + listGeoportalConfigType.add(configManaged); break; } } catch (Exception e) { @@ -246,6 +252,7 @@ public class ConvertToDataValueObjectModel { } } + if (jsonConfigurations == null) { String error = "No managed configurations as '" + Arrays.asList(GEOPORTAL_CONFIGURATION_TYPE.values()).toString() + "' found in the handler " @@ -253,50 +260,73 @@ public class ConvertToDataValueObjectModel { LOG.warn(error); return null; } + + for (GEOPORTAL_CONFIGURATION_TYPE geoportalConfigType : listGeoportalConfigType) { + + switch (geoportalConfigType) { + case gcube_profiles: { - switch (geoportalConfigType) { - case gcube_profiles: { + List listGcubeProfiles = new ArrayList(jsonConfigurations.size()); - List listGcubeProfiles = new ArrayList(jsonConfigurations.size()); + int i = 0; + for (String asJSONString : jsonConfigurations) { + LOG.debug(++i + ") the gCubeProfile is: " + asJSONString); + GcubeProfile profile = org.gcube.application.geoportal.client.utils.Serialization.read(asJSONString, + GcubeProfile.class); + listGcubeProfiles.add(toGcubeProfileDV(profile)); + } - int i = 0; - for (String asJSONString : jsonConfigurations) { - LOG.debug(++i + ") the gCubeProfile is: " + asJSONString); - GcubeProfile profile = org.gcube.application.geoportal.client.utils.Serialization.read(asJSONString, - GcubeProfile.class); - listGcubeProfiles.add(toGcubeProfileDV(profile)); + ConfigurationDV> dDV = new ConfigurationDV>( + listGcubeProfiles); + dDV.setConfiguration(listGcubeProfiles); + dDV.setConfigurationType(geoportalConfigType); // -> GEOPORTAL_CONFIGURATION_TYPE.gcube_profiles + hdDV.setConfiguration(dDV); + LOG.info("returning {}", hdDV); + return hdDV; + } + case item_fields: { + + List listItemFields = new ArrayList(jsonConfigurations.size()); + + int i = 0; + for (String asJSONString : jsonConfigurations) { + LOG.debug(++i + ") the itemField is: " + asJSONString); + ItemField itemField = org.gcube.application.geoportal.client.utils.Serialization.read(asJSONString, + ItemField.class); + listItemFields.add(toItemFieldDV(itemField)); + } + + ConfigurationDV> dDV = new ConfigurationDV>(listItemFields); + dDV.setConfiguration(listItemFields); + dDV.setConfigurationType(geoportalConfigType); // -> GEOPORTAL_CONFIGURATION_TYPE.item_fields + hdDV.setConfiguration(dDV); + LOG.info("returning {}", hdDV); + return hdDV; } - ConfigurationDV> dDV = new ConfigurationDV>( - listGcubeProfiles); - dDV.setConfiguration(listGcubeProfiles); - dDV.setConfigurationType(geoportalConfigType); //-> GEOPORTAL_CONFIGURATION_TYPE.gcube_profiles - hdDV.setConfiguration(dDV); - LOG.info("returning {}", hdDV); - return hdDV; - } - case item_fields: { + case actions_definition: { - List listItemFields = new ArrayList(jsonConfigurations.size()); + List listActionsDef = new ArrayList(jsonConfigurations.size()); - int i = 0; - for (String asJSONString : jsonConfigurations) { - LOG.debug(++i + ") the itemField is: " + asJSONString); - ItemField profile = org.gcube.application.geoportal.client.utils.Serialization.read(asJSONString, - ItemField.class); - listItemFields.add(toItemFieldDV(profile)); + 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> dDV = new ConfigurationDV>(listActionsDef); + dDV.setConfiguration(listActionsDef); + dDV.setConfigurationType(geoportalConfigType); // -> GEOPORTAL_CONFIGURATION_TYPE.actions_definition + hdDV.setConfiguration(dDV); + LOG.info("returning {}", hdDV); + return hdDV; } - ConfigurationDV> dDV = new ConfigurationDV>(listItemFields); - dDV.setConfiguration(listItemFields); - dDV.setConfigurationType(geoportalConfigType); //-> GEOPORTAL_CONFIGURATION_TYPE.item_fields - hdDV.setConfiguration(dDV); - LOG.info("returning {}", hdDV); - return hdDV; - } - - default: - break; + default: + break; + } } } catch (Exception e) { @@ -372,6 +402,30 @@ public class ConvertToDataValueObjectModel { 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. * @@ -712,34 +766,86 @@ public class ConvertToDataValueObjectModel { return documentDV; } - - 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 { - @Override - public void serialize(LocalDate value, JsonGenerator gen, SerializerProvider serializers) throws IOException { - gen.writeString(value.format(FULL_FORMATTER)); - } - } - - public static class ParseDeserializer extends StdDeserializer { - public ParseDeserializer() { - super(LocalDateTime.class); - } - @Override - public LocalDateTime deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException { - return LocalDateTime.parse(p.getValueAsString()); // or overloaded with an appropriate format - } + /** + * Serialize. + * + * @param value the value + * @param gen the gen + * @param serializers the serializers + * @throws IOException Signals that an I/O exception has occurred. + */ + @Override + public void serialize(LocalDate value, JsonGenerator gen, SerializerProvider serializers) throws IOException { + gen.writeString(value.format(FULL_FORMATTER)); + } } - public static class MyLocalDateDeserializer extends JsonDeserializer { + /** + * The Class ParseDeserializer. + * + * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it + * + * Sep 9, 2022 + */ + public static class ParseDeserializer extends StdDeserializer { - @Override - public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { - return LocalDate.parse(p.getValueAsString(),FULL_FORMATTER); - } - } + /** + * Instantiates a new parses the deserializer. + */ + public ParseDeserializer() { + 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 + public LocalDateTime deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + 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 { + + /** + * Deserialize. + * + * @param p the p + * @param ctxt the ctxt + * @return the local date + * @throws IOException Signals that an I/O exception has occurred. + */ + @Override + public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return LocalDate.parse(p.getValueAsString(), FULL_FORMATTER); + } + } /** * Fill map. @@ -754,32 +860,33 @@ public class ConvertToDataValueObjectModel { Object value = document.get(key); String keyLower = key.toLowerCase(); - + /* - ObjectMapper objectMapper = new ObjectMapper(); - JavaTimeModule javaTimeModule = new JavaTimeModule(); - javaTimeModule.addDeserializer(LocalDateTime.class, new ParseDeserializer()); -// javaTimeModule.addSerializer(LocalDate.class, new MyLocalDateSerializer()); - objectMapper.registerModule(javaTimeModule); + * ObjectMapper objectMapper = new ObjectMapper(); JavaTimeModule javaTimeModule + * = new JavaTimeModule(); javaTimeModule.addDeserializer(LocalDateTime.class, + * new ParseDeserializer()); // javaTimeModule.addSerializer(LocalDate.class, + * new MyLocalDateSerializer()); objectMapper.registerModule(javaTimeModule); + * + * objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + * objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, + * false); objectMapper.configure(SerializationFeature. + * WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, false); + */ - objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); - objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); - objectMapper.configure(SerializationFeature.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) { if (keyLower.contains(possibleDate)) { try { - LOG.debug("value "+value+" is instance of: "+value.getClass()); + LOG.debug("value " + value + " is instance of: " + value.getClass()); Document documentDate = new Document((Map) value); String jsonValue = documentDate.toJson(); - LOG.debug("jsonValue "+value); - - //LocalDate asDate = objectMapper.readerFor(LocalDate.class).readValue(jsonValue); - - LocalDateTime asDate = org.gcube.application.geoportal.client.utils.Serialization.read(jsonValue, LocalDateTime.class); + LOG.debug("jsonValue " + value); + + // LocalDate asDate = + // objectMapper.readerFor(LocalDate.class).readValue(jsonValue); + + LocalDateTime asDate = org.gcube.application.geoportal.client.utils.Serialization.read(jsonValue, + LocalDateTime.class); LOG.info("Casted as date: " + asDate); value = asDate; break; @@ -788,19 +895,33 @@ public class ConvertToDataValueObjectModel { } } } - + documentAsMap.put(key, value); return documentAsMap; } - - public class LocalDateDeserializer extends JsonDeserializer { - @Override - public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { - return LocalDate.parse(p.getValueAsString()); - } - } + /** + * The Class LocalDateDeserializer. + * + * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it + * + * Sep 9, 2022 + */ + public class LocalDateDeserializer extends JsonDeserializer { + /** + * Deserialize. + * + * @param p the p + * @param ctxt the ctxt + * @return the local date + * @throws IOException Signals that an I/O exception has occurred. + */ + @Override + public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return LocalDate.parse(p.getValueAsString()); + } + } /** * To relationship DV. @@ -835,10 +956,10 @@ public class ConvertToDataValueObjectModel { liDV.setPhase(li.getPhase()); liDV.setErrorMessages(li.getErrorMessages()); liDV.setLastInvokedStep(li.getLastInvokedStep()); - - if(li.getLastEvent()!=null) + + if (li.getLastEvent() != null) liDV.setLastEvent(li.getLastEvent().getEvent()); - + liDV.setLastOperationStatus(toLifecycleInformationDVStatus(li.getLastOperationStatus())); liDV.setWarningMessages(li.getWarningMessages()); liDV.setAsJSONString(toJSON(li)); diff --git a/src/main/java/org/gcube/application/geoportalcommon/geoportal/ProjectsCaller.java b/src/main/java/org/gcube/application/geoportalcommon/geoportal/ProjectsCaller.java index 9630984..9e6eb13 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/geoportal/ProjectsCaller.java +++ b/src/main/java/org/gcube/application/geoportalcommon/geoportal/ProjectsCaller.java @@ -360,9 +360,9 @@ public class ProjectsCaller { for (ItemFieldDV itemField : orderByFields) { if (itemField.getJsonFields() != null) { - for (String field : itemField.getJsonFields()) { - String fieldFullPath = String.format("%s.%s", itemField.getProjection(), field); - orderingFields.add(fieldFullPath); + for (String jsonFieldPath : itemField.getJsonFields()) { + //String fieldFullPath = String.format("%s.%s", itemField.getProjection(), field); + orderingFields.add(jsonFieldPath); } } diff --git a/src/main/java/org/gcube/application/geoportalcommon/geoportal/config/ActionDefinition.java b/src/main/java/org/gcube/application/geoportalcommon/geoportal/config/ActionDefinition.java new file mode 100644 index 0000000..b401fb1 --- /dev/null +++ b/src/main/java/org/gcube/application/geoportalcommon/geoportal/config/ActionDefinition.java @@ -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() { + + } + +} diff --git a/src/main/java/org/gcube/application/geoportalcommon/geoportal/config/HandlerGcubeProfile.java b/src/main/java/org/gcube/application/geoportalcommon/geoportal/config/HandlerGcubeProfile.java deleted file mode 100644 index bb2671b..0000000 --- a/src/main/java/org/gcube/application/geoportalcommon/geoportal/config/HandlerGcubeProfile.java +++ /dev/null @@ -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 listFilePaths; -// -// -// -//} diff --git a/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/config/ActionDefinitionDV.java b/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/config/ActionDefinitionDV.java new file mode 100644 index 0000000..06a8a63 --- /dev/null +++ b/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/config/ActionDefinitionDV.java @@ -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(); + } + +} diff --git a/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/config/ItemFieldDV.java b/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/config/ItemFieldDV.java index 93750e6..ba6e3a9 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/config/ItemFieldDV.java +++ b/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/config/ItemFieldDV.java @@ -25,9 +25,6 @@ public class ItemFieldDV implements GeoportalConfigurationID, Serializable { private String configID; - // This is the prefix of the document projection, e.g. _theDocument - private String projection = "_theDocument"; - /** * Instantiates a new item field. */ @@ -175,15 +172,6 @@ public class ItemFieldDV implements GeoportalConfigurationID, Serializable { 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 public String toString() { StringBuilder builder = new StringBuilder(); @@ -201,8 +189,6 @@ public class ItemFieldDV implements GeoportalConfigurationID, Serializable { builder.append(searchable); builder.append(", configID="); builder.append(configID); - builder.append(", projection="); - builder.append(projection); builder.append("]"); return builder.toString(); } diff --git a/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/ucd/GEOPORTAL_CONFIGURATION_TYPE.java b/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/ucd/GEOPORTAL_CONFIGURATION_TYPE.java index 024e1b0..0fb7a52 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/ucd/GEOPORTAL_CONFIGURATION_TYPE.java +++ b/src/main/java/org/gcube/application/geoportalcommon/shared/geoportal/ucd/GEOPORTAL_CONFIGURATION_TYPE.java @@ -1,7 +1,7 @@ package org.gcube.application.geoportalcommon.shared.geoportal.ucd; public enum GEOPORTAL_CONFIGURATION_TYPE { - item_fields("itemFields"), gcube_profiles("gcubeProfiles"); + item_fields("itemFields"), gcube_profiles("gcubeProfiles"), actions_definition("actionsDefinition"); String id;