use of com.evolveum.midpoint.repo.sql.data.common.embedded.RTaskAutoScaling in project midpoint by Evolveum.
the class RTask method copyFromJAXB.
// dynamically called
public static void copyFromJAXB(TaskType jaxb, RTask repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException {
copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult);
repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName()));
repo.setTaskIdentifier(jaxb.getTaskIdentifier());
repo.setExecutionStatus(RUtil.getRepoEnumValue(jaxb.getExecutionState(), RTaskExecutionState.class));
repo.setHandlerUri(jaxb.getHandlerUri());
repo.setLastRunFinishTimestamp(jaxb.getLastRunFinishTimestamp());
repo.setCompletionTimestamp(jaxb.getCompletionTimestamp());
repo.setLastRunStartTimestamp(jaxb.getLastRunStartTimestamp());
repo.setNode(jaxb.getNode());
repo.setBinding(RUtil.getRepoEnumValue(jaxb.getBinding(), RTaskBinding.class));
repo.setRecurrence(RUtil.getRepoEnumValue(TaskTypeUtil.getEffectiveRecurrence(jaxb), RTaskRecurrence.class));
repo.setThreadStopAction(RUtil.getRepoEnumValue(jaxb.getThreadStopAction(), RThreadStopAction.class));
repo.setCategory(jaxb.getCategory());
repo.setParent(jaxb.getParent());
repo.setObjectRef(RUtil.jaxbRefToEmbeddedRepoRef(jaxb.getObjectRef(), repositoryContext.relationRegistry));
repo.setOwnerRefTask(RUtil.jaxbRefToEmbeddedRepoRef(jaxb.getOwnerRef(), repositoryContext.relationRegistry));
repo.setWaitingReason(RUtil.getRepoEnumValue(jaxb.getWaitingReason(), RTaskWaitingReason.class));
repo.setSchedulingState(RUtil.getRepoEnumValue(jaxb.getSchedulingState(), RTaskSchedulingState.class));
repo.setDependent(RUtil.listToSet(jaxb.getDependent()));
TaskAutoScalingType autoScaling = jaxb.getAutoScaling();
if (autoScaling != null) {
RTaskAutoScaling rAutoScaling = new RTaskAutoScaling();
RTaskAutoScaling.fromJaxb(autoScaling, rAutoScaling);
repo.setAutoScaling(rAutoScaling);
}
RUtil.copyResultFromJAXB(TaskType.F_RESULT, jaxb.getResult(), repo, repositoryContext.prismContext);
}
use of com.evolveum.midpoint.repo.sql.data.common.embedded.RTaskAutoScaling in project midpoint by Evolveum.
the class TaskAutoScalingMapper method map.
@Override
public RTaskAutoScaling map(TaskAutoScalingType input, MapperContext context) {
try {
RTaskAutoScaling taskAutoScaling = new RTaskAutoScaling();
RTaskAutoScaling.fromJaxb(input, taskAutoScaling);
return taskAutoScaling;
} catch (DtoTranslationException ex) {
throw new SystemException("Couldn't translate TaskAutoScaling to entity", ex);
}
}
Aggregations