2 * Copyright (C) 2014 Cisco Systems, Inc.
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
8 * Authors : Thomas Bachman
10 package org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages;
12 import java.util.List;
14 import org.opendaylight.groupbasedpolicy.jsonrpc.RpcMessage;
15 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Uri;
17 import com.fasterxml.jackson.annotation.JsonIgnore;
18 import com.fasterxml.jackson.databind.JsonNode;
19 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
20 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
24 public class PolicyResolveRequest extends RpcMessage {
26 public static final String RESOLVE_MESSAGE = "policy_resolve";
28 static public class Params {
29 private String subject;
30 private Uri policy_uri;
31 private PolicyIdentity policy_ident;
35 public String getSubject() {
38 public void setSubject(String subject) {
39 this.subject = subject;
41 public Uri getPolicy_uri() {
44 public void setPolicy_uri(Uri policy_uri) {
45 this.policy_uri = policy_uri;
47 public PolicyIdentity getPolicy_ident() {
50 public void setPolicy_ident(PolicyIdentity policy_ident) {
51 this.policy_ident = policy_ident;
53 public String getData() {
56 public void setData(String data) {
62 public void setPrr(int prr) {
68 private String method;
69 private List<Params> params;
75 public JsonNode getId() {
80 public void setId(JsonNode id) {
85 public String getMethod() {
90 public void setMethod(String method) {
94 public List<Params> getParams() {
98 public void setParams(List<Params> params) {
103 public String getName() {
108 public void setName(String name) {
112 public PolicyResolveRequest(String name) {
116 public PolicyResolveRequest() {
117 this.name = RESOLVE_MESSAGE;
118 this.method = RESOLVE_MESSAGE;
122 * Minimal check on validity of message
123 * @return true if message has passed validity check
127 public boolean valid() {
130 if (params.get(0) == null)