Package org.dspace.versioning.service
Interface VersionHistoryService
- All Superinterfaces:
DSpaceCRUDService<VersionHistory>
- All Known Implementing Classes:
VersionHistoryServiceImpl
- Author:
- Fabio Bolognesi (fabio at atmire dot com), Mark Diggory (markd at atmire dot com), Ben Bosman (ben at atmire dot com), Pascal-Nicolas Becker (dspace at pascal dash becker dot de)
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Context context, VersionHistory versionHistory, Version version) booleancanSeeDraftVersion(Context context, VersionHistory versionHistory) This method has a scope to verify if the logged user has permission to see the attribute 'draftVersion' of the latest version.findByItem(Context context, Item item) getFirstVersion(Context context, VersionHistory versionHistory) getLatestVersion(Context context, VersionHistory versionHistory) getNext(Context context, VersionHistory versionHistory, Version version) getPrevious(Context context, VersionHistory versionHistory, Version version) getVersion(Context context, VersionHistory versionHistory, Item item) booleanhasNext(Context context, VersionHistory versionHistory, Item item) booleanhasNext(Context context, VersionHistory versionHistory, Version version) booleanhasVersionHistory(Context context, Item item) booleanisFirstVersion(Context context, Item item) booleanisFirstVersion(Context context, VersionHistory versionHistory, Version version) booleanisLastVersion(Context context, Item item) booleanisLastVersion(Context context, VersionHistory versionHistory, Version version) voidremove(VersionHistory versionHistory, Version version)
-
Method Details
-
add
- Throws:
SQLException
-
findByItem
- Throws:
SQLException
-
getFirstVersion
- Throws:
SQLException
-
getLatestVersion
- Throws:
SQLException
-
getNext
Version getNext(Context context, VersionHistory versionHistory, Version version) throws SQLException - Throws:
SQLException
-
getPrevious
Version getPrevious(Context context, VersionHistory versionHistory, Version version) throws SQLException - Throws:
SQLException
-
getVersion
- Throws:
SQLException
-
hasNext
- Throws:
SQLException
-
hasNext
boolean hasNext(Context context, VersionHistory versionHistory, Version version) throws SQLException - Throws:
SQLException
-
hasVersionHistory
- Throws:
SQLException
-
isFirstVersion
- Throws:
SQLException
-
isFirstVersion
boolean isFirstVersion(Context context, VersionHistory versionHistory, Version version) throws SQLException - Throws:
SQLException
-
isLastVersion
- Throws:
SQLException
-
isLastVersion
boolean isLastVersion(Context context, VersionHistory versionHistory, Version version) throws SQLException - Throws:
SQLException
-
remove
-
canSeeDraftVersion
This method has a scope to verify if the logged user has permission to see the attribute 'draftVersion' of the latest version.- Parameters:
context- DSpace context objectversionHistory- Version history object- Returns:
- return true if the logged user has permission to see the attribute 'draftVersion' of the latest version, otherwise false
- Throws:
SQLException- If database error
-