private EventTopicState createEventTopicState(String documentSelfLink, String name, String task, String stage, String subStage, Boolean blocking, String schema) { EventTopicService.TopicTaskInfo taskInfo = new EventTopicService.TopicTaskInfo(); taskInfo.task = task; taskInfo.stage = stage; taskInfo.substage = subStage; EventTopicState state = new EventTopicState(); state.documentSelfLink = documentSelfLink; state.name = name; state.topicTaskInfo = taskInfo; state.blockable = blocking; state.schema = schema; return state; }
public static void registerEventTopic(String id, String name, String description, String documentSelfLink, boolean blockable, SchemaBuilder schema, EventTopicService.TopicTaskInfo taskInfo, ServiceHost host) { // validate if provided data is valid. validateTopicInfo(id, name, taskInfo, host); EventTopicState topic = new EventTopicState(); topic.id = id; topic.name = name; topic.description = description; topic.documentSelfLink = documentSelfLink; topic.blockable = blockable; topic.schema = Utils.toJson(extendSchemaWithCommonFields(schema)); topic.topicTaskInfo = taskInfo; registerEventTopic(host, topic); }
private EventTopicState createTopicState(String substage, String topicId) { EventTopicState state = new EventTopicState(); state.topicTaskInfo = new TopicTaskInfo(); state.topicTaskInfo.task = "task"; state.topicTaskInfo.stage = "stage"; state.topicTaskInfo.substage = substage; state.id = topicId; state.name = topicId; state.blockable = false; state.schema = ""; return state; }