Interface ItemRollbackConverter
-
- All Known Implementing Classes:
ComponentRollbackConverter
public interface ItemRollbackConverterInterface responsible for rollbacking anItemModel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.function.Predicate<ItemModel>getConstrainedBy()Predicate to verify whether current converter is applicable to providedItemModel.ItemModelrollbackItem(ItemModel itemModel, CMSVersionModel versionModel, AuditPayload auditPayload)Rollbacks the itemModel to a desired version based on the information specified in the audit payload.
-
-
-
Method Detail
-
getConstrainedBy
java.util.function.Predicate<ItemModel> getConstrainedBy()
Predicate to verify whether current converter is applicable to providedItemModel.- Returns:
- the
Predicate.
-
rollbackItem
ItemModel rollbackItem(ItemModel itemModel, CMSVersionModel versionModel, AuditPayload auditPayload) throws ItemRollbackException
Rollbacks the itemModel to a desired version based on the information specified in the audit payload.- Parameters:
itemModel- TheItemModelto rollback.versionModel- TheCMSVersionModelthat identifies the version of the item to rollback to.auditPayload- The serialized payload that specifies the information that the versioned item must contain.- Returns:
- the rollbacked
ItemModel. - Throws:
ItemRollbackException- if theItemModelreferenced cannot be rolled back.
-
-