X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=mod%2Fbpgenerator%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fblueprintgenerator%2Fmodels%2Fdmaapbp%2FDmaapNode.java;h=9069f8231ef447b697690aa7b1409009c746055a;hb=04f13ef80c6e79d8c0b7b3fa1faeeaa0def1584e;hp=e28e49a707ba0a10837196db872da5cbfc913bcb;hpb=f51b3e1a957ede6c263d0c3634f36c7fcfbb95ff;p=dcaegen2%2Fplatform.git diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/dmaapbp/DmaapNode.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/dmaapbp/DmaapNode.java index e28e49a..9069f82 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/dmaapbp/DmaapNode.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/dmaapbp/DmaapNode.java @@ -46,6 +46,14 @@ import lombok.Setter; import static org.onap.blueprintgenerator.common.blueprint.BlueprintHelper.isDataRouterType; import static org.onap.blueprintgenerator.common.blueprint.BlueprintHelper.isMessageRouterType; +import static org.onap.blueprintgenerator.models.blueprint.BpConstants.CONTENERIZED_SERVICE_COMPONENT_USING_DMAAP; +import static org.onap.blueprintgenerator.models.blueprint.BpConstants.FEED; +import static org.onap.blueprintgenerator.models.blueprint.BpConstants.TOPIC; +import static org.onap.blueprintgenerator.models.blueprint.BpConstants.PUBLISH_EVENTS; +import static org.onap.blueprintgenerator.models.blueprint.BpConstants.PUBLISH_FILES; +import static org.onap.blueprintgenerator.models.blueprint.BpConstants.SUBSCRIBE_TO_EVENTS; +import static org.onap.blueprintgenerator.models.blueprint.BpConstants.SUBSCRIBE_TO_FILES; + @JsonIgnoreProperties(ignoreUnknown = true) @Getter @Setter @@ -60,7 +68,7 @@ public class DmaapNode extends Node { TreeMap> retInputs = inps; //set the type - this.setType("dcae.nodes.ContainerizedServiceComponentUsingDmaap"); + this.setType(CONTENERIZED_SERVICE_COMPONENT_USING_DMAAP); //create the interface Interfaces inter = new Interfaces(); @@ -116,7 +124,7 @@ public class DmaapNode extends Node { stringType.put("type", "string"); //set the type - this.setType("ccsdk.nodes.Feed"); + this.setType(FEED); //create and set the properties Properties props = new Properties(); @@ -137,7 +145,7 @@ public class DmaapNode extends Node { stringType.put("type", "string"); //set the type - this.setType("ccsdk.nodes.Topic"); + this.setType(TOPIC); //create and set the properties Properties props = new Properties(); @@ -154,10 +162,10 @@ public class DmaapNode extends Node { private LinkedHashMap createTypeAndTargetPubRelations(Publishes publishes) { LinkedHashMap pubRelations = new LinkedHashMap<>(); if (isMessageRouterType(publishes.getType())) { - pubRelations.put("type", "ccsdk.relationships.publish_events"); + pubRelations.put("type", PUBLISH_EVENTS); pubRelations.put("target", publishes.getConfig_key() + "_topic"); } else if (isDataRouterType(publishes.getType())) { - pubRelations.put("type", "ccsdk.relationships.publish_files"); + pubRelations.put("type", PUBLISH_FILES); pubRelations.put("target", publishes.getConfig_key() + "_feed"); } return pubRelations; @@ -166,10 +174,10 @@ public class DmaapNode extends Node { private LinkedHashMap createTypeAndTargetSubRelations(Subscribes subscribes) { LinkedHashMap subRelations = new LinkedHashMap<>(); if (isMessageRouterType(subscribes.getType())) { - subRelations.put("type", "ccsdk.relationships.subscribe_to_events"); + subRelations.put("type", SUBSCRIBE_TO_EVENTS); subRelations.put("target", subscribes.getConfig_key() + "_topic"); } else if (isDataRouterType(subscribes.getType())) { - subRelations.put("type", "ccsdk.relationships.subscribe_to_files"); + subRelations.put("type", SUBSCRIBE_TO_FILES); subRelations.put("target", subscribes.getConfig_key() + "_feed"); } return subRelations;