Add seed code from Open-O
[cli.git] / framework / src / main / java / org / onap / cli / fw / output / OnapCommandResultAttribute.java
1 /*
2  * Copyright 2017 Huawei Technologies Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.onap.cli.fw.output;
18
19 import org.onap.cli.fw.input.ParameterType;
20
21 import java.util.ArrayList;
22 import java.util.List;
23
24 /**
25  * Onap command output records, helps to define the title and its description while command is defined and during run
26  * time, it captures the value of the output as well.
27  */
28 public class OnapCommandResultAttribute {
29
30     /*
31      * Output name
32      */
33     private String outName;
34
35     /*
36      * Output description
37      */
38     private String outDescription;
39
40     /*
41      * Output values, in case list out, it holds values for all rows for show output, it will have one value
42      */
43     private List<String> values = new ArrayList<>();
44
45     /*
46      * Output scope
47      */
48     private OnapCommandResultAttributeScope outScope = OnapCommandResultAttributeScope.SHORT;
49
50     private ParameterType paramType = ParameterType.STRING;
51
52     private boolean isSecured = false;
53
54     public void setValues(List<String> values) {
55         this.values = values;
56     }
57
58     public String getName() {
59         return outName;
60     }
61
62     public void setName(String name) {
63         this.outName = name;
64     }
65
66     public String getDescription() {
67         return outDescription;
68     }
69
70     public void setDescription(String description) {
71         this.outDescription = description;
72     }
73
74     public List<String> getValues() {
75         return values;
76     }
77
78     public OnapCommandResultAttributeScope getScope() {
79         return outScope;
80     }
81
82     public void setScope(OnapCommandResultAttributeScope scope) {
83         this.outScope = scope;
84     }
85
86     public ParameterType getType() {
87         return paramType;
88     }
89
90     public void setType(ParameterType type) {
91         this.paramType = type;
92     }
93
94     public boolean isSecured() {
95         return isSecured;
96     }
97
98     public void setSecured(boolean isSecured) {
99         this.isSecured = isSecured;
100     }
101
102 }