@Override public void addWorkflowConditionNode(Predicate<WorkflowContext> predicate, List<WorkflowNode> ifBranch, List<WorkflowNode> elseBranch) { ConditionSpecification spec = new DefaultConditionSpecification(predicate.getClass().getName(), predicate.getClass().getSimpleName(), "", new HashMap<String, String>(), new HashSet<String>()); nodes.add(new WorkflowConditionNode(spec.getName(), spec, ifBranch, elseBranch)); }
@Override public void addWorkflowConditionNode(Predicate<WorkflowContext> predicate, List<WorkflowNode> ifBranch, List<WorkflowNode> elseBranch) { ConditionSpecification spec = new DefaultConditionSpecification(predicate.getClass().getName(), predicate.getClass().getSimpleName(), "", new HashMap<String, String>(), new HashSet<String>()); currentBranch.add(new WorkflowConditionNode(spec.getName(), spec, ifBranch, elseBranch)); }
@Override public ConditionSpecification deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { JsonObject jsonObj = json.getAsJsonObject(); String className = jsonObj.get("className").getAsString(); String name = jsonObj.get("name").getAsString(); String description = jsonObj.get("description").getAsString(); Set<String> datasets = deserializeSet(jsonObj.get("datasets"), context, String.class); Map<String, String> properties = deserializeMap(jsonObj.get("properties"), context, String.class); return new DefaultConditionSpecification(className, name, description, properties, datasets); }
@Override public void addWorkflowConditionNode(Predicate<WorkflowContext> predicate, List<WorkflowNode> ifBranch, List<WorkflowNode> elseBranch) { ConditionSpecification spec = new DefaultConditionSpecification(predicate.getClass().getName(), predicate.getClass().getSimpleName(), "", new HashMap<String, String>(), new HashSet<String>()); currentBranch.add(new WorkflowConditionNode(spec.getName(), spec, ifBranch, elseBranch)); }
@Override public ConditionSpecification deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { JsonObject jsonObj = json.getAsJsonObject(); String className = jsonObj.get("className").getAsString(); String name = jsonObj.get("name").getAsString(); String description = jsonObj.get("description").getAsString(); Set<String> datasets = deserializeSet(jsonObj.get("datasets"), context, String.class); Map<String, String> properties = deserializeMap(jsonObj.get("properties"), context, String.class); return new DefaultConditionSpecification(className, name, description, properties, datasets); }
@Override public void addWorkflowConditionNode(Predicate<WorkflowContext> predicate, List<WorkflowNode> ifBranch, List<WorkflowNode> elseBranch) { ConditionSpecification spec = new DefaultConditionSpecification(predicate.getClass().getName(), predicate.getClass().getSimpleName(), "", new HashMap<String, String>(), new HashSet<String>()); currentBranch.add(new WorkflowConditionNode(spec.getName(), spec, ifBranch, elseBranch)); }
@Override public void addWorkflowConditionNode(Predicate<WorkflowContext> predicate, List<WorkflowNode> ifBranch, List<WorkflowNode> elseBranch) { ConditionSpecification spec = new DefaultConditionSpecification(predicate.getClass().getName(), predicate.getClass().getSimpleName(), "", new HashMap<String, String>(), new HashSet<String>()); nodes.add(new WorkflowConditionNode(spec.getName(), spec, ifBranch, elseBranch)); }
@Override public void addWorkflowConditionNode(Predicate<WorkflowContext> predicate, List<WorkflowNode> ifBranch, List<WorkflowNode> elseBranch) { ConditionSpecification spec = new DefaultConditionSpecification(predicate.getClass().getName(), predicate.getClass().getSimpleName(), "", new HashMap<String, String>(), new HashSet<String>()); currentBranch.add(new WorkflowConditionNode(spec.getName(), spec, ifBranch, elseBranch)); }
private DefaultConditionSpecification createSpecification() { Set<String> datasets = new HashSet<>(); Reflections.visit(condition, condition.getClass(), new PropertyFieldExtractor(properties), new DataSetFieldExtractor(datasets)); return new DefaultConditionSpecification(condition.getClass().getName(), name, description, properties, datasets); }
private DefaultConditionSpecification createSpecification() { Set<String> datasets = new HashSet<>(); Reflections.visit(condition, condition.getClass(), new PropertyFieldExtractor(properties), new DataSetFieldExtractor(datasets)); return new DefaultConditionSpecification(condition.getClass().getName(), name, description, properties, datasets); }