finish the implementation of the (events) history listing

This commit is contained in:
Vincent Behar 2011-07-31 19:47:12 +02:00
parent e1b8ef0bea
commit a7f2a29c30
4 changed files with 185 additions and 4 deletions

View file

@ -16,6 +16,7 @@
package org.rundeck.api;
import java.io.InputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@ -91,6 +92,21 @@ class ApiPathBuilder {
return this;
}
/**
* Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure
* to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character.
*
* @param key of the parameter. Must not be null or empty
* @param value of the parameter. May be null
* @return this, for method chaining
*/
public ApiPathBuilder param(String key, Date value) {
if (value != null) {
param(key, value.getTime());
}
return this;
}
/**
* Append the given parameter (key and value). This will only append the parameter if it is not null, and make sure
* to add the right separator ("?" or "&") before. The key and value will be separated by the "=" character.