[DS-102] Submission without file possible with the skip upload functionality disabled

[DS-103] Use of the Progress bar button don't save the current page modification
[DS-104] Cancel/save button during edit of a workflow item doesn't work

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3625 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Andrea Bollini
2009-03-23 11:18:53 +00:00
parent e4a8bfff87
commit ef01a162c6
8 changed files with 280 additions and 128 deletions

View File

@@ -2164,6 +2164,35 @@ public class Item extends DSpaceObject
}
}
/**
* Check the bundle ORIGINAL to see if there are any uploaded files
*
* @param item
* @return true if there is a bundle named ORIGINAL with one or more
* bitstreams inside
* @throws SQLException
*/
public boolean hasUploadedFiles() throws SQLException
{
Bundle[] bundles = getBundles("ORIGINAL");
if (bundles.length == 0)
{
// if no ORIGINAL bundle,
// return false that there is no file!
return false;
}
else
{
Bitstream[] bitstreams = bundles[0].getBitstreams();
if (bitstreams.length == 0)
{
// no files in ORIGINAL bundle!
return false;
}
}
return true;
}
/**
* Get the collections this item is not in.
*