Rename ItemImport methods to indicate which version it is

This commit is contained in:
Peter Dietz
2014-10-21 00:40:47 -04:00
parent cdaba26cc2
commit 7051650e16
2 changed files with 7 additions and 9 deletions

View File

@@ -2124,7 +2124,7 @@ public class ItemImport
* @param context The context
* @throws Exception
*/
public static void processUIImport(File file, Collection owningCollection, String[] collections, String resumeDir,
public static void processBTEUIImport(File file, Collection owningCollection, String[] collections, String resumeDir,
String bteInputType, Context context) throws Exception
{
final EPerson eperson = context.getCurrentUser();
@@ -2273,7 +2273,7 @@ public class ItemImport
* @param context The context
* @throws Exception
*/
public static void processUIImport(String url, Collection owningCollection, String[] collections, String resumeDir, Context context) throws Exception
public static void processSAFUIImport(String url, Collection owningCollection, String[] collections, String resumeDir, Context context) throws Exception
{
final EPerson eperson = context.getCurrentUser();
final String[] otherCollections2 = collections;

View File

@@ -19,7 +19,6 @@ import java.util.ResourceBundle;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.jstl.fmt.LocaleSupport;
import org.apache.commons.fileupload.FileUploadBase.FileSizeLimitExceededException;
import org.apache.commons.lang3.StringUtils;
@@ -32,7 +31,6 @@ import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.core.*;
import org.dspace.utils.DSpace;
import org.elasticsearch.common.collect.Lists;
/**
* Servlet to batch import metadata via the BTE
@@ -186,18 +184,18 @@ public class BatchImportServlet extends DSpaceServlet
//Decide if it is a new upload or a resume one!
if (uploadId != null){ //resume upload
if (f==null){
ItemImport.processUIImport(zipurl, owningCollection, reqCollections, uploadId, context);
ItemImport.processSAFUIImport(zipurl, owningCollection, reqCollections, uploadId, context);
}
else {
ItemImport.processUIImport(f, owningCollection, reqCollections, uploadId, inputType, context);
ItemImport.processBTEUIImport(f, owningCollection, reqCollections, uploadId, inputType, context);
}
}
else { //New upload
if (f==null){
ItemImport.processUIImport(zipurl, owningCollection, reqCollections, null, context);
ItemImport.processSAFUIImport(zipurl, owningCollection, reqCollections, null, context);
}
else {
ItemImport.processUIImport(f, owningCollection, reqCollections, null, inputType, context);
ItemImport.processBTEUIImport(f, owningCollection, reqCollections, null, inputType, context);
}
}