Class OptimizingTriggerCreatorImpl
java.lang.Object
com.evolveum.midpoint.model.impl.expr.triggerSetter.OptimizingTriggerCreatorImpl
- All Implemented Interfaces:
OptimizingTriggerCreator
This is a preliminary implementation.
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
For testing cluster-wide scenarios. -
Constructor Summary
ConstructorDescriptionOptimizingTriggerCreatorImpl
(TriggerCreatorGlobalState globalState, MidpointFunctionsImpl midpointFunctions, long fireAfter, long safetyMargin) -
Method Summary
Modifier and TypeMethodDescriptionboolean
createForNamedObject
(@NotNull Class<? extends ObjectType> type, @NotNull String name) Creates a trigger for the object with the given name.boolean
createForNamedUser
(@NotNull String name) Creates a trigger for the user with the given name.boolean
createForObject
(@NotNull Class<? extends ObjectType> type, @NotNull String oid) Creates a trigger to the user with the given OID.
-
Field Details
-
useGlobalState
@TestOnly public static boolean useGlobalStateFor testing cluster-wide scenarios.
-
-
Constructor Details
-
OptimizingTriggerCreatorImpl
public OptimizingTriggerCreatorImpl(TriggerCreatorGlobalState globalState, MidpointFunctionsImpl midpointFunctions, long fireAfter, long safetyMargin)
-
-
Method Details
-
createForNamedUser
public boolean createForNamedUser(@NotNull @NotNull String name) throws SchemaException, ObjectAlreadyExistsException, ObjectNotFoundException Description copied from interface:OptimizingTriggerCreator
Creates a trigger for the user with the given name.- Specified by:
createForNamedUser
in interfaceOptimizingTriggerCreator
- Returns:
- true if the trigger was really added; false if it already existed or could not be added (Note that if the object cannot be found by the name, currently no exception is reported.)
- Throws:
SchemaException
ObjectAlreadyExistsException
ObjectNotFoundException
-
createForNamedObject
public boolean createForNamedObject(@NotNull @NotNull Class<? extends ObjectType> type, @NotNull @NotNull String name) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException Description copied from interface:OptimizingTriggerCreator
Creates a trigger for the object with the given name.- Specified by:
createForNamedObject
in interfaceOptimizingTriggerCreator
- Returns:
- true if the trigger was really added; false if it already existed or could not be added (Note that if the object cannot be found by the name, currently no exception is reported.)
- Throws:
ObjectAlreadyExistsException
ObjectNotFoundException
SchemaException
-
createForObject
public boolean createForObject(@NotNull @NotNull Class<? extends ObjectType> type, @NotNull @NotNull String oid) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException Description copied from interface:OptimizingTriggerCreator
Creates a trigger to the user with the given OID.- Specified by:
createForObject
in interfaceOptimizingTriggerCreator
- Returns:
- true if the trigger was really added; false if it already existed or could not be added
- Throws:
ObjectAlreadyExistsException
ObjectNotFoundException
SchemaException
-