Feature uses features-parent as parent
[groupbasedpolicy.git] / renderers / opflex / src / main / java / org / opendaylight / groupbasedpolicy / renderer / opflex / lib / messages / StateReportResponse.java
1 /*
2  * Copyright (C) 2014 Cisco Systems, Inc.
3  * 
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  * 
8  * Authors : Thomas Bachman
9  */
10 package org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages;
11
12 import org.opendaylight.groupbasedpolicy.renderer.opflex.jsonrpc.RpcMessage;
13
14 import com.fasterxml.jackson.annotation.JsonIgnore;
15 import com.fasterxml.jackson.databind.JsonNode;
16 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
17 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
18
19 @JsonSerialize
20 @JsonDeserialize
21 public class StateReportResponse extends RpcMessage {
22
23     public static final String REPORT_MESSAGE_RESPONSE = "trigger_policy_response";
24
25     static public class Result {
26     }
27
28     private JsonNode id;
29     private Result result;
30     private OpflexError error;
31
32     @JsonIgnore
33     private String name;
34     @JsonIgnore
35     private String method;
36
37     @Override
38     public JsonNode getId() {
39         return id;
40     }
41
42     @Override
43     public void setId(JsonNode id) {
44         this.id = id;
45     }
46
47     public OpflexError getError() {
48         return error;
49     }
50
51     public void setError(OpflexError error) {
52         this.error = error;
53     }
54
55     @Override
56     public String getMethod() {
57         return null;
58     }
59
60     @Override
61     public void setMethod(String method) {}
62
63     public Result getResult() {
64         return this.result;
65     }
66
67     public void setResult(Result result) {
68         this.result = result;
69     }
70
71     public StateReportResponse(String name) {
72         this.name = name;
73     }
74
75     public StateReportResponse() {
76         this.name = REPORT_MESSAGE_RESPONSE;
77     }
78
79     @Override
80     public String getName() {
81         return this.name;
82     }
83
84     @Override
85     public void setName(String name) {
86         this.name = name;
87     }
88
89     @JsonIgnore
90     @Override
91     public boolean valid() {
92         return true;
93     }
94
95 }