blob: 08a8bc713f218dc22b20aec7ccf4ce3fc9f6d112 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tradefed.config;
import com.android.tradefed.util.MultiMap;
import java.util.ArrayList;
import java.util.List;
/**
* Configuration Object that describes some aspect of the configuration itself. Like a membership
* test-suite-tag. This class cannot receive option values via command line. Only directly in the
* xml.
*/
@OptionClass(alias = "config-descriptor")
public class ConfigurationDescriptor {
@Option(name = "test-suite-tag", description = "A membership tag to suite. Can be repeated.")
private List<String> mSuiteTags = new ArrayList<>();
@Option(name = "metadata", description = "Metadata associated with this configuration, can be "
+ "free formed key value pairs, and a key may be associated with multiple values.")
private MultiMap<String, String> mMetaData = new MultiMap<>();
/** Returns the list of suite tags the test is part of. */
public List<String> getSuiteTags() {
return mSuiteTags;
}
/** Sets the list of suite tags the test is part of. */
public void setSuiteTags(List<String> suiteTags) {
mSuiteTags = suiteTags;
}
/** Retrieves all configured metadata */
public MultiMap<String, String> getAllMetaData() {
return mMetaData;
}
/** Get the named metadata entries */
public List<String> getMetaData(String name) {
return mMetaData.get(name);
}
}
|