com.sonyericsson.hudson.plugins.multislaveconfigplugin
Class SearchSlaves

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.multislaveconfigplugin.SearchSlaves

public class SearchSlaves
extends Object

Class for searching and adding dumb slaves to a list.

Author:
Nicklas Nilsson <nicklas3.nilsson@sonyericsson.com>, Fredrik Persson <fredrik4.persson@sonyericsson.com>

Constructor Summary
protected SearchSlaves()
          Not allowing to create instances of this class.
 
Method Summary
static NodeList getNodes(net.sf.json.JSONObject searchParameters)
          Gets a list of DumbSlaves that matches the search parameters.
static boolean hasSearchHit(hudson.slaves.DumbSlave slave, String searchParameter, String slaveParameter)
          Method that searches for a specific parameter on a slave and returns true/false if it's found.
static String makeSearchable(String string)
          Formatting a string to ignore case sensitiveness and trimming leading and trailing whitespaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchSlaves

protected SearchSlaves()
Not allowing to create instances of this class.

Method Detail

getNodes

public static NodeList getNodes(net.sf.json.JSONObject searchParameters)
Gets a list of DumbSlaves that matches the search parameters.

Parameters:
searchParameters - submitted form containing what to search for.
Returns:
list of matching slaves

hasSearchHit

public static boolean hasSearchHit(hudson.slaves.DumbSlave slave,
                                   String searchParameter,
                                   String slaveParameter)
Method that searches for a specific parameter on a slave and returns true/false if it's found.

Parameters:
slave - the slave to search for environment variables on.
searchParameter - the parameter to search for on the slave.
slaveParameter - the current slaves parameter to compare with.
Returns:
true if the search parameters is found.

makeSearchable

public static String makeSearchable(String string)
Formatting a string to ignore case sensitiveness and trimming leading and trailing whitespaces.

Parameters:
string - the string to make search friendly.
Returns:
search friendly string.


Copyright © 2004-2014. All Rights Reserved.