2 * Copyright (c) 2017 Pantheon Technologies, s.r.o. 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.yangtools.rfc6536.model.api;
10 import com.google.common.collect.ImmutableList;
12 import java.util.Collection;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
14 import org.opendaylight.yangtools.yang.common.QNameModule;
15 import org.opendaylight.yangtools.yang.common.Revision;
16 import org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier;
17 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
20 * Constants associated with RFC6536.
22 * @author Robert Varga
25 public final class NACMConstants {
26 private static final String MODULE_NAME = "ietf-netconf-acm";
27 private static final URI MODULE_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:ietf-netconf-acm");
28 private static final Revision RFC6536_REVISION = Revision.of("2012-02-22");
29 private static final Revision RFC8341_REVISION = Revision.of("2018-02-14");
32 * Runtime RFC6536 identity.
34 public static final QNameModule RFC6536_MODULE = QNameModule.create(MODULE_NAMESPACE, RFC6536_REVISION).intern();
37 * Runtime RFC8341 identity.
39 public static final QNameModule RFC8341_MODULE = QNameModule.create(MODULE_NAMESPACE, RFC8341_REVISION).intern();
42 * RFC6536 model source name.
44 public static final SourceIdentifier RFC6536_SOURCE = RevisionSourceIdentifier.create(MODULE_NAME,
48 * RFC8341 model source name.
50 public static final SourceIdentifier RFC8341_SOURCE = RevisionSourceIdentifier.create(MODULE_NAME,
54 * Normative prefix to use when importing {@link #RFC6536_SOURCE}.
56 public static final String MODULE_PREFIX = "nacm";
58 private NACMConstants() {
59 throw new UnsupportedOperationException();
63 * Return identifiers of all sources known to define NACM extension.
65 * @return Collection of identifiers.
67 public static Collection<SourceIdentifier> knownModelSources() {
68 return ImmutableList.of(RFC6536_SOURCE, RFC8341_SOURCE);