108915: Added missing plural name to QA rest objects & updated endpoints bean declarations

This commit is contained in:
Alexandre Vryghem
2023-12-22 21:49:09 +01:00
parent e0ba438624
commit 72ae612db0
10 changed files with 26 additions and 8 deletions

View File

@@ -47,8 +47,8 @@ import org.springframework.web.bind.annotation.RestController;
* "/api/integration/qualityassuranceevents/{qaeventid}/related"
*/
@RestController
@RequestMapping("/api/" + QAEventRest.CATEGORY + "/qualityassuranceevents"
+ REGEX_REQUESTMAPPING_IDENTIFIER_AS_STRING_VERSION_STRONG + "/related")
@RequestMapping("/api/" + QAEventRest.CATEGORY + "/" + QAEventRest.PLURAL_NAME
+ REGEX_REQUESTMAPPING_IDENTIFIER_AS_STRING_VERSION_STRONG + "/" + QAEventRest.RELATED)
public class QAEventRelatedRestController {
@Autowired

View File

@@ -27,6 +27,7 @@ public class QAEventRest extends BaseObjectRest<String> {
private static final long serialVersionUID = -5001130073350654793L;
public static final String NAME = "qualityassuranceevent";
public static final String PLURAL_NAME = "qualityassuranceevents";
public static final String CATEGORY = RestAddressableModel.INTEGRATION;
public static final String TOPIC = "topic";
@@ -46,6 +47,11 @@ public class QAEventRest extends BaseObjectRest<String> {
return NAME;
}
@Override
public String getTypePlural() {
return PLURAL_NAME;
}
@Override
public String getCategory() {
return CATEGORY;

View File

@@ -22,6 +22,7 @@ public class QASourceRest extends BaseObjectRest<String> {
private static final long serialVersionUID = -7455358581579629244L;
public static final String NAME = "qualityassurancesource";
public static final String PLURAL_NAME = "qualityassurancesources";
public static final String CATEGORY = RestAddressableModel.INTEGRATION;
private String id;
@@ -33,6 +34,11 @@ public class QASourceRest extends BaseObjectRest<String> {
return NAME;
}
@Override
public String getTypePlural() {
return PLURAL_NAME;
}
@Override
public String getCategory() {
return CATEGORY;

View File

@@ -22,6 +22,7 @@ public class QATopicRest extends BaseObjectRest<String> {
private static final long serialVersionUID = -7455358581579629244L;
public static final String NAME = "qualityassurancetopic";
public static final String PLURAL_NAME = "qualityassurancetopics";
public static final String CATEGORY = RestAddressableModel.INTEGRATION;
private String id;
@@ -34,6 +35,11 @@ public class QATopicRest extends BaseObjectRest<String> {
return NAME;
}
@Override
public String getTypePlural() {
return PLURAL_NAME;
}
@Override
public String getCategory() {
return CATEGORY;

View File

@@ -32,7 +32,7 @@ import org.springframework.stereotype.Component;
* @author Andrea Bollini (andrea.bollini at 4science.it)
*
*/
@Component(QAEventRest.CATEGORY + "." + QAEventRest.NAME + "." + QAEventRest.RELATED)
@Component(QAEventRest.CATEGORY + "." + QAEventRest.PLURAL_NAME + "." + QAEventRest.RELATED)
public class QAEventRelatedLinkRepository extends AbstractDSpaceRestRepository implements LinkRestRepository {
@Autowired

View File

@@ -39,7 +39,7 @@ import org.springframework.stereotype.Component;
* @author Andrea Bollini (andrea.bollini at 4science.it)
*
*/
@Component(QAEventRest.CATEGORY + "." + QAEventRest.NAME)
@Component(QAEventRest.CATEGORY + "." + QAEventRest.PLURAL_NAME)
public class QAEventRestRepository extends DSpaceRestRepository<QAEventRest, String> {
final static String ORDER_FIELD = "trust";

View File

@@ -32,7 +32,7 @@ import org.springframework.stereotype.Component;
* @author Andrea Bollini (andrea.bollini at 4science.it)
*
*/
@Component(QAEventRest.CATEGORY + "." + QAEventRest.NAME + "." + QAEventRest.TARGET)
@Component(QAEventRest.CATEGORY + "." + QAEventRest.PLURAL_NAME + "." + QAEventRest.TARGET)
public class QAEventTargetLinkRepository extends AbstractDSpaceRestRepository implements LinkRestRepository {
@Autowired

View File

@@ -29,7 +29,7 @@ import org.springframework.stereotype.Component;
* @author Andrea Bollini (andrea.bollini at 4science.it)
*
*/
@Component(QAEventRest.CATEGORY + "." + QAEventRest.NAME + "." + QAEventRest.TOPIC)
@Component(QAEventRest.CATEGORY + "." + QAEventRest.PLURAL_NAME + "." + QAEventRest.TOPIC)
public class QAEventTopicLinkRepository extends AbstractDSpaceRestRepository implements LinkRestRepository {
@Autowired

View File

@@ -25,7 +25,7 @@ import org.springframework.stereotype.Component;
* @author Luca Giamminonni (luca.giamminonni at 4science.it)
*
*/
@Component(QASourceRest.CATEGORY + "." + QASourceRest.NAME)
@Component(QASourceRest.CATEGORY + "." + QASourceRest.PLURAL_NAME)
public class QASourceRestRepository extends DSpaceRestRepository<QASourceRest, String> {
@Autowired

View File

@@ -28,7 +28,7 @@ import org.springframework.stereotype.Component;
* @author Andrea Bollini (andrea.bollini at 4science.it)
*
*/
@Component(QATopicRest.CATEGORY + "." + QATopicRest.NAME)
@Component(QATopicRest.CATEGORY + "." + QATopicRest.PLURAL_NAME)
public class QATopicRestRepository extends DSpaceRestRepository<QATopicRest, String> {
final static String ORDER_FIELD = "topic";