[DMAAP-BC] Consolidate bus controller repos
[dmaap/buscontroller.git] / dmaap-bc / src / main / java / org / onap / dmaap / dbcapi / model / Dmaap.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * org.onap.dmaap
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.dmaap.dbcapi.model;
22
23 import javax.xml.bind.annotation.XmlRootElement;
24
25 @XmlRootElement
26 public class Dmaap extends DmaapObject {
27         
28         private String version;
29         private String topicNsRoot;
30         private String dmaapName;
31         private String drProvUrl;
32         private String  bridgeAdminTopic;
33         private String loggingUrl;
34         private String nodeKey;
35         private String  accessKeyOwner;
36
37
38         // no-op constructor used by framework
39         public Dmaap() {
40                 
41         }
42         
43         public Dmaap( DmaapBuilder builder ) {
44                 this.version = builder.ver;
45                 this.topicNsRoot = builder.tnr;
46                 this.dmaapName = builder.dn;
47                 this.drProvUrl = builder.dpu;
48                 this.bridgeAdminTopic = builder.bat;
49                 this.loggingUrl = builder.lu;
50                 this.nodeKey = builder.nk;
51                 this.accessKeyOwner = builder.ako;
52                 this.setStatus( DmaapObject_Status.NEW );
53
54         }
55
56         public static class DmaapBuilder {
57                 private String ver;
58                 private String tnr;
59                 private String dn;
60                 private String dpu;
61                 private String lu;
62                 private String bat;
63                 private String nk;
64                 private String ako;
65
66                 public DmaapBuilder setVer(String ver) {
67                         this.ver = ver;
68                         return this;
69                 }
70
71                 public DmaapBuilder setTnr(String tnr) {
72                         this.tnr = tnr;
73                         return this;
74                 }
75
76                 public DmaapBuilder setDn(String dn) {
77                         this.dn = dn;
78                         return this;
79                 }
80
81                 public DmaapBuilder setDpu(String dpu) {
82                         this.dpu = dpu;
83                         return this;
84                 }
85
86                 public DmaapBuilder setLu(String lu) {
87                         this.lu = lu;
88                         return this;
89                 }
90
91                 public DmaapBuilder setBat(String bat) {
92                         this.bat = bat;
93                         return this;
94                 }
95
96                 public DmaapBuilder setNk(String nk) {
97                         this.nk = nk;
98                         return this;
99                 }
100
101                 public DmaapBuilder setAko(String ako) {
102                         this.ako = ako;
103                         return this;
104                 }
105
106                 public Dmaap createDmaap() {
107                         return new Dmaap(this);
108                 }
109         }
110
111         public String getVersion() {
112                 return version;
113         }
114
115         public void setVersion(String version) {
116                 this.version = version;
117         }
118
119         public String getTopicNsRoot() {
120                 return topicNsRoot;
121         }
122
123         public void setTopicNsRoot(String topicNsRoot) {
124                 this.topicNsRoot = topicNsRoot;
125         }
126
127         public String getDmaapName() {
128                 return dmaapName;
129         }
130
131         public void setDmaapName(String dmaapName) {
132                 this.dmaapName = dmaapName;
133         }
134
135         public String getDrProvUrl() {
136                 return drProvUrl;
137         }
138
139         public void setDrProvUrl(String drProvUrl) {
140                 this.drProvUrl = drProvUrl;
141         }
142
143
144         public String getNodeKey() {
145                 return nodeKey;
146         }
147
148         public void setNodeKey(String nodeKey) {
149                 this.nodeKey = nodeKey;
150         }
151
152         public String getAccessKeyOwner() {
153                 return accessKeyOwner;
154         }
155
156         public void setAccessKeyOwner(String accessKeyOwner) {
157                 this.accessKeyOwner = accessKeyOwner;
158         }
159
160         
161         public String getBridgeAdminTopic() {
162                 return bridgeAdminTopic;
163         }
164
165         public void setBridgeAdminTopic(String bridgeAdminTopic) {
166                 this.bridgeAdminTopic = bridgeAdminTopic;
167         }
168
169         public String getLoggingUrl() {
170                 return loggingUrl;
171         }
172
173         public void setLoggingUrl(String loggingUrl) {
174                 this.loggingUrl = loggingUrl;
175         }
176
177 }