Interface VersioningService

All Known Implementing Classes:
VersioningServiceImpl

public interface VersioningService
Author:
Fabio Bolognesi (fabio at atmire dot com), Mark Diggory (markd at atmire dot com), Ben Bosman (ben at atmire dot com)
  • Method Details

    • createNewVersion

      Version createNewVersion(Context c, Item itemId)
    • createNewVersion

      Version createNewVersion(Context c, Item itemId, String summary)
    • getVersionsByHistory

      List<Version> getVersionsByHistory(Context c, VersionHistory vh) throws SQLException
      Returns all versions of a version history. To keep version numbers stable we do not delete versions, we do only set the item, date, summary and eperson null. This methods returns only those versions that have an item assigned.
      Parameters:
      c - The relevant DSpace Context.
      vh - version history
      Returns:
      All versions of a version history that have an item assigned.
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.
    • getVersionsByHistoryWithItems

      List<Version> getVersionsByHistoryWithItems(Context c, VersionHistory vh, int offset, int limit) throws SQLException
      Return a paginated list of versions of a version history. To keep version numbers stable we do not delete versions, we do only set the item, date, summary and eperson null. This methods returns only those versions that have an item assigned.
      Parameters:
      c - The relevant DSpace Context.
      vh - Version history
      offset - The position of the first result to return
      limit - Paging limit
      Throws:
      SQLException - If database error
    • delete

      void delete(Context context, Version version) throws SQLException
      Delete a Version
      Parameters:
      context - context
      version - version
      Throws:
      SQLException - if database error
    • removeVersion

      void removeVersion(Context c, Item item) throws SQLException
      Throws:
      SQLException
    • getVersion

      Version getVersion(Context c, int versionID) throws SQLException
      Throws:
      SQLException
    • restoreVersion

      Version restoreVersion(Context c, Version version)
    • restoreVersion

      Version restoreVersion(Context c, Version version, String summary)
    • updateVersion

      Version updateVersion(Context c, Item itemId, String summary) throws SQLException
      Throws:
      SQLException
    • getVersion

      Version getVersion(Context c, Item item) throws SQLException
      Throws:
      SQLException
    • createNewVersion

      Version createNewVersion(Context context, VersionHistory history, Item item, String summary, Instant date, int versionNumber)
    • update

      void update(Context context, Version version) throws SQLException
      Update the Version
      Parameters:
      context - context
      version - version
      Throws:
      SQLException - if database error
    • countVersionsByHistoryWithItem

      int countVersionsByHistoryWithItem(Context context, VersionHistory versionHistory) throws SQLException
      This method count versions of an version history that have items assigned. We do not delete versions to keep version numbers stable. To remove a version we set the item, date, summary and eperson null. This method returns only versions that aren't soft deleted and have items assigned.
      Parameters:
      context - The relevant DSpace Context.
      versionHistory - Version history
      Returns:
      Total versions of an version history that have items assigned.
      Throws:
      SQLException - If database error