use of com.enonic.xp.impl.task.distributed.TaskContext in project xp by enonic.
the class TaskRunnable method newContext.
private Context newContext() {
final TaskContext taskContext = runnableTask.getTaskContext();
final ContextBuilder context = ContextBuilder.create().authInfo(taskContext.getAuthInfo()).branch(taskContext.getBranch()).repositoryId(taskContext.getRepo());
if (taskContext.getContentRootPath() != null) {
context.attribute(CONTENT_ROOT_PATH_ATTRIBUTE, taskContext.getContentRootPath());
}
return context.build();
}
Aggregations