Interface ContentVersionService
-
- All Known Implementing Classes:
ContentVersionServiceImpl
@ExperimentalApi public interface ContentVersionServiceContentVersionService supports find, restore and delete operations on versions of content.- Since:
- 5.10
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceContentVersionService.ParameterVersionFinderFinder interface that allows to fetchMany(PageRequest) operationstatic interfaceContentVersionService.ValidatorValidator provide validation on operations of this service.static interfaceContentVersionService.VersionFinderFinder interface that allows to fetchOne() to find A versioned content.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(ContentId contentId, int versionNumber)Delete the version of content.ContentVersionService.VersionFinderfind(Expansion... expansions)Returns a finder interface for setting search criterion for versions or content.Versionrestore(ContentId contentId, VersionRestoreParameters versionRestoreParameters, Expansion... expansions)Restore on version of content, update current content with that version then increment version number of current version.ContentVersionService.Validatorvalidator()return an instance ofContentVersionService.Validator
-
-
-
Method Detail
-
find
ContentVersionService.VersionFinder find(Expansion... expansions)
Returns a finder interface for setting search criterion for versions or content.- Parameters:
expansions-- Returns:
- VersionFinder
-
validator
ContentVersionService.Validator validator()
return an instance ofContentVersionService.Validator- Returns:
ContentVersionService.Validator
-
delete
void delete(ContentId contentId, int versionNumber)
Delete the version of content. When one version is deleted, all the versions after this version will have their version number reduced by one. e.g.: remove of version 3, will result version 4 becomes new version 3 and so on.- Parameters:
contentId- ContentIdversionNumber- version to delete
-
restore
Version restore(ContentId contentId, VersionRestoreParameters versionRestoreParameters, Expansion... expansions)
Restore on version of content, update current content with that version then increment version number of current version. e.g.: One content had 3 versions. Restore version 2 will create a new version 4, which has the same content as version 2. The number of the version to restore, comment for the restore and other options are contained in theVersionRestoreParameters- Parameters:
contentId- contentIdversionRestoreParameters- A wrapper for all parameters related to restore a version.VersionRestoreParameters.expansions- expansions array- Returns:
- The new current version with expansions
-
-