[DS-3952] AbstractBuilder should know about RequestItem since there is a builder for it now.

This commit is contained in:
Mark H. Wood
2018-09-28 10:35:23 -04:00
committed by Mark H. Wood
parent 1590e72f0f
commit fae1c5622d

View File

@@ -8,10 +8,14 @@
package org.dspace.builder; package org.dspace.builder;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.LinkedList;
import java.util.List; import java.util.List;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.dspace.app.requestitem.factory.RequestItemServiceFactory;
import org.dspace.app.requestitem.service.RequestItemService;
import org.dspace.authorize.AuthorizeException; import org.dspace.authorize.AuthorizeException;
import org.dspace.authorize.factory.AuthorizeServiceFactory; import org.dspace.authorize.factory.AuthorizeServiceFactory;
import org.dspace.authorize.service.AuthorizeService; import org.dspace.authorize.service.AuthorizeService;
@@ -89,6 +93,7 @@ public abstract class AbstractBuilder<T, S> {
static RelationshipTypeService relationshipTypeService; static RelationshipTypeService relationshipTypeService;
static EntityTypeService entityTypeService; static EntityTypeService entityTypeService;
static ProcessService processService; static ProcessService processService;
static RequestItemService requestItemService;
protected Context context; protected Context context;
@@ -101,7 +106,7 @@ public abstract class AbstractBuilder<T, S> {
/** /**
* log4j category * log4j category
*/ */
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(AbstractDSpaceObjectBuilder.class); private static final Logger log = LogManager.getLogger();
protected AbstractBuilder(Context context) { protected AbstractBuilder(Context context) {
this.context = context; this.context = context;
@@ -136,6 +141,7 @@ public abstract class AbstractBuilder<T, S> {
relationshipTypeService = ContentServiceFactory.getInstance().getRelationshipTypeService(); relationshipTypeService = ContentServiceFactory.getInstance().getRelationshipTypeService();
entityTypeService = ContentServiceFactory.getInstance().getEntityTypeService(); entityTypeService = ContentServiceFactory.getInstance().getEntityTypeService();
processService = ScriptServiceFactory.getInstance().getProcessService(); processService = ScriptServiceFactory.getInstance().getProcessService();
requestItemService = RequestItemServiceFactory.getInstance().getRequestItemService();
// Temporarily disabled // Temporarily disabled
claimedTaskService = XmlWorkflowServiceFactory.getInstance().getClaimedTaskService(); claimedTaskService = XmlWorkflowServiceFactory.getInstance().getClaimedTaskService();
@@ -172,7 +178,7 @@ public abstract class AbstractBuilder<T, S> {
relationshipTypeService = null; relationshipTypeService = null;
entityTypeService = null; entityTypeService = null;
processService = null; processService = null;
requestItemService = null;
} }
public static void cleanupObjects() throws Exception { public static void cleanupObjects() throws Exception {