mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
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:
@@ -2040,7 +2040,7 @@ public class SubmitServlet extends DSpaceServlet
|
|||||||
* @param step the step the user has just reached
|
* @param step the step the user has just reached
|
||||||
*/
|
*/
|
||||||
private void userHasReached(SubmissionInfo subInfo, int step)
|
private void userHasReached(SubmissionInfo subInfo, int step)
|
||||||
throws SQLException, AuthorizeException
|
throws SQLException, AuthorizeException, IOException
|
||||||
{
|
{
|
||||||
if (!isWorkflow(subInfo))
|
if (!isWorkflow(subInfo))
|
||||||
{
|
{
|
||||||
|
@@ -74,7 +74,7 @@ public interface InProgressSubmission
|
|||||||
* Update the submission, including the unarchived item.
|
* Update the submission, including the unarchived item.
|
||||||
*/
|
*/
|
||||||
void update()
|
void update()
|
||||||
throws SQLException, AuthorizeException;
|
throws SQLException, IOException, AuthorizeException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -265,7 +265,7 @@ public class Item extends DSpaceObject
|
|||||||
* @return the newly created item
|
* @return the newly created item
|
||||||
*/
|
*/
|
||||||
static Item create(Context context)
|
static Item create(Context context)
|
||||||
throws SQLException, AuthorizeException
|
throws SQLException, AuthorizeException, IOException
|
||||||
{
|
{
|
||||||
TableRow row = DatabaseManager.create(context, "item");
|
TableRow row = DatabaseManager.create(context, "item");
|
||||||
Item i = new Item(context, row);
|
Item i = new Item(context, row);
|
||||||
@@ -1015,7 +1015,7 @@ public class Item extends DSpaceObject
|
|||||||
* database
|
* database
|
||||||
*/
|
*/
|
||||||
public void update()
|
public void update()
|
||||||
throws SQLException, AuthorizeException
|
throws SQLException, AuthorizeException, IOException
|
||||||
{
|
{
|
||||||
// Check authorisation
|
// Check authorisation
|
||||||
AuthorizeManager.authorizeAction(ourContext, this, Constants.WRITE);
|
AuthorizeManager.authorizeAction(ourContext, this, Constants.WRITE);
|
||||||
@@ -1126,11 +1126,11 @@ public class Item extends DSpaceObject
|
|||||||
|
|
||||||
if (isArchived())
|
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
|
* Withdraw the item from the archive. It is kept in place, and the
|
||||||
* content and metadata are not deleted, but it is not publicly
|
* content and metadata are not deleted, but it is not publicly
|
||||||
|
@@ -171,7 +171,7 @@ public class WorkspaceItem implements InProgressSubmission
|
|||||||
public static WorkspaceItem create(Context c,
|
public static WorkspaceItem create(Context c,
|
||||||
Collection coll,
|
Collection coll,
|
||||||
boolean template)
|
boolean template)
|
||||||
throws AuthorizeException, SQLException
|
throws AuthorizeException, SQLException, IOException
|
||||||
{
|
{
|
||||||
// Check the user has permission to ADD to the collection
|
// Check the user has permission to ADD to the collection
|
||||||
AuthorizeManager.authorizeAction(c, coll, Constants.ADD);
|
AuthorizeManager.authorizeAction(c, coll, Constants.ADD);
|
||||||
@@ -403,7 +403,7 @@ public class WorkspaceItem implements InProgressSubmission
|
|||||||
* Update the workspace item, including the unarchived item.
|
* Update the workspace item, including the unarchived item.
|
||||||
*/
|
*/
|
||||||
public void update()
|
public void update()
|
||||||
throws SQLException, AuthorizeException
|
throws SQLException, AuthorizeException, IOException
|
||||||
{
|
{
|
||||||
// Authorisation is checked by the item.update() method below
|
// Authorisation is checked by the item.update() method below
|
||||||
|
|
||||||
|
@@ -336,7 +336,7 @@ public class WorkflowItem implements InProgressSubmission
|
|||||||
* Update the workflow item, including the unarchived item.
|
* Update the workflow item, including the unarchived item.
|
||||||
*/
|
*/
|
||||||
public void update()
|
public void update()
|
||||||
throws SQLException, AuthorizeException
|
throws SQLException, IOException, AuthorizeException
|
||||||
{
|
{
|
||||||
// FIXME check auth
|
// FIXME check auth
|
||||||
|
|
||||||
|
@@ -965,7 +965,7 @@ public class WorkflowManager
|
|||||||
// Record approval provenance statement
|
// Record approval provenance statement
|
||||||
private static void recordApproval(Context c,WorkflowItem wi,
|
private static void recordApproval(Context c,WorkflowItem wi,
|
||||||
EPerson e)
|
EPerson e)
|
||||||
throws SQLException, AuthorizeException
|
throws SQLException, IOException, AuthorizeException
|
||||||
{
|
{
|
||||||
Item item = wi.getItem();
|
Item item = wi.getItem();
|
||||||
|
|
||||||
@@ -990,7 +990,7 @@ public class WorkflowManager
|
|||||||
|
|
||||||
// Create workflow start provenance message
|
// Create workflow start provenance message
|
||||||
private static void recordStart(Context c, Item myitem)
|
private static void recordStart(Context c, Item myitem)
|
||||||
throws SQLException, AuthorizeException
|
throws SQLException, IOException, AuthorizeException
|
||||||
{
|
{
|
||||||
// Get non-internal format bitstreams
|
// Get non-internal format bitstreams
|
||||||
Bitstream[] bitstreams = myitem.getNonInternalBitstreams();
|
Bitstream[] bitstreams = myitem.getNonInternalBitstreams();
|
||||||
|
Reference in New Issue
Block a user