Adjust to yangtools-2.0.0/odlparent-3.0.0 changes
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / utils / RestconfDataServiceConstant.java
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 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
50         private ReadData() {
51             throw new UnsupportedOperationException("Util class.");
52         }
53     }
54
55     /**
56      * Constants for data to put.
57      *
58      */
59     public final class PutData {
60         public static final String NETCONF_BASE = "urn:ietf:params:xml:ns:netconf:base:1.0";
61         public static final String NETCONF_BASE_PAYLOAD_NAME = "data";
62         public static final String PUT_TX_TYPE = "PUT";
63
64         private PutData() {
65             throw new UnsupportedOperationException("Util class.");
66         }
67     }
68
69     /**
70      * Constants for data to post.
71      *
72      */
73     public final class PostData {
74         public static final String POST_TX_TYPE = "POST";
75
76         private PostData() {
77             throw new UnsupportedOperationException("Util class.");
78         }
79     }
80
81     /**
82      * Constants for data to delete.
83      *
84      */
85     public final class DeleteData {
86         public static final String DELETE_TX_TYPE = "DELETE";
87
88         private DeleteData() {
89             throw new UnsupportedOperationException("Util class.");
90         }
91     }
92
93     /**
94      * Constants for data to yang patch.
95      *
96      */
97     public final class PatchData {
98         public static final String PATCH_TX_TYPE = "Patch";
99
100         private PatchData() {
101             throw new UnsupportedOperationException("Util class.");
102         }
103     }
104 }