2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2018 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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.so.client.sdnc.beans;
23 import java.io.Serializable;
24 import java.util.UUID;
25 import org.onap.so.client.sdnc.endpoint.SDNCTopology;
26 import org.apache.commons.lang3.builder.HashCodeBuilder;
27 import org.apache.commons.lang3.builder.EqualsBuilder;
29 public class SDNCRequest implements Serializable {
34 private static final long serialVersionUID = 4679678988657593282L;
35 private String timeOut = "PT1H";
36 private SDNCTopology topology;
37 private String correlationValue = UUID.randomUUID().toString();
38 private String correlationName = "SDNCCallback";
39 private Object sdncPayload;
42 public String getTimeOut() {
46 public void setTimeOut(String timeOut) {
47 this.timeOut = timeOut;
50 public SDNCTopology getTopology() {
54 public void setTopology(SDNCTopology topology) {
55 this.topology = topology;
58 public String getCorrelationValue() {
59 return correlationValue;
62 public void setCorrelationValue(String correlationValue) {
63 this.correlationValue = correlationValue;
66 public String getCorrelationName() {
67 return correlationName;
70 public void setCorrelationName(String correlationName) {
71 this.correlationName = correlationName;
74 public Object getSDNCPayload() {
78 public void setSDNCPayload(Object sDNCPayload) {
79 this.sdncPayload = sDNCPayload;
83 public boolean equals(final Object other) {
84 if (!(other instanceof SDNCRequest)) {
87 SDNCRequest castOther = (SDNCRequest) other;
88 return new EqualsBuilder().append(correlationValue, castOther.correlationValue)
89 .append(correlationName, castOther.correlationName).isEquals();
93 public int hashCode() {
94 return new HashCodeBuilder().append(correlationValue).append(correlationName).toHashCode();