Search in sources :

Example 1 with HeaderDetails

use of org.finos.symphony.toolkit.workflow.form.HeaderDetails in project spring-bot by finos.

the class ReceiveController method createEntityJson.

public static EntityJson createEntityJson(ActiveWebHooks active, WebHook webhook, WebhookPayload payload) {
    EntityJson out = new EntityJson();
    out.put(PAYLOAD, payload);
    out.put(EntityJsonConverter.WORKFLOW_001, active);
    out.put(INVOKED_WEBHOOK, webhook);
    Set<HashTag> tags = new HashSet<>();
    tags.add(webhook.getHashTag());
    tags.add(webhook.getHookId());
    tags.addAll(TagSupport.classHashTags(webhook));
    tags.addAll(TagSupport.classHashTags(active));
    tags.addAll(TagSupport.classHashTags(payload));
    HeaderDetails hd = new HeaderDetails(webhook.getDisplayName(), "", tags);
    out.put("header", hd);
    return out;
}
Also used : EntityJson(org.finos.symphony.toolkit.json.EntityJson) HashTag(org.finos.symphony.toolkit.workflow.content.HashTag) HeaderDetails(org.finos.symphony.toolkit.workflow.form.HeaderDetails) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 EntityJson (org.finos.symphony.toolkit.json.EntityJson)1 HashTag (org.finos.symphony.toolkit.workflow.content.HashTag)1 HeaderDetails (org.finos.symphony.toolkit.workflow.form.HeaderDetails)1