mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-12 12:33:18 +00:00
[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:
@@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user