Beispiel #1
0
  IStatus touchpointCompleteOperand(
      IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
    if (touchpointToTouchpointOperandParameters.isEmpty()) return Status.OK_STATUS;

    MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
    for (Map.Entry<Touchpoint, Map<String, Object>> entry :
        touchpointToTouchpointOperandParameters.entrySet()) {
      Touchpoint touchpoint = entry.getKey();
      Map<String, Object> touchpointParameters = entry.getValue();
      mergeStatus(status, touchpoint.completeOperand(profile, touchpointParameters));
    }
    touchpointToTouchpointOperandParameters.clear();
    return status;
  }
Beispiel #2
0
  private IStatus initializeTouchpointParameters(
      IProfile profile, Operand operand, Touchpoint touchpoint, IProgressMonitor monitor) {
    if (touchpointToTouchpointOperandParameters.containsKey(touchpoint)) return Status.OK_STATUS;

    Map<String, Object> touchpointPhaseParameters =
        touchpointToTouchpointPhaseParameters.get(touchpoint);
    if (touchpointPhaseParameters == null) {
      touchpointPhaseParameters = new HashMap<String, Object>(phaseParameters);
      IStatus status =
          touchpoint.initializePhase(monitor, profile, phaseId, touchpointPhaseParameters);
      if (status != null && status.matches(IStatus.ERROR | IStatus.CANCEL)) return status;
      touchpointToTouchpointPhaseParameters.put(touchpoint, touchpointPhaseParameters);
    }

    Map<String, Object> touchpointOperandParameters =
        new HashMap<String, Object>(touchpointPhaseParameters);
    touchpointOperandParameters.putAll(operandParameters);
    IStatus status = touchpoint.initializeOperand(profile, touchpointOperandParameters);
    if (status != null && status.matches(IStatus.ERROR | IStatus.CANCEL)) return status;
    touchpointToTouchpointOperandParameters.put(touchpoint, touchpointOperandParameters);
    return Status.OK_STATUS;
  }