DMAAP-MR - Merge MR repos
[dmaap/messagerouter/messageservice.git] / src / main / java / org / onap / dmaap / dmf / mr / beans / TopicBean.java
1 /**
2  * 
3  */
4 /*******************************************************************************
5  *  ============LICENSE_START=======================================================
6  *  org.onap.dmaap
7  *  ================================================================================
8  *  Copyright © 2017 AT&T Intellectual Property. All rights reserved.
9  *  ================================================================================
10  *  Licensed under the Apache License, Version 2.0 (the "License");
11  *  you may not use this file except in compliance with the License.
12  *  You may obtain a copy of the License at
13  *        http://www.apache.org/licenses/LICENSE-2.0
14 *  
15  *  Unless required by applicable law or agreed to in writing, software
16  *  distributed under the License is distributed on an "AS IS" BASIS,
17  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  *  See the License for the specific language governing permissions and
19  *  limitations under the License.
20  *  ============LICENSE_END=========================================================
21  *  
22  *  ECOMP is a trademark and service mark of AT&T Intellectual Property.
23  *  
24  *******************************************************************************/
25 package org.onap.dmaap.dmf.mr.beans;
26
27 import javax.xml.bind.annotation.XmlRootElement;
28 import java.io.Serializable;
29
30 /**
31  * @author muzainulhaque.qazi
32  *
33  */
34 @XmlRootElement
35 public class TopicBean implements Serializable {
36
37         private static final long serialVersionUID = -8620390377775457949L;
38         private String topicName;
39         private String topicDescription;
40
41         private int partitionCount;
42         private int replicationCount;
43
44         private boolean transactionEnabled;
45
46         /**
47          * constructor
48          */
49         public TopicBean() {
50                 super();
51         }
52
53         /**
54          * constructor initialization with topic details name, description,
55          * partition, replication, transaction
56          * 
57          * @param topicName
58          * @param description
59          * @param partitionCount
60          * @param replicationCount
61          * @param transactionEnabled
62          */
63         public TopicBean(String topicName, String topicDescription, int partitionCount, int replicationCount,
64                         boolean transactionEnabled) {
65                 super();
66                 this.topicName = topicName;
67                 this.topicDescription = topicDescription;
68                 this.partitionCount = partitionCount;
69                 this.replicationCount = replicationCount;
70                 this.transactionEnabled = transactionEnabled;
71         }
72
73         /**
74          * @return
75          * returns topic name which is of String type
76          */
77         public String getTopicName() {
78                 return topicName;
79         }
80
81         /**
82          * @param topicName
83          * set topic name  
84          */
85         public void setTopicName(String topicName) {
86                 this.topicName = topicName;
87         }
88
89
90         /**
91          * @return
92          * returns partition count which is of int type
93          */
94         public int getPartitionCount() {
95                 return partitionCount;
96         }
97
98         /**
99          * @param partitionCount
100          * set partition Count 
101          */
102         public void setPartitionCount(int partitionCount) {
103                 this.partitionCount = partitionCount;
104         }
105         
106         /**
107          * @return
108          * returns replication count which is of int type
109          */
110         public int getReplicationCount() {
111                 return replicationCount;
112         }
113         
114         /**
115          * @param
116          * set replication count which is of int type
117          */
118         public void setReplicationCount(int replicationCount) {
119                 this.replicationCount = replicationCount;
120         }
121         
122         /**
123          * @return
124          * returns boolean value which indicates whether transaction is Enabled 
125          */
126         public boolean isTransactionEnabled() {
127                 return transactionEnabled;
128         }
129         
130         /**
131          * @param
132          * sets boolean value which indicates whether transaction is Enabled 
133          */
134         public void setTransactionEnabled(boolean transactionEnabled) {
135                 this.transactionEnabled = transactionEnabled;
136         }
137
138         /**
139          * 
140          * @return returns description which is of String type
141          */
142         public String getTopicDescription() {
143                 return topicDescription;
144         }
145         /**
146          * 
147          * @param topicDescription
148          * set description which is of String type
149          */
150         public void setTopicDescription(String topicDescription) {
151                 this.topicDescription = topicDescription;
152         }
153
154 }