2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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 package org.opendaylight.restconf.nb.rfc8040.rests.utils;
10 import com.google.common.collect.ImmutableSet;
12 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
13 import org.opendaylight.restconf.common.util.DataChangeScope;
14 import org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants;
15 import org.opendaylight.restconf.nb.rfc8040.utils.parser.builder.ParserBuilderConstants;
16 import org.opendaylight.yangtools.yang.common.QName;
17 import org.opendaylight.yangtools.yang.common.QNameModule;
18 import org.opendaylight.yangtools.yang.common.Revision;
19 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
22 * Constants for streams.
25 public final class RestconfStreamsConstants {
26 public static final String SAL_REMOTE_NAMESPACE = "urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote";
28 public static final String DATASTORE_PARAM_NAME = "datastore";
30 private static final URI NAMESPACE_EVENT_SUBSCRIPTION_AUGMENT = URI.create("urn:sal:restconf:event:subscription");
32 public static final QNameModule SAL_REMOTE_AUGMENT = QNameModule.create(NAMESPACE_EVENT_SUBSCRIPTION_AUGMENT,
33 Revision.of("2014-07-08")).intern();
35 public static final AugmentationIdentifier SAL_REMOTE_AUG_IDENTIFIER = new AugmentationIdentifier(
36 ImmutableSet.of(QName.create(SAL_REMOTE_AUGMENT, "scope"), QName.create(SAL_REMOTE_AUGMENT, "datastore"),
37 QName.create(SAL_REMOTE_AUGMENT, "notification-output-type")));
39 public static final DataChangeScope DEFAULT_SCOPE = DataChangeScope.BASE;
41 public static final LogicalDatastoreType DEFAULT_DS = LogicalDatastoreType.CONFIGURATION;
43 public static final String SCOPE_PARAM_NAME = "scope";
45 public static final char EQUAL = ParserBuilderConstants.Deserializer.EQUAL;
47 public static final String DS_URI = RestconfConstants.SLASH + DATASTORE_PARAM_NAME + EQUAL;
49 public static final String SCOPE_URI = RestconfConstants.SLASH + SCOPE_PARAM_NAME + EQUAL;
51 public static final int NOTIFICATION_PORT = 8181;
53 public static final String SCHEMA_SUBSCIBRE_URI = "ws";
55 public static final CharSequence DATA_SUBSCR = "data-change-event-subscription";
56 public static final CharSequence CREATE_DATA_SUBSCR = "create-" + DATA_SUBSCR;
58 public static final CharSequence NOTIFICATION_STREAM = "notification-stream";
59 public static final CharSequence CREATE_NOTIFICATION_STREAM = "create-" + NOTIFICATION_STREAM;
61 public static final String STREAMS_PATH = "ietf-restconf-monitoring:restconf-state/streams";
62 public static final String STREAM_PATH_PART = "/stream=";
63 public static final String STREAM_PATH = STREAMS_PATH + STREAM_PATH_PART;
64 public static final String STREAM_ACCESS_PATH_PART = "/access=";
65 public static final String STREAM_LOCATION_PATH_PART = "/location";
67 private RestconfStreamsConstants() {
68 throw new UnsupportedOperationException("Util class.");