|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.ItemGroupMixIn
public abstract class ItemGroupMixIn
Defines a bunch of static methods to be used as a "mix-in" for ItemGroup
implementations. Not meant for a consumption from outside ItemGroup
s.
ViewGroupMixIn
Field Summary | |
---|---|
static Function1<String,Item> |
KEYED_BY_NAME
Item -> name function. |
Constructor Summary | |
---|---|
protected |
ItemGroupMixIn(ItemGroup parent,
AccessControlled acl)
|
Method Summary | ||
---|---|---|
protected abstract void |
add(TopLevelItem item)
Adds a newly created item to the parent. |
|
|
copy(T src,
String name)
Copies an existing TopLevelItem to a new name. |
|
TopLevelItem |
createProject(TopLevelItemDescriptor type,
String name,
boolean notify)
|
|
TopLevelItem |
createProjectFromXML(String name,
InputStream xml)
|
|
TopLevelItem |
createTopLevelItem(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Creates a TopLevelItem from the submission of the '/lib/hudson/newFromList/formList'
or throws an exception if it fails. |
|
protected abstract File |
getRootDirFor(String name)
Assigns the root directory for a prospective item. |
|
static
|
loadChildren(ItemGroup parent,
File modulesDir,
Function1<? extends K,? super V> key)
Loads all the child Item s. |
|
protected String |
redirectAfterCreateItem(org.kohsuke.stapler.StaplerRequest req,
TopLevelItem result)
Computes the redirection target URL for the newly created TopLevelItem . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Function1<String,Item> KEYED_BY_NAME
Item
-> name function.
Constructor Detail |
---|
protected ItemGroupMixIn(ItemGroup parent, AccessControlled acl)
Method Detail |
---|
protected abstract void add(TopLevelItem item)
protected abstract File getRootDirFor(String name)
public static <K,V extends Item> Map<K,V> loadChildren(ItemGroup parent, File modulesDir, Function1<? extends K,? super V> key)
Item
s.
modulesDir
- Directory that contains sub-directories for each child item.public TopLevelItem createTopLevelItem(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
TopLevelItem
from the submission of the '/lib/hudson/newFromList/formList'
or throws an exception if it fails.
IOException
javax.servlet.ServletException
protected String redirectAfterCreateItem(org.kohsuke.stapler.StaplerRequest req, TopLevelItem result) throws IOException
TopLevelItem
.
IOException
public <T extends TopLevelItem> T copy(T src, String name) throws IOException
TopLevelItem
to a new name.
The caller is responsible for calling ItemListener.fireOnCopied(Item, Item)
. This method
cannot do that because it doesn't know how to make the newly added item reachable from the parent.
IOException
public TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException
IOException
public TopLevelItem createProject(TopLevelItemDescriptor type, String name, boolean notify) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |