7cc4d31bcfba830a8def45233b60e46b86fcbef5
[netconf.git] /
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
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 package org.opendaylight.restconf.nb.rfc8040.rests.utils;
9
10 import java.net.URI;
11 import org.opendaylight.yangtools.yang.common.QName;
12 import org.opendaylight.yangtools.yang.common.QNameModule;
13
14 /**
15  * Constants for RestconfDataService.
16  *
17  */
18 public final class RestconfDataServiceConstant {
19
20     public static final QName NETCONF_BASE_QNAME  = QName.create(QNameModule.create(URI.create(PutData.NETCONF_BASE)),
21         PutData.NETCONF_BASE_PAYLOAD_NAME);
22
23     private RestconfDataServiceConstant() {
24         throw new UnsupportedOperationException("Util class.");
25     }
26
27     /**
28      * Constants for read data.
29      *
30      */
31     public static final class ReadData {
32         // URI parameters
33         public static final String CONTENT = "content";
34         public static final String DEPTH = "depth";
35         public static final String FIELDS = "fields";
36
37         // content values
38         public static final String CONFIG = "config";
39         public static final String ALL = "all";
40         public static final String NONCONFIG = "nonconfig";
41
42         // depth values
43         public static final String UNBOUNDED = "unbounded";
44         public static final int MIN_DEPTH = 1;
45         public static final int MAX_DEPTH = 65535;
46
47         public static final String READ_TYPE_TX = "READ";
48         public static final String WITH_DEFAULTS = "with-defaults";
49         public static final String REPORT_ALL_DEFAULT_VALUE = "report-all";
50         public static final String REPORT_ALL_TAGGED_DEFAULT_VALUE = "report-all-tagged";
51
52         private ReadData() {
53             throw new UnsupportedOperationException("Util class.");
54         }
55     }
56
57     /**
58      * Constants for data to put.
59      *
60      */
61     public static final class PutData {
62         public static final String NETCONF_BASE = "urn:ietf:params:xml:ns:netconf:base:1.0";
63         public static final String NETCONF_BASE_PAYLOAD_NAME = "data";
64         public static final String PUT_TX_TYPE = "PUT";
65
66         private PutData() {
67             throw new UnsupportedOperationException("Util class.");
68         }
69     }
70
71     /**
72      * Constants for data to post.
73      *
74      */
75     public static final class PostData {
76         public static final String POST_TX_TYPE = "POST";
77
78         private PostData() {
79             throw new UnsupportedOperationException("Util class.");
80         }
81     }
82
83     /**
84      * Constants for data to delete.
85      *
86      */
87     public static final class DeleteData {
88         public static final String DELETE_TX_TYPE = "DELETE";
89
90         private DeleteData() {
91             throw new UnsupportedOperationException("Util class.");
92         }
93     }
94
95     /**
96      * Constants for data to yang patch.
97      *
98      */
99     public static final class PatchData {
100         public static final String PATCH_TX_TYPE = "Patch";
101
102         private PatchData() {
103             throw new UnsupportedOperationException("Util class.");
104         }
105     }
106 }