Package com.evolveum.midpoint.repo.api
Class VersionPrecondition<T extends ObjectType>
- java.lang.Object
-
- com.evolveum.midpoint.repo.api.VersionPrecondition<T>
-
- All Implemented Interfaces:
ModificationPrecondition<T>
,Serializable
public class VersionPrecondition<T extends ObjectType> extends Object implements ModificationPrecondition<T>, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VersionPrecondition(@NotNull PrismObject<T> object)
VersionPrecondition(String expectedVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
holds(PrismObject<T> object)
Problem can be reported either by returning false or by throwing PreconditionViolationException directly.
-
-
-
Constructor Detail
-
VersionPrecondition
public VersionPrecondition(String expectedVersion)
-
VersionPrecondition
public VersionPrecondition(@NotNull @NotNull PrismObject<T> object)
-
-
Method Detail
-
holds
public boolean holds(PrismObject<T> object) throws PreconditionViolationException
Description copied from interface:ModificationPrecondition
Problem can be reported either by returning false or by throwing PreconditionViolationException directly. The former method is easier while the latter one gives a possibility to provide a custom exception message.- Specified by:
holds
in interfaceModificationPrecondition<T extends ObjectType>
- Throws:
PreconditionViolationException
-
-