hudson.model
Class HudsonHelper

java.lang.Object
  extended by hudson.model.HudsonHelper

public class HudsonHelper
extends Object

Misc. utility methods extracted from Jenkins, AbstractProject and AbstractItem.

Author:
Bob Foster

Constructor Summary
HudsonHelper()
           
 
Method Summary
static hudson.model.AbstractProject findNearest(String name)
          Finds a AbstractProject that has the name closest to the given name.
static hudson.model.AbstractProject findNearest(String name, hudson.model.ItemGroup context)
          Finds a AbstractProject whose name (when referenced from the specified context) is closest to the given name.
static
<T extends hudson.model.Item>
List<T>
fromNameList(hudson.model.ItemGroup context, String list, Class<T> type)
           
static hudson.model.Item getItem(String pathName, hudson.model.Item context)
           
static
<T extends hudson.model.Item>
T
getItem(String pathName, hudson.model.Item item, Class<T> type)
           
static hudson.model.Item getItem(String pathName, hudson.model.ItemGroup context)
           
static
<T extends hudson.model.Item>
T
getItem(String pathName, hudson.model.ItemGroup context, Class<T> type)
           
static String getRelativeNameFrom(hudson.model.Item item, hudson.model.ItemGroup p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HudsonHelper

public HudsonHelper()
Method Detail

getItem

public static hudson.model.Item getItem(String pathName,
                                        hudson.model.ItemGroup context)

getItem

public static final hudson.model.Item getItem(String pathName,
                                              hudson.model.Item context)

getItem

public static final <T extends hudson.model.Item> T getItem(String pathName,
                                                            hudson.model.ItemGroup context,
                                                            Class<T> type)

getItem

public static final <T extends hudson.model.Item> T getItem(String pathName,
                                                            hudson.model.Item item,
                                                            Class<T> type)

findNearest

public static hudson.model.AbstractProject findNearest(String name)
Finds a AbstractProject that has the name closest to the given name.


findNearest

public static hudson.model.AbstractProject findNearest(String name,
                                                       hudson.model.ItemGroup context)
Finds a AbstractProject whose name (when referenced from the specified context) is closest to the given name.

Since:
1.419

getRelativeNameFrom

public static String getRelativeNameFrom(hudson.model.Item item,
                                         hudson.model.ItemGroup p)

fromNameList

public static <T extends hudson.model.Item> List<T> fromNameList(hudson.model.ItemGroup context,
                                                                 String list,
                                                                 Class<T> type)


Copyright © 2004-2013 Hudson. All Rights Reserved.