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.renderer.opflex.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 {
30 private String subject;
31 private Uri policy_uri;
32 private PolicyIdentity policy_ident;
36 public String getSubject() {
40 public void setSubject(String subject) {
41 this.subject = subject;
44 public Uri getPolicy_uri() {
48 public void setPolicy_uri(Uri policy_uri) {
49 this.policy_uri = policy_uri;
52 public PolicyIdentity getPolicy_ident() {
56 public void setPolicy_ident(PolicyIdentity policy_ident) {
57 this.policy_ident = policy_ident;
60 public String getData() {
64 public void setData(String data) {
72 public void setPrr(int prr) {
78 private String method;
79 private List<Params> params;
85 public JsonNode getId() {
90 public void setId(JsonNode id) {
95 public String getMethod() {
100 public void setMethod(String method) {
101 this.method = method;
104 public List<Params> getParams() {
108 public void setParams(List<Params> params) {
109 this.params = params;
113 public String getName() {
118 public void setName(String name) {
122 public PolicyResolveRequest(String name) {
126 public PolicyResolveRequest() {
127 this.name = RESOLVE_MESSAGE;
128 this.method = RESOLVE_MESSAGE;
132 * Minimal check on validity of message
134 * @return true if message has passed validity check
138 public boolean valid() {
141 if (params.get(0) == null)