Added range type to subject-feature-definition/parameter
[groupbasedpolicy.git] / renderers / opflex / src / main / java / org / opendaylight / groupbasedpolicy / renderer / opflex / lib / messages / PolicyResolveResponse.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 java.util.List;
13
14 import org.opendaylight.groupbasedpolicy.jsonrpc.RpcMessage;
15
16 import com.fasterxml.jackson.annotation.JsonIgnore;
17 import com.fasterxml.jackson.databind.JsonNode;
18 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
19 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
20
21 @JsonSerialize
22 @JsonDeserialize
23 public class PolicyResolveResponse extends RpcMessage {
24
25     public static final String POLICY_MESSAGE_RESPONSE = "policy_resolve_response";
26
27     static public class Result {
28         private List<ManagedObject> policy;
29         public List<ManagedObject> getPolicy() {
30             return policy;
31         }
32         public void setPolicy(List<ManagedObject> policy) {
33             this.policy = policy;
34         }
35     }
36
37     private JsonNode id;
38     private Result result;
39     private OpflexError error;
40
41     @JsonIgnore
42     private String name;
43     @JsonIgnore
44     private String method;
45
46     @Override
47     public JsonNode getId() {
48         return id;
49     }
50
51     @Override
52     public void setId(JsonNode id) {
53         this.id = id;
54     }
55
56     public OpflexError getError() {
57         return error;
58     }
59
60     public void setError(OpflexError error) {
61         this.error = error;
62     }
63
64     @Override
65     public String getMethod() {
66         return null;
67     }
68
69     @Override
70     public void setMethod(String method) {
71     }
72
73     public Result getResult() {
74         return this.result;
75     }
76
77     public void setResult(Result result) {
78         this.result = result;
79     }
80
81     public PolicyResolveResponse(String name) {
82         this.name = name;
83     }
84
85     public PolicyResolveResponse() {
86         this.name = POLICY_MESSAGE_RESPONSE;
87     }
88
89     @Override
90     public String getName() {
91         return this.name;
92     }
93
94     @Override
95     public void setName(String name) {
96         this.name = name;
97     }
98
99     @JsonIgnore
100     @Override
101     public boolean valid() {
102         return true;
103     }
104
105
106 }