Skip to content

Commit

Permalink
create task improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Apr 1, 2020
1 parent b94757b commit 1869cff
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Expand Up @@ -112,7 +112,7 @@ protected PrismPropertyWrapper<String> createWrapper(PrismContainerValueWrapper<

private String normalizeHandler(String handler) {
handler = StringUtils.remove(handler, "-3");
handler = StringUtils.removeStart(handler, "http://").replace("-", "/").replace("#", "/");
handler = StringUtils.removeStart(handler, "http://midpoint.evolveum.com/xml/ns/public/").replace("-", "/").replace("#", "/");
String[] split = handler.split("/");
handler = "TaskHandlerSelector." + StringUtils.join(split, ".");
return handler;
Expand Down
Expand Up @@ -198,7 +198,14 @@ private ItemVisibility getBasicTabVisibility(ItemPath path) {
SchemaConstants.PATH_MODEL_EXTENSION_EXECUTE_OPTIONS,
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_WORKER_THREADS));
} else if (taskHandler.endsWith("task/jdbc-ping/handler-3")) {
//TODO
pathsToShow = Arrays.asList(ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.JDBC_PING_TESTS_QNAME),
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.JDBC_PING_INTERVAL_QNAME),
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.JDBC_PING_TEST_QUERY_QNAME),
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.JDBC_PING_DRIVER_CLASS_NAME_QNAME),
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.JDBC_PING_JDBC_URL_QNAME),
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.JDBC_PING_JDBC_USERNAME_QNAME),
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.JDBC_PING_JDBC_PASSWORD_QNAME),
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.JDBC_PING_LOG_ON_INFO_LEVEL_QNAME));
} else if (taskHandler.endsWith("model/auditReindex/handler-3")) {
//no extension attributes
} else if (taskHandler.endsWith("task/lightweight-partitioning/handler-3")
Expand All @@ -211,8 +218,7 @@ private ItemVisibility getBasicTabVisibility(ItemPath path) {
} else if (taskHandler.endsWith("task/workers-restart/handler-3")) {
//no attributes
} else if (taskHandler.endsWith("model/synchronization/task/delete-not-updated-shadow/handler-3")) {
pathsToShow = Arrays.asList(ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_WORKER_THREADS),
//TODO notUpdatesShadowsDurtion
pathsToShow = Arrays.asList(ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_NOT_UPDATED_SHADOW_DURATION),
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_WORKER_THREADS),
TaskType.F_OBJECT_REF);
} else if (taskHandler.endsWith("model/shadowRefresh/handler-3")) {
Expand All @@ -238,10 +244,9 @@ private ItemVisibility getBasicTabVisibility(ItemPath path) {
} else if (taskHandler.endsWith("model/trigger/scanner/handler-3")) {
pathsToShow = Arrays.asList(ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_LAST_SCAN_TIMESTAMP_PROPERTY_NAME),
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_WORKER_THREADS));
} else if (taskHandler.endsWith("model/focus-validity-scanner/handler-3model/partitioned-focus-validity-scanner/handler-3#1")
} else if (taskHandler.endsWith("model/focus-validity-scanner/handler-3") || taskHandler.endsWith("model/partitioned-focus-validity-scanner/handler-3#1")
|| taskHandler.endsWith("model/partitioned-focus-validity-scanner/handler-3#2")) {
pathsToShow = Arrays.asList(ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_LAST_SCAN_TIMESTAMP_PROPERTY_NAME),
// TODO policyRule ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.PO),
SchemaConstants.PATH_MODEL_EXTENSION_OBJECT_TYPE,
ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_WORKER_THREADS));
}
Expand Down
Expand Up @@ -30,7 +30,7 @@ public class TaskHandlerSelectorPanel extends PrismPropertyPanel<String> {
public TaskHandlerSelectorPanel(String id, IModel<PrismPropertyWrapper<String>> model, ItemPanelSettings settings) {
super(id, model, settings);

Label label = new Label(ID_TASK_SPECIFICATION, createStringResource("TaskHandlerSelectorPanel.seletor.header"));
Label label = new Label(ID_TASK_SPECIFICATION, createStringResource("TaskHandlerSelectorPanel.selector.header"));
add(label);
label.setOutputMarkupId(true);
}
Expand Down
Expand Up @@ -292,6 +292,7 @@ public abstract class SchemaConstants {
public static final ItemName MODEL_EXTENSION_TRACING_PROFILE = new ItemName(NS_MODEL_EXTENSION, "tracingProfile");
public static final ItemName MODEL_EXTENSION_TRACING_ROOT = new ItemName(NS_MODEL_EXTENSION, "tracingRoot");
public static final ItemName MODEL_EXTENSION_TRACING = new ItemName(NS_MODEL_EXTENSION, "tracing");
public static final ItemName MODEL_EXTENSION_NOT_UPDATED_SHADOW_DURATION = new ItemName(NS_MODEL_EXTENSION, "notUpdatedShadowsDuration");

public static final String NS_MODEL_DISABLE_REASON = NS_MODEL + "/disableReason";
public static final String MODEL_DISABLE_REASON_EXPLICIT =
Expand Down

0 comments on commit 1869cff

Please sign in to comment.