1 | void addHTTPFileArg(HTTPFileArg file) {↵ | | 1 | void addArgument(Argument arg) {↵
|
2 | TestElementProperty newHTTPFileArg = new TestElementProperty(file.getPath(), file);↵ | | 2 | TestElementProperty newArg = new TestElementProperty(arg.getName(), arg);↵
|
3 | if (isRunningVersion()) {↵ | | 3 | if (isRunningVersion()) {↵
|
4 | this.setTemporary(newHTTPFileArg);↵ | | 4 | this.setTemporary(newArg);↵
|
5 | }↵ | | 5 | }↵
|
6 | getHTTPFileArgsCollection().addItem(newHTTPFileArg);↵ | | 6 | getArguments().addItem(newArg);↵
|
7 | }↵ | | 7 | }↵
|
|
8 | /**↵ | | 8 | /**↵
|
9 | * adds a new File to the HTTPFileArgs list to be uploaded with http↵ | | 9 | * Add a new ↵
|
10 | * request.↵ | | |
|
11 | ↵ | | 10 | argument with the given name, value, and metadata.↵
|
| | | 11 | * ↵
|
| | | 12 | * @param name↵
|
12 | *↵ | | 13 | * ↵
|
13 | * @param path file full path.↵ | | 14 | ↵
|
14 | * @param param http parameter name.↵ | | |
|
15 | * @param mime mime type of file.↵ | | |
|
16 | ↵ | | 15 | the name of the argument↵
|
| | | 16 | * @param value↵
|
| | | 17 | * the value of the argument↵
|
| | | 18 | * @param metadata↵
|
| | | 19 | * the metadata for the argument↵
|
17 | */↵ | | 20 | */↵
|
18 | public void addHTTPFileArg(String path, String param, String mime) {↵ | | 21 | public void addArgument(String name, String value, String m↵
|
19 | addHTTPFileArg(new HTTPFileArg(path, param, mime↵ | | 22 | etadata) {↵
|
20 | ));↵ | | 23 | addArgument(new Argument(name, value, metadata));↵
|
21 | }↵ | | 24 | }↵
|
|
22 | /**↵ | | 25 | /**↵
|
23 | * Get a PropertyIterator of the files.↵ | | 26 | * Get a PropertyIterator of the arguments.↵
|
24 | *↵ | | 27 | * ↵
|
25 | * @return an iteration of the files↵ | | 28 | * @return an iteration of the arguments↵
|
26 | */↵ | | 29 | */↵
|
27 | public PropertyIterator iterator() {↵ | | 30 | public PropertyIterator iterator() {↵
|
28 | return getHTTPFileArgsCollection().iterator();↵ | | 31 | return getArguments().iterator();↵
|
29 | } | | 32 | }
|