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