public abstract class ItemGroupMixIn extends Object
ItemGroup
implementations. Not meant for a consumption from outside ItemGroup
s.ViewGroupMixIn
Modifier and Type | Field and Description |
---|---|
static Function1<String,Item> |
KEYED_BY_NAME
Item → name function. |
Modifier | Constructor and Description |
---|---|
protected |
ItemGroupMixIn(ItemGroup parent,
AccessControlled acl) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
add(TopLevelItem item)
Adds a newly created item to the parent.
|
<T extends TopLevelItem> |
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 for example from the submission of the /lib/hudson/newFromList/form tag
or throws an exception if it fails. |
protected abstract File |
getRootDirFor(String name)
Assigns the root directory for a prospective item.
|
static <K,V extends Item> |
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 . |
protected ItemGroupMixIn(ItemGroup parent, AccessControlled acl)
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
for example from the submission of the /lib/hudson/newFromList/form
tag
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.IOException
public TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException
IOException
public TopLevelItem createProject(TopLevelItemDescriptor type, String name, boolean notify) throws IOException
IOException
Copyright © 2004–2021. All rights reserved.