org.rundeck.api.util
Class ParametersUtil

java.lang.Object
  extended by org.rundeck.api.util.ParametersUtil

public class ParametersUtil
extends Object

Utility class for API parameters that should be passed in URLs.

Author:
Vincent Behar

Constructor Summary
ParametersUtil()
           
 
Method Summary
static String generateArgString(Properties options)
          Generates a RunDeck "argString" representing the given options.
static String generateNodeFiltersString(Properties nodeFilters)
          Generates an url-encoded string representing the given nodeFilters.
static String urlEncode(String input)
          URL-encode the given string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParametersUtil

public ParametersUtil()
Method Detail

urlEncode

public static String urlEncode(String input)
URL-encode the given string

Parameters:
input - string to be encoded
Returns:
an url-encoded string

generateArgString

public static String generateArgString(Properties options)
Generates a RunDeck "argString" representing the given options. Format of the argString is "-key1 value1 -key2 'value 2 with spaces'". You might want to url-encode this string...

Parameters:
options - to be converted
Returns:
a string. null if options is null, empty if there are no valid options.

generateNodeFiltersString

public static String generateNodeFiltersString(Properties nodeFilters)
Generates an url-encoded string representing the given nodeFilters. Format of the string is "filter1=value1&filter2=value2".

Parameters:
nodeFilters - to be converted
Returns:
an url-encoded string. null if nodeFilters is null, empty if there are no valid filters.


Copyright © 2011. All Rights Reserved.