From 9de131bada0941d5ae15c4c3f6c78781d687d278 Mon Sep 17 00:00:00 2001 From: mohamed eskander Date: Tue, 16 Jan 2024 11:58:22 +0200 Subject: [PATCH] [CST-12850] refactoring --- .../QANotifyFormattedMetadataAction.java | 40 ------------------- .../action/QANotifyMetadataMapAction.java | 2 +- dspace/config/spring/api/qaevents.xml | 7 +--- 3 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 dspace-api/src/main/java/org/dspace/qaevent/action/QANotifyFormattedMetadataAction.java diff --git a/dspace-api/src/main/java/org/dspace/qaevent/action/QANotifyFormattedMetadataAction.java b/dspace-api/src/main/java/org/dspace/qaevent/action/QANotifyFormattedMetadataAction.java deleted file mode 100644 index 4c8919b958a6..000000000000 --- a/dspace-api/src/main/java/org/dspace/qaevent/action/QANotifyFormattedMetadataAction.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * The contents of this file are subject to the license and copyright - * detailed in the LICENSE and NOTICE files at the root of the source - * tree and available online at - * - * http://www.dspace.org/license/ - */ -package org.dspace.qaevent.action; - -import org.dspace.qaevent.QualityAssuranceAction; -import org.dspace.qaevent.service.dto.NotifyMessageDTO; -import org.dspace.qaevent.service.dto.QAMessageDTO; - -/** - * Implementation of {@link QualityAssuranceAction} that add a simple metadata to the given - * item. - * - * @author Francesco Bacchelli (francesco.bacchelli at 4science.it) - * - */ -public class QANotifyFormattedMetadataAction extends ASimpleMetadataAction { - - private String format; - - public String extractMetadataValue(QAMessageDTO message) { - NotifyMessageDTO mDTO = (NotifyMessageDTO) message; - String result = format.replace("[0]", mDTO.getRelationship()); - result = result.replace("[1]", mDTO.getHref()); - return result; - } - - public String getFormat() { - return format; - } - - public void setFormat(String format) { - this.format = format; - } - -} diff --git a/dspace-api/src/main/java/org/dspace/qaevent/action/QANotifyMetadataMapAction.java b/dspace-api/src/main/java/org/dspace/qaevent/action/QANotifyMetadataMapAction.java index 64c4365b3225..a85a38655081 100644 --- a/dspace-api/src/main/java/org/dspace/qaevent/action/QANotifyMetadataMapAction.java +++ b/dspace-api/src/main/java/org/dspace/qaevent/action/QANotifyMetadataMapAction.java @@ -11,7 +11,7 @@ import org.dspace.qaevent.service.dto.QAMessageDTO; /** - * Openaire Implementation {@link AMetadataMapAction} + * Notify Implementation {@link AMetadataMapAction} * * @author Francesco Bacchelli (francesco.bacchelli at 4science.it) * diff --git a/dspace/config/spring/api/qaevents.xml b/dspace/config/spring/api/qaevents.xml index 0ebc13d5b00c..b3128dd18070 100644 --- a/dspace/config/spring/api/qaevents.xml +++ b/dspace/config/spring/api/qaevents.xml @@ -44,7 +44,7 @@ - + @@ -77,10 +77,7 @@ - - - - +