3d25d7c955359c691714ae1aaf8ec2d583ed5c4f
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / stmt / NotificationStatement.java
1 /*
2  * Copyright (c) 2015 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.yangtools.yang.model.api.stmt;
9
10 import com.google.common.collect.ImmutableList;
11 import java.util.Collection;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
15
16 public interface NotificationStatement extends DeclaredStatement<QName>, DataDefinitionContainer.WithReusableDefinitions, DocumentationGroup.WithStatus {
17
18     @Nonnull QName getName();
19
20     /**
21      * All implementations should override this method.
22      * The default definition of this method is used only in YANG 1.0 (RFC6020) implementation of
23      * NotificationStatement which does not support must statements.
24      * YANG notification statement has been changed in YANG 1.1 (RFC7950) and now allows must statements.
25      *
26      * @return collection of must statements
27      */
28      // FIXME: version 2.0.0: make this method non-default
29     @Nonnull default Collection<? extends MustStatement> getMusts() {
30         return ImmutableList.of();
31     }
32 }