コード例 #1
0
  public DomainDetail unmarshall(JsonUnmarshallerContext context) throws Exception {
    DomainDetail domainDetail = new DomainDetail();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("domainInfo", targetDepth)) {
          context.nextToken();
          domainDetail.setDomainInfo(DomainInfoJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("configuration", targetDepth)) {
          context.nextToken();
          domainDetail.setConfiguration(
              DomainConfigurationJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return domainDetail;
  }
  public WorkflowExecutionInfos unmarshall(JsonUnmarshallerContext context) throws Exception {
    WorkflowExecutionInfos workflowExecutionInfos = new WorkflowExecutionInfos();

    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("executionInfos", targetDepth)) {
          workflowExecutionInfos.setExecutionInfos(
              new ListUnmarshaller<WorkflowExecutionInfo>(
                      WorkflowExecutionInfoJsonUnmarshaller.getInstance())
                  .unmarshall(context));
        }
        if (context.testExpression("nextPageToken", targetDepth)) {
          context.nextToken();
          workflowExecutionInfos.setNextPageToken(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getCurrentDepth() <= originalDepth) break;
      }

      token = context.nextToken();
    }

    return workflowExecutionInfos;
  }
コード例 #3
0
  public ActivityType unmarshall(JsonUnmarshallerContext context) throws Exception {
    ActivityType activityType = new ActivityType();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("name", targetDepth)) {
          context.nextToken();
          activityType.setName(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("version", targetDepth)) {
          context.nextToken();
          activityType.setVersion(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return activityType;
  }
  public WorkflowExecutionCount unmarshall(JsonUnmarshallerContext context) throws Exception {
    WorkflowExecutionCount workflowExecutionCount = new WorkflowExecutionCount();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) return workflowExecutionCount;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("count", targetDepth)) {
          context.nextToken();
          workflowExecutionCount.setCount(
              IntegerJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("truncated", targetDepth)) {
          context.nextToken();
          workflowExecutionCount.setTruncated(
              BooleanJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getCurrentDepth() <= originalDepth) {
          return workflowExecutionCount;
        }
      }
      token = context.nextToken();
    }
  }
  public WorkflowExecutionDetail unmarshall(JsonUnmarshallerContext context) throws Exception {
    WorkflowExecutionDetail workflowExecutionDetail = new WorkflowExecutionDetail();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("executionInfo", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setExecutionInfo(
              WorkflowExecutionInfoJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("executionConfiguration", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setExecutionConfiguration(
              WorkflowExecutionConfigurationJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("openCounts", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setOpenCounts(
              WorkflowExecutionOpenCountsJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("latestActivityTaskTimestamp", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setLatestActivityTaskTimestamp(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("latestExecutionContext", targetDepth)) {
          context.nextToken();
          workflowExecutionDetail.setLatestExecutionContext(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return workflowExecutionDetail;
  }
  public ScheduleActivityTaskFailedEventAttributes unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    ScheduleActivityTaskFailedEventAttributes scheduleActivityTaskFailedEventAttributes =
        new ScheduleActivityTaskFailedEventAttributes();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("activityType", targetDepth)) {
          context.nextToken();
          scheduleActivityTaskFailedEventAttributes.setActivityType(
              ActivityTypeJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("activityId", targetDepth)) {
          context.nextToken();
          scheduleActivityTaskFailedEventAttributes.setActivityId(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("cause", targetDepth)) {
          context.nextToken();
          scheduleActivityTaskFailedEventAttributes.setCause(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("decisionTaskCompletedEventId", targetDepth)) {
          context.nextToken();
          scheduleActivityTaskFailedEventAttributes.setDecisionTaskCompletedEventId(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return scheduleActivityTaskFailedEventAttributes;
  }
  public ActivityTaskStatus unmarshall(JsonUnmarshallerContext context) throws Exception {
    ActivityTaskStatus activityTaskStatus = new ActivityTaskStatus();

    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("cancelRequested", targetDepth)) {
          context.nextToken();
          activityTaskStatus.setCancelRequested(
              BooleanJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getCurrentDepth() <= originalDepth) break;
      }
      token = context.nextToken();
    }

    return activityTaskStatus;
  }
  public CancelWorkflowExecutionDecisionAttributes unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    CancelWorkflowExecutionDecisionAttributes cancelWorkflowExecutionDecisionAttributes =
        new CancelWorkflowExecutionDecisionAttributes();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("details", targetDepth)) {
          context.nextToken();
          cancelWorkflowExecutionDecisionAttributes.setDetails(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return cancelWorkflowExecutionDecisionAttributes;
  }
コード例 #9
0
  public DecisionTask unmarshall(JsonUnmarshallerContext context) throws Exception {
    DecisionTask decisionTask = new DecisionTask();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("taskToken", targetDepth)) {
          context.nextToken();
          decisionTask.setTaskToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("startedEventId", targetDepth)) {
          context.nextToken();
          decisionTask.setStartedEventId(LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("workflowExecution", targetDepth)) {
          context.nextToken();
          decisionTask.setWorkflowExecution(
              WorkflowExecutionJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("workflowType", targetDepth)) {
          context.nextToken();
          decisionTask.setWorkflowType(
              WorkflowTypeJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("events", targetDepth)) {
          decisionTask.setEvents(
              new ListUnmarshaller<HistoryEvent>(HistoryEventJsonUnmarshaller.getInstance())
                  .unmarshall(context));
        }
        if (context.testExpression("nextPageToken", targetDepth)) {
          context.nextToken();
          decisionTask.setNextPageToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("previousStartedEventId", targetDepth)) {
          context.nextToken();
          decisionTask.setPreviousStartedEventId(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return decisionTask;
  }
  public WorkflowExecutionCancelRequestedEventAttributes unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    WorkflowExecutionCancelRequestedEventAttributes
        workflowExecutionCancelRequestedEventAttributes =
            new WorkflowExecutionCancelRequestedEventAttributes();

    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("externalWorkflowExecution", targetDepth)) {
          context.nextToken();
          workflowExecutionCancelRequestedEventAttributes.setExternalWorkflowExecution(
              WorkflowExecutionJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("externalInitiatedEventId", targetDepth)) {
          context.nextToken();
          workflowExecutionCancelRequestedEventAttributes.setExternalInitiatedEventId(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("cause", targetDepth)) {
          context.nextToken();
          workflowExecutionCancelRequestedEventAttributes.setCause(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getCurrentDepth() <= originalDepth) break;
      }

      token = context.nextToken();
    }

    return workflowExecutionCancelRequestedEventAttributes;
  }
  public ExternalWorkflowExecutionSignaledEventAttributes unmarshall(
      JsonUnmarshallerContext context) throws Exception {
    ExternalWorkflowExecutionSignaledEventAttributes
        externalWorkflowExecutionSignaledEventAttributes =
            new ExternalWorkflowExecutionSignaledEventAttributes();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("workflowExecution", targetDepth)) {
          context.nextToken();
          externalWorkflowExecutionSignaledEventAttributes.setWorkflowExecution(
              WorkflowExecutionJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("initiatedEventId", targetDepth)) {
          context.nextToken();
          externalWorkflowExecutionSignaledEventAttributes.setInitiatedEventId(
              context.getUnmarshaller(Long.class).unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return externalWorkflowExecutionSignaledEventAttributes;
  }
コード例 #12
0
  public DomainInfo unmarshall(JsonUnmarshallerContext context) throws Exception {
    DomainInfo domainInfo = new DomainInfo();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("name", targetDepth)) {
          context.nextToken();
          domainInfo.setName(context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("status", targetDepth)) {
          context.nextToken();
          domainInfo.setStatus(context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("description", targetDepth)) {
          context.nextToken();
          domainInfo.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return domainInfo;
  }
  public ActivityTypeConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {
    ActivityTypeConfiguration activityTypeConfiguration = new ActivityTypeConfiguration();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("defaultTaskStartToCloseTimeout", targetDepth)) {
          context.nextToken();
          activityTypeConfiguration.setDefaultTaskStartToCloseTimeout(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("defaultTaskHeartbeatTimeout", targetDepth)) {
          context.nextToken();
          activityTypeConfiguration.setDefaultTaskHeartbeatTimeout(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("defaultTaskList", targetDepth)) {
          context.nextToken();
          activityTypeConfiguration.setDefaultTaskList(
              TaskListJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("defaultTaskPriority", targetDepth)) {
          context.nextToken();
          activityTypeConfiguration.setDefaultTaskPriority(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("defaultTaskScheduleToStartTimeout", targetDepth)) {
          context.nextToken();
          activityTypeConfiguration.setDefaultTaskScheduleToStartTimeout(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
        if (context.testExpression("defaultTaskScheduleToCloseTimeout", targetDepth)) {
          context.nextToken();
          activityTypeConfiguration.setDefaultTaskScheduleToCloseTimeout(
              context.getUnmarshaller(String.class).unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }
      token = context.nextToken();
    }

    return activityTypeConfiguration;
  }
  public ChildWorkflowExecutionFailedEventAttributes unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes =
        new ChildWorkflowExecutionFailedEventAttributes();

    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("workflowExecution", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setWorkflowExecution(
              WorkflowExecutionJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("workflowType", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setWorkflowType(
              WorkflowTypeJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("reason", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setReason(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("details", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setDetails(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("initiatedEventId", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setInitiatedEventId(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("startedEventId", targetDepth)) {
          context.nextToken();
          childWorkflowExecutionFailedEventAttributes.setStartedEventId(
              LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getCurrentDepth() <= originalDepth) break;
      }
      token = context.nextToken();
    }

    return childWorkflowExecutionFailedEventAttributes;
  }
コード例 #15
0
  public ActivityTask unmarshall(JsonUnmarshallerContext context) throws Exception {
    ActivityTask activityTask = new ActivityTask();

    int originalDepth = context.getCurrentDepth();
    String currentParentElement = context.getCurrentParentElement();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("taskToken", targetDepth)) {
          context.nextToken();
          activityTask.setTaskToken(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("activityId", targetDepth)) {
          context.nextToken();
          activityTask.setActivityId(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("startedEventId", targetDepth)) {
          context.nextToken();
          activityTask.setStartedEventId(LongJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("workflowExecution", targetDepth)) {
          context.nextToken();
          activityTask.setWorkflowExecution(
              WorkflowExecutionJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("activityType", targetDepth)) {
          context.nextToken();
          activityTask.setActivityType(
              ActivityTypeJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("input", targetDepth)) {
          context.nextToken();
          activityTask.setInput(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return activityTask;
  }