Bug 6896: [YANG 1.1] Add support for new statement "action"
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / stmt / ActionStatementContainer.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
9 package org.opendaylight.yangtools.yang.model.api.stmt;
10
11 import com.google.common.annotations.Beta;
12 import com.google.common.collect.ImmutableList;
13 import java.util.Collection;
14 import javax.annotation.Nonnull;
15
16 /**
17  * Statement which can contain action statements
18  */
19 @Beta
20 public interface ActionStatementContainer {
21
22     /**
23      * All implementations should override this method.
24      * The default definition of this method is used only in YANG 1.0 (RFC6020) implementations of
25      * AugmentStatement, ContainerStatement, GroupingStatement and ListStatement which do not allow action statements.
26      * These YANG statements have been changed in YANG 1.1 (RFC 7950) and can now contain action statements.
27      *
28      * @return collection of action statements
29      */
30      // FIXME: version 2.0.0: make this method non-default
31     @Nonnull default Collection<? extends ActionStatement> getActions() {
32         return ImmutableList.of();
33     }
34 }