mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 23:13:10 +00:00
[CST-12401] Allow to configure which patterns can be requested by multiple services during the submission
This commit is contained in:
@@ -21,13 +21,13 @@ public class COARNotifyConfigurationService {
|
||||
* Mapping the submission step process identifier with the configuration
|
||||
* (see configuration at coar-notify.xml)
|
||||
*/
|
||||
private Map<String, List<String>> patterns;
|
||||
private Map<String, List<LDNPattern>> patterns;
|
||||
|
||||
public Map<String, List<String>> getPatterns() {
|
||||
public Map<String, List<LDNPattern>> getPatterns() {
|
||||
return patterns;
|
||||
}
|
||||
|
||||
public void setPatterns(Map<String, List<String>> patterns) {
|
||||
public void setPatterns(Map<String, List<LDNPattern>> patterns) {
|
||||
this.patterns = patterns;
|
||||
}
|
||||
|
||||
|
@@ -26,13 +26,13 @@ public class COARNotifySubmissionConfiguration {
|
||||
* the map values of configured bean of COARNotifyConfigurationService
|
||||
* in coar-notify.xml
|
||||
*/
|
||||
private List<String> patterns;
|
||||
private List<LDNPattern> patterns;
|
||||
|
||||
public COARNotifySubmissionConfiguration() {
|
||||
|
||||
}
|
||||
|
||||
public COARNotifySubmissionConfiguration(String id, List<String> patterns) {
|
||||
public COARNotifySubmissionConfiguration(String id, List<LDNPattern> patterns) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.patterns = patterns;
|
||||
@@ -51,7 +51,7 @@ public class COARNotifySubmissionConfiguration {
|
||||
*
|
||||
* @return the list of configured COAR Notify Patterns
|
||||
*/
|
||||
public List<String> getPatterns() {
|
||||
public List<LDNPattern> getPatterns() {
|
||||
return patterns;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class COARNotifySubmissionConfiguration {
|
||||
* Sets the list of configured COAR Notify Patterns
|
||||
* @param patterns
|
||||
*/
|
||||
public void setPatterns(final List<String> patterns) {
|
||||
public void setPatterns(final List<LDNPattern> patterns) {
|
||||
this.patterns = patterns;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* 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.coarnotify;
|
||||
|
||||
/**
|
||||
* A collection of configured patterns to be met when adding COAR Notify services.
|
||||
*
|
||||
* @author Mohamed Eskander (mohamed.eskander at 4science.com)
|
||||
*/
|
||||
public class LDNPattern {
|
||||
|
||||
private String pattern;
|
||||
private boolean multipleRequest;
|
||||
|
||||
public LDNPattern() {
|
||||
|
||||
}
|
||||
|
||||
public LDNPattern(String pattern, boolean multipleRequest) {
|
||||
this.pattern = pattern;
|
||||
this.multipleRequest = multipleRequest;
|
||||
}
|
||||
|
||||
public String getPattern() {
|
||||
return pattern;
|
||||
}
|
||||
|
||||
public void setPattern(String pattern) {
|
||||
this.pattern = pattern;
|
||||
}
|
||||
|
||||
public boolean isMultipleRequest() {
|
||||
return multipleRequest;
|
||||
}
|
||||
|
||||
public void setMultipleRequest(boolean multipleRequest) {
|
||||
this.multipleRequest = multipleRequest;
|
||||
}
|
||||
}
|
@@ -29,7 +29,7 @@ public class SubmissionCOARNotifyServiceImpl implements SubmissionCOARNotifyServ
|
||||
|
||||
@Override
|
||||
public COARNotifySubmissionConfiguration findOne(String id) {
|
||||
List<String> patterns =
|
||||
List<LDNPattern> patterns =
|
||||
coarNotifyConfigurationService.getPatterns().get(id);
|
||||
|
||||
if (patterns == null) {
|
||||
|
Reference in New Issue
Block a user