Merge "Fixed for bug 1197"
[controller.git] / opendaylight / netconf / netconf-cli / src / main / java / org / opendaylight / controller / netconf / cli / commands / input / InputDefinition.java
1 /*
2  * Copyright (c) 2014 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.controller.netconf.cli.commands.input;
9
10 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
11
12 /**
13  * The definition of input arguments represented by schema nodes parsed from
14  * yang rpc definition
15  */
16 public class InputDefinition {
17
18     private final ContainerSchemaNode inputContainer;
19
20     public InputDefinition(final ContainerSchemaNode inputContainer) {
21         this.inputContainer = inputContainer;
22     }
23
24     public static InputDefinition fromInput(final ContainerSchemaNode input) {
25         return new InputDefinition(input);
26     }
27
28     public ContainerSchemaNode getInput() {
29         return inputContainer;
30     }
31
32     // FIXME add empty as in output
33     public boolean isEmpty() {
34         return inputContainer == null;
35     }
36
37 }