Separating renderers into features.
[groupbasedpolicy.git] / renderers / opflex / src / main / java / org / opendaylight / groupbasedpolicy / renderer / opflex / lib / messages / PolicyUpdateResponse.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.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 PolicyUpdateResponse extends RpcMessage {
22
23     public static final String UPDATE_MESSAGE_RESPONSE = "policy_update_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
64     public Result getResult() {
65         return this.result;
66     }
67
68     public void setResult(Result result) {
69         this.result = result;
70     }
71
72     public PolicyUpdateResponse(String name) {
73         this.name = name;
74     }
75
76     public PolicyUpdateResponse() {
77         this.name = UPDATE_MESSAGE_RESPONSE;
78     }
79
80     @Override
81     public String getName() {
82         return this.name;
83     }
84
85     @Override
86     public void setName(String name) {
87         this.name = name;
88     }
89
90     @JsonIgnore
91     @Override
92     public boolean valid() {
93         return true;
94     }
95
96
97 }