Package org.dspace.versioning
Class VersionHistoryServiceImpl
- java.lang.Object
-
- org.dspace.versioning.VersionHistoryServiceImpl
-
- All Implemented Interfaces:
DSpaceCRUDService<VersionHistory>,VersionHistoryService
public class VersionHistoryServiceImpl extends Object implements VersionHistoryService
- 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)
-
-
Field Summary
Fields Modifier and Type Field Description protected VersionHistoryDAOversionHistoryDAO
-
Constructor Summary
Constructors Modifier Constructor Description protectedVersionHistoryServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Context context, VersionHistory versionHistory, Version version)VersionHistorycreate(Context context)voiddelete(Context context, VersionHistory versionHistory)VersionHistoryfind(Context context, int id)VersionHistoryfindByItem(Context context, Item item)VersiongetFirstVersion(Context context, VersionHistory versionHistory)VersiongetLatestVersion(Context context, VersionHistory versionHistory)VersiongetNext(Context c, VersionHistory versionHistory, Version version)VersiongetPrevious(Context context, VersionHistory versionHistory, Version version)VersiongetVersion(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)voidupdate(Context context, List<VersionHistory> versionHistories)voidupdate(Context context, VersionHistory versionHistory)
-
-
-
Field Detail
-
versionHistoryDAO
@Autowired(required=true) protected VersionHistoryDAO versionHistoryDAO
-
-
Method Detail
-
create
public VersionHistory create(Context context) throws SQLException
- Specified by:
createin interfaceDSpaceCRUDService<VersionHistory>- Throws:
SQLException
-
find
public VersionHistory find(Context context, int id) throws SQLException
- Specified by:
findin interfaceDSpaceCRUDService<VersionHistory>- Throws:
SQLException
-
update
public void update(Context context, VersionHistory versionHistory) throws SQLException, AuthorizeException
- Specified by:
updatein interfaceDSpaceCRUDService<VersionHistory>- Throws:
SQLExceptionAuthorizeException
-
update
public void update(Context context, List<VersionHistory> versionHistories) throws SQLException, AuthorizeException
- Specified by:
updatein interfaceDSpaceCRUDService<VersionHistory>- Throws:
SQLExceptionAuthorizeException
-
delete
public void delete(Context context, VersionHistory versionHistory) throws SQLException, AuthorizeException
- Specified by:
deletein interfaceDSpaceCRUDService<VersionHistory>- Throws:
SQLExceptionAuthorizeException
-
getPrevious
public Version getPrevious(Context context, VersionHistory versionHistory, Version version) throws SQLException
- Specified by:
getPreviousin interfaceVersionHistoryService- Throws:
SQLException
-
getNext
public Version getNext(Context c, VersionHistory versionHistory, Version version) throws SQLException
- Specified by:
getNextin interfaceVersionHistoryService- Throws:
SQLException
-
getVersion
public Version getVersion(Context context, VersionHistory versionHistory, Item item) throws SQLException
- Specified by:
getVersionin interfaceVersionHistoryService- Throws:
SQLException
-
hasNext
public boolean hasNext(Context context, VersionHistory versionHistory, Item item) throws SQLException
- Specified by:
hasNextin interfaceVersionHistoryService- Throws:
SQLException
-
hasNext
public boolean hasNext(Context context, VersionHistory versionHistory, Version version) throws SQLException
- Specified by:
hasNextin interfaceVersionHistoryService- Throws:
SQLException
-
hasVersionHistory
public boolean hasVersionHistory(Context context, Item item) throws SQLException
- Specified by:
hasVersionHistoryin interfaceVersionHistoryService- Throws:
SQLException
-
add
public void add(Context context, VersionHistory versionHistory, Version version) throws SQLException
- Specified by:
addin interfaceVersionHistoryService- Throws:
SQLException
-
getLatestVersion
public Version getLatestVersion(Context context, VersionHistory versionHistory) throws SQLException
- Specified by:
getLatestVersionin interfaceVersionHistoryService- Throws:
SQLException
-
getFirstVersion
public Version getFirstVersion(Context context, VersionHistory versionHistory) throws SQLException
- Specified by:
getFirstVersionin interfaceVersionHistoryService- Throws:
SQLException
-
isFirstVersion
public boolean isFirstVersion(Context context, Item item) throws SQLException
- Specified by:
isFirstVersionin interfaceVersionHistoryService- Throws:
SQLException
-
isFirstVersion
public boolean isFirstVersion(Context context, VersionHistory versionHistory, Version version) throws SQLException
- Specified by:
isFirstVersionin interfaceVersionHistoryService- Throws:
SQLException
-
isLastVersion
public boolean isLastVersion(Context context, Item item) throws SQLException
- Specified by:
isLastVersionin interfaceVersionHistoryService- Throws:
SQLException
-
isLastVersion
public boolean isLastVersion(Context context, VersionHistory versionHistory, Version version) throws SQLException
- Specified by:
isLastVersionin interfaceVersionHistoryService- Throws:
SQLException
-
remove
public void remove(VersionHistory versionHistory, Version version)
- Specified by:
removein interfaceVersionHistoryService
-
findByItem
public VersionHistory findByItem(Context context, Item item) throws SQLException
- Specified by:
findByItemin interfaceVersionHistoryService- Throws:
SQLException
-
-