org.dspace.app.xmlui.aspect.versioning
Class VersionManager

java.lang.Object
  extended by org.dspace.app.xmlui.aspect.versioning.VersionManager

public class VersionManager
extends Object

Author:
Fabio Bolognesi (fabio at atmire dot com), Mark Diggory (markd at atmire dot com), Ben Bosman (ben at atmire dot com)

Constructor Summary
VersionManager()
           
 
Method Summary
static FlowResult processCreateNewVersion(Context context, int itemID, String summary)
          Create a new version of the specified item
static FlowResult processDeleteVersions(Context context, int itemId, String[] versionIDs)
          Delete version(s)
static FlowResult processRestoreVersion(Context context, int versionID, String summary)
          Restore a version
static FlowResult processUpdateVersion(Context context, int itemID, String summary)
          Modify latest version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionManager

public VersionManager()
Method Detail

processCreateNewVersion

public static FlowResult processCreateNewVersion(Context context,
                                                 int itemID,
                                                 String summary)
                                          throws SQLException,
                                                 AuthorizeException,
                                                 IOException
Create a new version of the specified item

Parameters:
context - The DSpace context
itemID - The id of the to-be-versioned item
Returns:
A result object
Throws:
SQLException
AuthorizeException
IOException

processUpdateVersion

public static FlowResult processUpdateVersion(Context context,
                                              int itemID,
                                              String summary)
                                       throws SQLException,
                                              AuthorizeException,
                                              IOException
Modify latest version

Parameters:
context - The DSpace context
itemID - The id of the to-be-versioned item
Returns:
A result object
Throws:
SQLException
AuthorizeException
IOException

processRestoreVersion

public static FlowResult processRestoreVersion(Context context,
                                               int versionID,
                                               String summary)
                                        throws SQLException,
                                               AuthorizeException,
                                               IOException
Restore a version

Parameters:
versionID - id of the version to restore
context - The DSpace context
Returns:
A result object
Throws:
SQLException
AuthorizeException
IOException

processDeleteVersions

public static FlowResult processDeleteVersions(Context context,
                                               int itemId,
                                               String[] versionIDs)
                                        throws SQLException,
                                               AuthorizeException,
                                               IOException,
                                               UIException
Delete version(s)

Parameters:
context - The DSpace context
versionIDs - list of versionIDs to delete
Returns:
A result object
Throws:
SQLException
AuthorizeException
IOException
UIException


Copyright © 2012 DuraSpace. All Rights Reserved.