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 static java.util.Objects.requireNonNull;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
14 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
15 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
18 * {@link StatementDefinition}s for statements defined by RFC6536.
20 * @author Robert Varga
22 public enum NACMStatements implements StatementDefinition {
23 DEFAULT_DENY_ALL(QName.create(NACMConstants.RFC6536_MODULE, "default-deny-all"), DefaultDenyAllStatement.class,
24 DefaultDenyAllEffectiveStatement.class),
25 DEFAULT_DENY_WRITE(QName.create(NACMConstants.RFC6536_MODULE, "default-deny-write"),
26 DefaultDenyWriteStatement.class, DefaultDenyWriteEffectiveStatement.class);
28 private final Class<? extends EffectiveStatement<?, ?>> effectiveRepresentation;
29 private final Class<? extends DeclaredStatement<?>> declaredRepresentation;
30 private final QName statementName;
32 NACMStatements(final QName statementName, final Class<? extends DeclaredStatement<?>> declaredRepresentation,
33 final Class<? extends EffectiveStatement<?, ?>> effectiveRepresentation) {
34 this.statementName = statementName.intern();
35 this.declaredRepresentation = requireNonNull(declaredRepresentation);
36 this.effectiveRepresentation = requireNonNull(effectiveRepresentation);
40 public QName getArgumentName() {
45 public boolean isArgumentYinElement() {
50 public QName getStatementName() {
55 public Class<? extends EffectiveStatement<?, ?>> getEffectiveRepresentationClass() {
56 return effectiveRepresentation;
60 public Class<? extends DeclaredStatement<?>> getDeclaredRepresentationClass() {
61 return declaredRepresentation;