本文整理了Java中com.evolveum.midpoint.task.api.Task.isLightweightAsynchronousTask()
方法的一些代码示例,展示了Task.isLightweightAsynchronousTask()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.isLightweightAsynchronousTask()
方法的具体详情如下:
包路径:com.evolveum.midpoint.task.api.Task
类名称:Task
方法名:isLightweightAsynchronousTask
暂无
代码示例来源:origin: Evolveum/midpoint
public static boolean isDryRun(Task task) throws SchemaException {
Boolean dryRun = findItemValue(task, SchemaConstants.MODEL_EXTENSION_DRY_RUN);
if (dryRun == null && task.isLightweightAsynchronousTask() && task.getParentForLightweightAsynchronousTask() != null) {
dryRun = findItemValue(task.getParentForLightweightAsynchronousTask(), SchemaConstants.MODEL_EXTENSION_DRY_RUN);
}
return dryRun != null ? dryRun : Boolean.FALSE;
}
代码示例来源:origin: Evolveum/midpoint
private String addTaskToRepositoryAndQuartz(Task task, RepoAddOptions options,
OperationResult parentResult) throws ObjectAlreadyExistsException, SchemaException {
if (task.isLightweightAsynchronousTask()) {
throw new IllegalStateException("A task with lightweight task handler cannot be made persistent; task = " + task);
// otherwise, there would be complications on task restart: the task handler is not stored in the repository,
// so it is just not possible to restart such a task
}
OperationResult result = parentResult.createSubresult(DOT_IMPL_CLASS + "addTaskToRepositoryAndQuartz");
result.addArbitraryObjectAsParam("task", task);
PrismObject<TaskType> taskPrism = task.getTaskPrismObject();
String oid;
try {
oid = repositoryService.addObject(taskPrism, options, result);
} catch (ObjectAlreadyExistsException | SchemaException e) {
result.recordFatalError("Couldn't add task to repository: " + e.getMessage(), e);
throw e;
}
((TaskQuartzImpl) task).setOid(oid);
synchronizeTaskWithQuartz((TaskQuartzImpl) task, result);
result.computeStatus();
return oid;
}
内容来源于网络,如有侵权,请联系作者删除!