mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[CST-12108] minor refactoring
This commit is contained in:
@@ -31,7 +31,7 @@ public class QAEvent {
|
||||
public static final String DISCARDED = "discarded";
|
||||
|
||||
public static final String OPENAIRE_SOURCE = "openaire";
|
||||
public static final String INTERNAL_ITEM_SOURCE = "internal-item";
|
||||
public static final String DSPACE_USERS_SOURCE = "DSpaceUsers";
|
||||
|
||||
private String source;
|
||||
|
||||
@@ -197,7 +197,7 @@ public class QAEvent {
|
||||
switch (getSource()) {
|
||||
case OPENAIRE_SOURCE:
|
||||
return OpenaireMessageDTO.class;
|
||||
case INTERNAL_ITEM_SOURCE:
|
||||
case DSPACE_USERS_SOURCE:
|
||||
return CorrectionTypeMessageDTO.class;
|
||||
default:
|
||||
throw new IllegalArgumentException("Unknown event's source: " + getSource());
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
package org.dspace.correctiontype;
|
||||
|
||||
import static org.dspace.content.QAEvent.INTERNAL_ITEM_SOURCE;
|
||||
import static org.dspace.content.QAEvent.DSPACE_USERS_SOURCE;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.Date;
|
||||
@@ -57,8 +57,8 @@ public class ReinstateCorrectionType implements CorrectionType, InitializingBean
|
||||
@Override
|
||||
public QAEvent createCorrection(Context context, Item targetItem, QAMessageDTO reason) {
|
||||
CorrectionTypeMessageDTO mesasge = (CorrectionTypeMessageDTO) reason;
|
||||
QAEvent qaEvent = new QAEvent(INTERNAL_ITEM_SOURCE,
|
||||
"handle:" + targetItem.getHandle(),
|
||||
QAEvent qaEvent = new QAEvent(DSPACE_USERS_SOURCE,
|
||||
context.getCurrentUser().getID().toString(),
|
||||
targetItem.getID().toString(),
|
||||
targetItem.getName(),
|
||||
this.getTopic(),
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
package org.dspace.correctiontype;
|
||||
|
||||
import static org.dspace.content.QAEvent.INTERNAL_ITEM_SOURCE;
|
||||
import static org.dspace.content.QAEvent.DSPACE_USERS_SOURCE;
|
||||
import static org.dspace.core.Constants.READ;
|
||||
|
||||
import java.sql.SQLException;
|
||||
@@ -51,8 +51,8 @@ public class WithdrawnCorrectionType implements CorrectionType, InitializingBean
|
||||
@Override
|
||||
public QAEvent createCorrection(Context context, Item targetItem, QAMessageDTO reason) {
|
||||
CorrectionTypeMessageDTO mesasge = (CorrectionTypeMessageDTO) reason;
|
||||
QAEvent qaEvent = new QAEvent(INTERNAL_ITEM_SOURCE,
|
||||
"handle:" + targetItem.getHandle(),
|
||||
QAEvent qaEvent = new QAEvent(DSPACE_USERS_SOURCE,
|
||||
context.getCurrentUser().getID().toString(),
|
||||
targetItem.getID().toString(),
|
||||
targetItem.getName(),
|
||||
this.getTopic(), 1.0,
|
||||
|
@@ -1086,7 +1086,7 @@ webui.preview.brand.fontpoint = 12
|
||||
# ItemCountDAO.class = org.dspace.browse.ItemCountDAOSolr
|
||||
|
||||
###### QAEvent source Configuration ######
|
||||
qaevent.sources = openaire, internal-item
|
||||
qaevent.sources = openaire, DSpaceUsers
|
||||
|
||||
###### Browse Configuration ######
|
||||
#
|
||||
|
Reference in New Issue
Block a user