Item.update() now re-indexes the item - update() now accordingly throws

an IOException, which had to be propogated...


git-svn-id: http://scm.dspace.org/svn/repo/trunk@704 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
David Stuve
2003-10-20 18:49:28 +00:00
parent 12dbc32a8a
commit ad90d7fd81
6 changed files with 11 additions and 11 deletions

View File

@@ -2040,7 +2040,7 @@ public class SubmitServlet extends DSpaceServlet
* @param step the step the user has just reached
*/
private void userHasReached(SubmissionInfo subInfo, int step)
throws SQLException, AuthorizeException
throws SQLException, AuthorizeException, IOException
{
if (!isWorkflow(subInfo))
{

View File

@@ -74,7 +74,7 @@ public interface InProgressSubmission
* Update the submission, including the unarchived item.
*/
void update()
throws SQLException, AuthorizeException;
throws SQLException, IOException, AuthorizeException;
/**

View File

@@ -265,7 +265,7 @@ public class Item extends DSpaceObject
* @return the newly created item
*/
static Item create(Context context)
throws SQLException, AuthorizeException
throws SQLException, AuthorizeException, IOException
{
TableRow row = DatabaseManager.create(context, "item");
Item i = new Item(context, row);
@@ -1015,7 +1015,7 @@ public class Item extends DSpaceObject
* database
*/
public void update()
throws SQLException, AuthorizeException
throws SQLException, AuthorizeException, IOException
{
// Check authorisation
AuthorizeManager.authorizeAction(ourContext, this, Constants.WRITE);
@@ -1126,11 +1126,11 @@ public class Item extends DSpaceObject
if (isArchived())
{
// FIXME: Update search index
// Update search index
DSIndexer.reIndexContent(ourContext, this);
}
}
/**
* Withdraw the item from the archive. It is kept in place, and the
* content and metadata are not deleted, but it is not publicly

View File

@@ -171,7 +171,7 @@ public class WorkspaceItem implements InProgressSubmission
public static WorkspaceItem create(Context c,
Collection coll,
boolean template)
throws AuthorizeException, SQLException
throws AuthorizeException, SQLException, IOException
{
// Check the user has permission to ADD to the collection
AuthorizeManager.authorizeAction(c, coll, Constants.ADD);
@@ -403,7 +403,7 @@ public class WorkspaceItem implements InProgressSubmission
* Update the workspace item, including the unarchived item.
*/
public void update()
throws SQLException, AuthorizeException
throws SQLException, AuthorizeException, IOException
{
// Authorisation is checked by the item.update() method below

View File

@@ -336,7 +336,7 @@ public class WorkflowItem implements InProgressSubmission
* Update the workflow item, including the unarchived item.
*/
public void update()
throws SQLException, AuthorizeException
throws SQLException, IOException, AuthorizeException
{
// FIXME check auth

View File

@@ -965,7 +965,7 @@ public class WorkflowManager
// Record approval provenance statement
private static void recordApproval(Context c,WorkflowItem wi,
EPerson e)
throws SQLException, AuthorizeException
throws SQLException, IOException, AuthorizeException
{
Item item = wi.getItem();
@@ -990,7 +990,7 @@ public class WorkflowManager
// Create workflow start provenance message
private static void recordStart(Context c, Item myitem)
throws SQLException, AuthorizeException
throws SQLException, IOException, AuthorizeException
{
// Get non-internal format bitstreams
Bitstream[] bitstreams = myitem.getNonInternalBitstreams();