Class ActivityHandlerRegistry
java.lang.Object
com.evolveum.midpoint.repo.common.activity.handlers.ActivityHandlerRegistry
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 the work definition
bean type name (like `RecomputationWorkDefinitionType`).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
getDefaultArchetypeOid
(@NotNull ActivityDefinitionType activityDefinitionBean) @Nullable ActivityHandler<?,
?> getHandler
(@NotNull ActivityDefinitionType activityDefinitionBean) Auxiliary method, primarily for external use.<WD extends WorkDefinition,
AH extends ActivityHandler<WD, AH>>
AHgetHandler
(@NotNull Class<WD> workDefinitionClass) <WD extends WorkDefinition,
AH extends ActivityHandler<WD, AH>>
AHgetHandlerRequired
(@NotNull ActivityDefinition<WD> activityDefinition) void
register
(@NotNull QName typeName, @NotNull QName itemName, @NotNull Class<? extends WorkDefinition> definitionClass, WorkDefinitionFactory.WorkDefinitionSupplier supplier, @NotNull 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, Class<? extends WorkDefinition> definitionClass) Unregisters work definition factory and activity handler.void
unregisterHandler
(Class<? extends WorkDefinition> definitionClass) Unregisters the activity handler.
-
Constructor Details
-
ActivityHandlerRegistry
public ActivityHandlerRegistry()
-
-
Method Details
-
register
public void register(@NotNull @NotNull QName typeName, @NotNull @NotNull QName itemName, @NotNull @NotNull Class<? extends WorkDefinition> definitionClass, @NotNull WorkDefinitionFactory.WorkDefinitionSupplier supplier, @NotNull @NotNull 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
Unregisters work definition factory and activity handler. -
unregisterHandler
Unregisters the activity handler. -
getHandlerRequired
@NotNull public <WD extends WorkDefinition,AH extends ActivityHandler<WD, AH getHandlerRequiredAH>> (@NotNull @NotNull ActivityDefinition<WD> activityDefinition) -
getHandler
@Nullable public <WD extends WorkDefinition,AH extends ActivityHandler<WD, AH getHandlerAH>> (@NotNull @NotNull Class<WD> workDefinitionClass) -
getHandler
@Nullable public @Nullable ActivityHandler<?,?> getHandler(@NotNull @NotNull ActivityDefinitionType activityDefinitionBean) throws SchemaException, ConfigurationException Auxiliary method, primarily for external use. Intentionally forgiving; returning `null` if the handler cannot be reliably determined. It is assumed that the handler is needed for informational purposes and no harm incurs if it's unknown. -
getDefaultArchetypeOid
@Nullable public @Nullable String getDefaultArchetypeOid(@NotNull @NotNull ActivityDefinitionType activityDefinitionBean) throws SchemaException, ConfigurationException
-