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 PolicyUnresolveRequest extends RpcMessage {
26 public static final String UNRESOLVE_MESSAGE = "policy_unresolve";
28 static public class Params {
30 private String subject;
31 private Uri policy_uri;
32 private PolicyIdentity policy_ident;
34 public String getSubject() {
38 public void setSubject(String subject) {
39 this.subject = subject;
42 public Uri getPolicy_uri() {
46 public void setPolicy_uri(Uri policy_uri) {
47 this.policy_uri = policy_uri;
50 public PolicyIdentity getPolicy_ident() {
54 public void setPolicy_ident(PolicyIdentity policy_ident) {
55 this.policy_ident = policy_ident;
60 private String method;
61 private List<Params> params;
67 public JsonNode getId() {
72 public void setId(JsonNode id) {
77 public String getMethod() {
82 public void setMethod(String method) {
86 public List<Params> getParams() {
90 public void setParams(List<Params> params) {
95 public String getName() {
100 public void setName(String name) {
104 public PolicyUnresolveRequest(String name) {
108 public PolicyUnresolveRequest() {
109 this.name = UNRESOLVE_MESSAGE;
110 this.method = UNRESOLVE_MESSAGE;
114 * Minimal check on validity of message
116 * @return true if message has passed validity check
120 public boolean valid() {
123 if (params.get(0) == null)