2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2018 Amdocs
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.logging.ref.slf4j.demo.bean;
24 import org.json.JSONObject;
27 * Base class for {@link Request} and {@link Response} beans, since
28 * they're almost the same thing.
30 public abstract class AbstractBean {
33 private String mService;
39 private String mSeverity;
43 * @return bean property.
45 public String getService() {
51 * @param service bean property.
53 public void setService(final String service) {
54 this.mService = service;
59 * @return bean property.
61 public String getCode() {
67 * @param code bean property.
69 public void setCode(final String code) {
75 * @return bean property.
77 public String getSeverity() {
78 return this.mSeverity;
83 * @param severity bean property.
85 public void setSeverity(final String severity) {
86 this.mSeverity = severity;
93 public String toString() {
94 return new JSONObject(this).toString(4);