Added CorsConfigurer class and cleaned up typos
[so.git] / so-monitoring / so-monitoring-handler / src / main / java / org / onap / so / monitoring / camunda / model / ProcessDefinition.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  * 
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  * 
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * 
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20 package org.onap.so.monitoring.camunda.model;
21
22 import static org.onap.so.monitoring.utils.ObjectEqualsUtils.isEqual;
23
24 import com.fasterxml.jackson.annotation.JsonIgnore;
25 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
26
27 /**
28  * @author waqas.ikram@ericsson.com
29  *
30  */
31 @JsonIgnoreProperties(ignoreUnknown = true)
32 public class ProcessDefinition {
33
34     private String id;
35     private String bpmn20Xml;
36
37     public ProcessDefinition() {}
38
39     /**
40      * @return the id
41      */
42     public String getId() {
43         return id;
44     }
45
46     /**
47      * @param id the id to set
48      */
49     public void setId(final String id) {
50         this.id = id;
51     }
52
53     /**
54      * @return the bpmn20Xml
55      */
56     public String getBpmn20Xml() {
57         return bpmn20Xml;
58     }
59
60     /**
61      * @param bpmn20Xml the bpmn20Xml to set
62      */
63     public void setBpmn20Xml(final String bpmn20Xml) {
64         this.bpmn20Xml = bpmn20Xml;
65     }
66
67     @JsonIgnore
68     @Override
69     public int hashCode() {
70         final int prime = 31;
71         int result = 1;
72         result = prime * result + ((id == null) ? 0 : id.hashCode());
73         result = prime * result + ((bpmn20Xml == null) ? 0 : bpmn20Xml.hashCode());
74         return result;
75     }
76
77     @JsonIgnore
78     @Override
79     public boolean equals(final Object obj) {
80         if (obj instanceof ProcessDefinition) {
81             final ProcessDefinition other = (ProcessDefinition) obj;
82             return isEqual(id, other.id) && isEqual(bpmn20Xml, other.bpmn20Xml);
83         }
84         return false;
85     }
86
87
88 }