|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<hudson.model.Node>
com.sonyericsson.hudson.plugins.multislaveconfigplugin.NodeList
public class NodeList
Manages a list of nodes.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
NodeList()
Redirecting to the super class constructor. |
|
NodeList(List<hudson.model.Node> list)
Constructor to help adding existing nodes to a new list. |
|
| Method Summary | |
|---|---|
protected String |
addLabels(String labelsToAdd,
String oldLabels)
Adds one or more labels to an existing String. |
protected NodeList |
changeSettings(Map settings)
Changes the settings for all nodes in the list. |
protected String |
getCommon(Setting type)
Gets the common setting of given type for all slaves in this list. |
String |
getCommon(String type)
Method for getting common settings of slaves by using a String as type. |
protected List<hudson.model.Node> |
getComplementaryNodes()
Returns the Jenkins registered nodes that are not in the given list. |
protected hudson.slaves.DumbSlave |
getFirstSlave()
Gets the first Slave in this list. |
hudson.slaves.ComputerLauncher |
getLauncher()
Gets the common ComputerLauncher for all slaves in this list. |
String |
getLauncherDescription()
Returns a description to be used by the jelly scripts if the launcher settings differs. |
hudson.model.Node.Mode |
getMode()
Gets the common mode setting for all slaves in this list. |
List<hudson.slaves.NodeProperty> |
getNodeProperties()
Gets a list of NodePropertys that are common for all
slaves in this list. |
String |
getRetentionDescription()
Returns a description to be used by the jelly scripts if the retention strategy settings differs. |
hudson.slaves.RetentionStrategy |
getRetentionStrategy()
Gets the common RetentionStrategy for all nodes in this list. |
protected boolean |
hasLabels(String labels)
Checks all the labels in the parameter to make sure each of them exist on at least one slave in this list. |
protected static HashMap |
interpretJSON(net.sf.json.JSONObject json)
Converts submitted form (JSON) to a HashMap containing only the settings to change. |
boolean |
isEmpty()
Checks if there are any DumbSlaves in the list instead of any Node. |
protected String |
removeLabels(String labelsToRemove,
String oldLabels)
Removes one or more labels from an existing String. |
protected boolean |
slavesStillExist()
Checks if the slaves in this list still exist in the master nodelist. |
NodeList |
sortByName()
Sorts this list by name. |
net.sf.json.JSONArray |
toJSONArray()
Represents this list as a JSONArray. |
String |
toString()
Represents this list as a String using the node names separated with space. |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public NodeList(List<hudson.model.Node> list)
list - the nodes to be addedpublic NodeList()
| Method Detail |
|---|
public boolean isEmpty()
isEmpty in interface Collection<hudson.model.Node>isEmpty in interface List<hudson.model.Node>isEmpty in class ArrayList<hudson.model.Node>public NodeList sortByName()
public String toString()
toString in class AbstractCollection<hudson.model.Node>public net.sf.json.JSONArray toJSONArray()
protected hudson.slaves.DumbSlave getFirstSlave()
protected boolean slavesStillExist()
protected NodeList changeSettings(Map settings)
settings - the settings to make as a hashmap
protected String addLabels(String labelsToAdd,
String oldLabels)
labelsToAdd - the labels to be addedoldLabels - the already existing label string
protected String removeLabels(String labelsToRemove,
String oldLabels)
labelsToRemove - the labels to be removedoldLabels - the already existing label string
protected List<hudson.model.Node> getComplementaryNodes()
protected boolean hasLabels(String labels)
labels - the labels to check.
protected static HashMap interpretJSON(net.sf.json.JSONObject json)
json - to interpret
public String getCommon(String type)
type - the setting type as a String
protected String getCommon(Setting type)
type - the setting type to get
public hudson.model.Node.Mode getMode()
public hudson.slaves.ComputerLauncher getLauncher()
public hudson.slaves.RetentionStrategy getRetentionStrategy()
public String getLauncherDescription()
public String getRetentionDescription()
public List<hudson.slaves.NodeProperty> getNodeProperties()
NodePropertys that are common for all
slaves in this list. NodeProperties that are not equal are left out.
NodePropertys
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||