本文整理了Java中com.evolveum.midpoint.task.api.Task.setChannel()
方法的一些代码示例,展示了Task.setChannel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.setChannel()
方法的具体详情如下:
包路径:com.evolveum.midpoint.task.api.Task
类名称:Task
方法名:setChannel
[英]Sets change channel URI.
[中]设置更改频道URI。
代码示例来源:origin: Evolveum/midpoint
protected Task createTaskInstance(String operationName) {
// TODO: better task initialization
Task task = taskManager.createTaskInstance(operationName);
setTaskOwner(task);
task.setChannel(SchemaConstants.CHANNEL_WEB_SERVICE_URI);
return task;
}
代码示例来源:origin: Evolveum/midpoint
protected Task createTask(String operationName) {
Task task = super.createTask(operationName);
PrismObject<UserType> defaultActor = getDefaultActor();
if (defaultActor != null) {
task.setOwner(defaultActor);
}
task.setChannel(DEFAULT_CHANNEL);
return task;
}
代码示例来源:origin: Evolveum/midpoint
protected Task createTask(String operationName, MidPointPrincipal principal) {
Task task = super.createTask(operationName);
task.setOwner(principal.getUser().asPrismObject());
task.setChannel(DEFAULT_CHANNEL);
return task;
}
代码示例来源:origin: Evolveum/midpoint
private Task submitTask(WfTaskCreationInstruction instruction, Task parentTask, WfConfigurationType wfConfigurationType, String channelOverride, OperationResult result) throws SchemaException, ObjectNotFoundException {
Task wfTask = instruction.createTask(this, parentTask, wfConfigurationType);
if (channelOverride != null) {
wfTask.setChannel(channelOverride);
}
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Switching workflow root or child task to background:\n{}", wfTask.debugDump());
}
taskManager.switchToBackground(wfTask, result);
return wfTask;
}
代码示例来源:origin: Evolveum/midpoint
private void auditLogin(@Nullable String username, @Nullable UserType user, @NotNull ConnectionEnvironment connEnv, @NotNull OperationResultStatus status,
@Nullable String message) {
Task task = taskManager.createTaskInstance();
task.setChannel(connEnv.getChannel());
LOGGER.debug("Login {} username={}, channel={}: {}",
status == OperationResultStatus.SUCCESS ? "success" : "failure", username,
connEnv.getChannel(), message);
AuditEventRecord record = new AuditEventRecord(AuditEventType.CREATE_SESSION, AuditEventStage.REQUEST);
record.setParameter(username);
if (user != null ) {
record.setInitiator(user.asPrismObject());
}
record.setTimestamp(System.currentTimeMillis());
record.setOutcome(status);
record.setMessage(message);
storeConnectionEnvironment(record, connEnv);
auditService.audit(record, task);
}
代码示例来源:origin: Evolveum/midpoint
protected <O extends ObjectType> void assertAllow(String opname, Attempt attempt) throws Exception {
Task task = taskManager.createTaskInstance(AbstractModelIntegrationTest.class.getName() + ".assertAllow."+opname);
task.setOwner(getSecurityContextPrincipalUser());
task.setChannel(SchemaConstants.CHANNEL_GUI_USER_URI);
OperationResult result = task.getResult();
try {
logAttempt(opname);
attempt.run(task, result);
} catch (SecurityViolationException e) {
failAllow(opname, e);
}
result.computeStatus();
TestUtil.assertSuccess(result);
logAllow(opname);
}
代码示例来源:origin: Evolveum/midpoint
protected <O extends ObjectType> void assertDeny(String opname, Attempt attempt) throws Exception {
Task task = taskManager.createTaskInstance(AbstractModelIntegrationTest.class.getName() + ".assertDeny."+opname);
task.setOwner(getSecurityContextPrincipalUser());
task.setChannel(SchemaConstants.CHANNEL_GUI_USER_URI);
OperationResult result = task.getResult();
try {
logAttempt(opname);
attempt.run(task, result);
failDeny(opname);
} catch (SecurityViolationException e) {
// this is expected
logDeny(opname);
result.computeStatus();
TestUtil.assertFailure(result);
}
}
代码示例来源:origin: Evolveum/midpoint
protected <O extends ObjectType> void asAdministrator(Attempt attempt) throws Exception {
Task task = taskManager.createTaskInstance(AbstractModelIntegrationTest.class.getName() + ".asAdministrator");
OperationResult result = task.getResult();
MidPointPrincipal origPrincipal = getSecurityContextPrincipal();
login(USER_ADMINISTRATOR_USERNAME);
task.setOwner(getSecurityContextPrincipalUser());
task.setChannel(SchemaConstants.CHANNEL_GUI_USER_URI);
try {
attempt.run(task, result);
} catch (Throwable e) {
login(origPrincipal);
throw e;
}
login(origPrincipal);
result.computeStatus();
TestUtil.assertSuccess(result);
}
代码示例来源:origin: Evolveum/midpoint
@BeforeMethod
public void initSystemConditional() throws Exception {
// Check whether we are already initialized
assertNotNull("Repository is not wired properly", repositoryService);
assertNotNull("Task manager is not wired properly", taskManager);
LOGGER.trace("initSystemConditional: {} systemInitialized={}", this.getClass(), isSystemInitialized());
if (!isSystemInitialized()) {
PrettyPrinter.setDefaultNamespacePrefix(MidPointConstants.NS_MIDPOINT_PUBLIC_PREFIX);
PrismTestUtil.setPrismContext(prismContext);
LOGGER.trace("initSystemConditional: invoking initSystem");
Task initTask = taskManager.createTaskInstance(this.getClass().getName() + ".initSystem");
initTask.setChannel(SchemaConstants.CHANNEL_GUI_INIT_URI);
OperationResult result = initTask.getResult();
InternalMonitor.reset();
InternalsConfig.setPrismMonitoring(true);
prismContext.setMonitor(new InternalMonitor());
initSystem(initTask, result);
postInitSystem(initTask, result);
result.computeStatus();
IntegrationTestTools.display("initSystem result", result);
TestUtil.assertSuccessOrWarning("initSystem failed (result)", result, 1);
setSystemInitialized();
}
}
代码示例来源:origin: Evolveum/midpoint
task.setChannel(SchemaConstants.CHANNEL_REST_URI);
代码示例来源:origin: Evolveum/midpoint
deltas.add(delta);
task.setChannel(QNameUtil.qNameToUri(SchemaConstants.CHANGE_CHANNEL_RECON));
modelService.executeChanges(deltas, ModelExecuteOptions.createReconcile(), task, parentResult);
代码示例来源:origin: Evolveum/midpoint
task.setChannel(QNameUtil.qNameToUri(SchemaConstants.CHANGE_CHANNEL_IMPORT));
OperationResult result = task.getResult();
代码示例来源:origin: Evolveum/midpoint
task.setChannel(context.getChannel());
代码示例来源:origin: Evolveum/midpoint
task.setChannel(SchemaConstants.CHANNEL_GUI_USER_URI);
OperationResult result = task.getResult();
preTestCleanup(AssignmentPolicyEnforcementType.POSITIVE);
代码示例来源:origin: Evolveum/midpoint
task.setChannel(SchemaConstants.CHANNEL_REMEDIATION_URI);
代码示例来源:origin: Evolveum/midpoint
ApprovalStageDefinitionType stageDef = ActivitiUtil.getAndVerifyCurrentStage(execution, wfTask, false, prismContext);
int stageNumber = stageDef.getNumber();
opTask.setChannel(wfTask.getChannel()); // TODO !!!!!!!!!!
代码示例来源:origin: Evolveum/midpoint
task.setChannel("http://pirates.net/avast");
OperationResult result = task.getResult();
preTestCleanup(AssignmentPolicyEnforcementType.POSITIVE);
代码示例来源:origin: Evolveum/midpoint
task.setChannel(SchemaConstants.CHANNEL_GUI_USER_URI);
OperationResult result = task.getResult();
代码示例来源:origin: Evolveum/midpoint
task.setChannel(SchemaConstants.CHANNEL_GUI_SELF_SERVICE_URI);
OperationResult result = task.getResult();
代码示例来源:origin: Evolveum/midpoint
task.setChannel(SchemaConstants.CHANNEL_GUI_USER_URI);
OperationResult result = task.getResult();
内容来源于网络,如有侵权,请联系作者删除!