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 PolicyUnresolveRequest extends RpcMessage {
26 public static final String UNRESOLVE_MESSAGE = "policy_unresolve";
28 static public class Params {
29 private String subject;
30 private Uri policy_uri;
31 private PolicyIdentity policy_ident;
32 public String getSubject() {
35 public void setSubject(String subject) {
36 this.subject = subject;
38 public Uri getPolicy_uri() {
41 public void setPolicy_uri(Uri policy_uri) {
42 this.policy_uri = policy_uri;
44 public PolicyIdentity getPolicy_ident() {
47 public void setPolicy_ident(PolicyIdentity policy_ident) {
48 this.policy_ident = policy_ident;
52 private String method;
53 private List<Params> params;
59 public JsonNode getId() {
64 public void setId(JsonNode id) {
69 public String getMethod() {
74 public void setMethod(String method) {
78 public List<Params> getParams() {
82 public void setParams(List<Params> params) {
87 public String getName() {
92 public void setName(String name) {
96 public PolicyUnresolveRequest(String name) {
100 public PolicyUnresolveRequest() {
101 this.name = UNRESOLVE_MESSAGE;
102 this.method = UNRESOLVE_MESSAGE;
106 * Minimal check on validity of message
107 * @return true if message has passed validity check
111 public boolean valid() {
114 if (params.get(0) == null)