bump the version
[dmaap/messagerouter/msgrtr.git] / src / main / java / org / onap / dmaap / dmf / mr / exception / DMaaPErrorMessages.java
1 /*******************************************************************************
2  *  ============LICENSE_START=======================================================
3  *  org.onap.dmaap
4  *  ================================================================================
5  *  Copyright © 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  *        http://www.apache.org/licenses/LICENSE-2.0
11 *  
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License.
17  *  ============LICENSE_END=========================================================
18  *  
19  *  ECOMP is a trademark and service mark of AT&T Intellectual Property.
20  *  
21  *******************************************************************************/
22 package org.onap.dmaap.dmf.mr.exception;
23
24 import javax.annotation.PostConstruct;
25
26 import org.springframework.beans.factory.annotation.Value;
27 import org.springframework.stereotype.Component;
28 import org.springframework.web.context.support.SpringBeanAutowiringSupport;
29
30 /**
31  * This Class reads the error message properties
32  * from the properties file
33  * @author rajashree.khare
34  *
35  */
36 @Component
37 public class DMaaPErrorMessages {
38
39         
40                         
41
42         //@Value("${resource.not.found}")
43         private String notFound="The requested resource was not found.Please verify the URL and try again";
44         
45 //      @Value("${server.unavailable}")
46         private String serverUnav="Server is temporarily unavailable or busy.Try again later, or try another server in the cluster.";
47         
48 //      @Value("${http.method.not.allowed}")
49         private String methodNotAllowed="The specified HTTP method is not allowed for the requested resource.Enter a valid HTTP method and try again.";
50         
51         //@Value("${incorrect.request.json}")
52         private String badRequest="Incorrect JSON object. Please correct the JSON format and try again.";
53         
54 //      @Value("${network.time.out}")
55         private String nwTimeout="Connection to the DMaaP MR was timed out.Please try again.";
56         
57         //@Value("${get.topic.failure}")
58         private String topicsfailure="Failed to retrieve list of all topics.";
59         
60         //@Value("${not.permitted.access.1}")
61         private String notPermitted1="Access Denied.User does not have permission to perform";
62         
63         //@Value("${not.permitted.access.2}")
64         private String notPermitted2="operation on Topic:";
65         
66         //@Value("${get.topic.details.failure}")
67         private String topicDetailsFail="Failed to retrieve details of topic:";
68         
69         //@Value("${create.topic.failure}")
70         private String createTopicFail="Failed to create topic:";
71         
72         //@Value("${delete.topic.failure}")
73         private String deleteTopicFail="Failed to delete topic:";
74         
75         //@Value("${incorrect.json}")
76         private String incorrectJson="Incorrect JSON object.Could not parse JSON. Please correct the JSON format and try again.";
77         
78         //@Value("${consume.msg.error}")
79         private String consumeMsgError="Error while reading data from topic.";
80         
81         //@Value("${publish.msg.error}")
82         private String publishMsgError="Error while publishing data to topic.";
83         
84         
85         //@Value("${publish.msg.count}")
86         private String publishMsgCount="Successfully published number of messages :";
87         
88         
89         //@Value("${authentication.failure}")
90         private String authFailure="Access Denied: Invalid Credentials. Enter a valid MechId and Password and try again.";
91         //@Value("${msg_size_exceeds}")
92         private String msgSizeExceeds="Message size exceeds the default size.";
93         
94         
95         //@Value("${topic.not.exist}")
96         private String topicNotExist="No such topic exists.";
97         
98         public String getMsgSizeExceeds() {
99                 return msgSizeExceeds;
100         }
101
102         public void setMsgSizeExceeds(String msgSizeExceeds) {
103                 this.msgSizeExceeds = msgSizeExceeds;
104         }
105
106         public String getNotFound() {
107                 return notFound;
108         }
109
110         public void setNotFound(String notFound) {
111                 this.notFound = notFound;
112         }
113
114         public String getServerUnav() {
115                 return serverUnav;
116         }
117
118         public void setServerUnav(String serverUnav) {
119                 this.serverUnav = serverUnav;
120         }
121
122         public String getMethodNotAllowed() {
123                 return methodNotAllowed;
124         }
125
126         public void setMethodNotAllowed(String methodNotAllowed) {
127                 this.methodNotAllowed = methodNotAllowed;
128         }
129
130         public String getBadRequest() {
131                 return badRequest;
132         }
133
134         public void setBadRequest(String badRequest) {
135                 this.badRequest = badRequest;
136         }
137
138         public String getNwTimeout() {
139                 return nwTimeout;
140         }
141
142         public void setNwTimeout(String nwTimeout) {
143                 this.nwTimeout = nwTimeout;
144         }
145
146         public String getNotPermitted1() {
147                 return notPermitted1;
148         }
149
150         public void setNotPermitted1(String notPermitted1) {
151                 this.notPermitted1 = notPermitted1;
152         }
153
154         public String getNotPermitted2() {
155                 return notPermitted2;
156         }
157
158         public void setNotPermitted2(String notPermitted2) {
159                 this.notPermitted2 = notPermitted2;
160         }
161
162         public String getTopicsfailure() {
163                 return topicsfailure;
164         }
165
166         public void setTopicsfailure(String topicsfailure) {
167                 this.topicsfailure = topicsfailure;
168         }
169
170         public String getTopicDetailsFail() {
171                 return topicDetailsFail;
172         }
173
174         public void setTopicDetailsFail(String topicDetailsFail) {
175                 this.topicDetailsFail = topicDetailsFail;
176         }
177
178         public String getCreateTopicFail() {
179                 return createTopicFail;
180         }
181
182         public void setCreateTopicFail(String createTopicFail) {
183                 this.createTopicFail = createTopicFail;
184         }
185
186         public String getIncorrectJson() {
187                 return incorrectJson;
188         }
189
190         public void setIncorrectJson(String incorrectJson) {
191                 this.incorrectJson = incorrectJson;
192         }
193
194         public String getDeleteTopicFail() {
195                 return deleteTopicFail;
196         }
197
198         public void setDeleteTopicFail(String deleteTopicFail) {
199                 this.deleteTopicFail = deleteTopicFail;
200         }
201
202         public String getConsumeMsgError() {
203                 return consumeMsgError;
204         }
205
206         public void setConsumeMsgError(String consumeMsgError) {
207                 this.consumeMsgError = consumeMsgError;
208         }
209
210         public String getPublishMsgError() {
211                 return publishMsgError;
212         }
213
214         public void setPublishMsgError(String publishMsgError) {
215                 this.publishMsgError = publishMsgError;
216         }
217
218         public String getPublishMsgCount() {
219                 return publishMsgCount;
220         }
221
222         public String getAuthFailure() {
223                 return authFailure;
224         }
225
226         public void setAuthFailure(String authFailure) {
227                 this.authFailure = authFailure;
228         }
229
230         public void setPublishMsgCount(String publishMsgCount) {
231                 this.publishMsgCount = publishMsgCount;
232         }
233
234         public String getTopicNotExist() {
235                 return topicNotExist;
236         }
237
238         public void setTopicNotExist(String topicNotExist) {
239                 this.topicNotExist = topicNotExist;
240         }
241         
242         
243         @PostConstruct
244         public void init() {
245             SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
246         }
247         
248 }