SDC Tosca Parser getEntity API
[sdc/sdc-tosca.git] / src / main / java / org / onap / sdc / tosca / parser / elements / queries / TopologyTemplateQuery.java
1 package org.onap.sdc.tosca.parser.elements.queries;
2
3 import org.onap.sdc.tosca.parser.enums.SdcTypes;
4
5 /**
6  * This class describes a node template instance containing an entity searched and retrieved by SDC Tosca Parser API
7  * It is used as the API input parameter. See the {@link org.onap.sdc.tosca.parser.api.ISdcCsarHelper}
8  */
9 public class TopologyTemplateQuery {
10
11     public void setCustomizationUUID(String customizationUUID) {
12         this.customizationUUID = customizationUUID;
13     }
14
15     private final SdcTypes sdcType;
16
17     private String customizationUUID;
18
19     private TopologyTemplateQuery(SdcTypes sdcType) {
20         this.sdcType = sdcType;
21     }
22
23     public static TopologyTemplateQueryBuilder newBuilder(SdcTypes sdcType) {
24         return new TopologyTemplateQueryBuilder(sdcType);
25     }
26
27     public SdcTypes getNodeTemplateType() {
28         return sdcType;
29     }
30
31     public String getCustomizationUUID() {
32         return customizationUUID;
33     }
34
35     public static class TopologyTemplateQueryBuilder {
36         private TopologyTemplateQuery topologyTemplateQuery;
37         private TopologyTemplateQueryBuilder(SdcTypes sdcType) { topologyTemplateQuery = new TopologyTemplateQuery(sdcType);}
38
39         public TopologyTemplateQueryBuilder customizationUUID(String customizationUUID) {
40             topologyTemplateQuery.setCustomizationUUID(customizationUUID);
41             return this;
42         }
43
44         public TopologyTemplateQuery build() {
45             return topologyTemplateQuery;
46         }
47     }
48
49 }