toStep = pipelineStep;
}
}
if (fromIndex == -1) {
if (null != interceptor.getFromStepId()) {
throw new GeomajasException(ExceptionCode.PIPELINE_INTERCEPTOR_INVALID_STEP, interceptor.getId(),
interceptor.getFromStepId());
} else {
fromIndex = 0;
fromStep = steps.get(0);
}
}
if (toIndex == -1) {
if (null != interceptor.getToStepId()) {
throw new GeomajasException(ExceptionCode.PIPELINE_INTERCEPTOR_INVALID_STEP, interceptor.getId(),
interceptor.getToStepId());
} else {
int pos = steps.size() - 1;
toIndex = pos;
toStep = steps.get(pos);
}
}
if (fromIndex > toIndex) {
throw new GeomajasException(ExceptionCode.PIPELINE_INTERCEPTOR_STEPS_ORDER, interceptor.getId());
}
width = toIndex - fromIndex + 1;
}