[DS-388] Item importer - new option to enable workflow notification emails

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4563 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Stuart Lewis
2009-11-21 03:01:30 +00:00
parent 33b9fa0e43
commit 4efbd22a5a
2 changed files with 18 additions and 1 deletions

View File

@@ -100,6 +100,8 @@ public class ItemImport
{
static boolean useWorkflow = false;
static boolean useWorkflowSendEmail = false;
static boolean isTest = false;
static boolean isResume = false;
@@ -148,6 +150,8 @@ public class ItemImport
"email of eperson doing importing");
options.addOption("w", "workflow", false,
"send submission through collection's workflow");
options.addOption("n", "notification", false,
"if sending submissions through the workflow, send notification emails");
options.addOption("t", "test", false,
"test run - do not actually import items");
options.addOption("p", "template", false, "apply template");
@@ -201,6 +205,10 @@ public class ItemImport
if (line.hasOption('w'))
{
useWorkflow = true;
if (line.hasOption('n'))
{
useWorkflowSendEmail = true;
}
}
if (line.hasOption('t'))
@@ -739,8 +747,16 @@ public class ItemImport
// don't process handle file
// start up a workflow
if (!isTest)
{
// Should we send a workflow alert email or not?
if (useWorkflowSendEmail)
{
WorkflowManager.start(c, wi);
}
else
{
WorkflowManager.startWithoutNotify(c, wi);
}
// send ID to the mapfile
mapOutput = itemname + " " + myitem.getID();

View File

@@ -61,6 +61,7 @@
- [DS-328] SWORD service documents do not include atom:generator element
- [DS-333] Adjust SWORD ingest crosswalk to store bibliographic citation
- [DS-372] New verbose option for [dspace]/bin/dspace cleanup script
- [DS-388] Item importer - new option to enable workflow notification emails
(Larry Stone)
- [DS-373] Fix "Letter" link URLs in 2nd-stage Browse