Package com.evolveum.midpoint.repo.api
Interface ModificationPrecondition<T extends ObjectType>
- All Known Implementing Classes:
VersionPrecondition
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A precondition that is checked before a modification is committed into the repository. It can e.g. check an object version,
or a specific object state. For even more dynamic executions please see
RepositoryService.modifyObjectDynamically(Class, String, Collection, RepositoryService.ModificationsSupplier, RepoModifyOptions, OperationResult).- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanholds(PrismObject<T> object) Violation of the precondition can be reported either by returning false or by throwingPreconditionViolationExceptiondirectly.
-
Method Details
-
holds
Violation of the precondition can be reported either by returning false or by throwingPreconditionViolationExceptiondirectly. The former method is easier while the latter one gives a possibility to provide a custom exception message.- Throws:
PreconditionViolationException
-