Class ActivityHandlerRegistry
- java.lang.Object
-
- com.evolveum.midpoint.repo.common.activity.handlers.ActivityHandlerRegistry
-
@Component @Experimental public class ActivityHandlerRegistry extends Object
Registry of activity handlers for different work definition types (either standard or customer-provided). This is similar to the task handler registry. However, the task handlers were identified by URI, whereas activity handlers have no such direct identifier. They are selected by work definition class (like `RecomputationWorkDefinition`) that is itself found in the work definition factory by either work definition bean type name (like `RecomputationWorkDefinitionType`) or legacy task handler URI (like `.../recompute/handler-3`).
-
-
Constructor Summary
Constructors Constructor Description ActivityHandlerRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable String
getArchetypeOid(@NotNull String legacyHandlerUri)
<WD extends WorkDefinition,AH extends ActivityHandler<WD,AH>>
AHgetHandler(@NotNull ActivityDefinition<WD> activityDefinition)
void
register(QName typeName, String legacyHandlerUri, Class<? extends WorkDefinition> definitionClass, WorkDefinitionFactory.WorkDefinitionSupplier supplier, ActivityHandler<?,?> activityHandler)
Registers both the work definition factory and the activity handler.void
registerHandler(Class<? extends WorkDefinition> definitionClass, ActivityHandler<?,?> activityHandler)
Registers the activity handler.void
unregister(QName typeName, String legacyHandlerUri, Class<? extends WorkDefinition> definitionClass)
Unregisters work definition factory and activity handler.void
unregisterHandler(Class<? extends WorkDefinition> definitionClass)
Unregisters the activity handler.
-
-
-
Method Detail
-
register
public void register(QName typeName, String legacyHandlerUri, Class<? extends WorkDefinition> definitionClass, WorkDefinitionFactory.WorkDefinitionSupplier supplier, ActivityHandler<?,?> activityHandler)
Registers both the work definition factory and the activity handler.
-
registerHandler
public void registerHandler(Class<? extends WorkDefinition> definitionClass, ActivityHandler<?,?> activityHandler)
Registers the activity handler.
-
unregister
public void unregister(QName typeName, String legacyHandlerUri, Class<? extends WorkDefinition> definitionClass)
Unregisters work definition factory and activity handler.
-
unregisterHandler
public void unregisterHandler(Class<? extends WorkDefinition> definitionClass)
Unregisters the activity handler.
-
getHandler
@NotNull public <WD extends WorkDefinition,AH extends ActivityHandler<WD,AH>> AH getHandler(@NotNull @NotNull ActivityDefinition<WD> activityDefinition)
-
-