public abstract class ItemGroupMixIn extends Object
ItemGroup
implementations. Not meant for a consumption from outside ItemGroups.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 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 <K,V extends Item> |
loadChildren(ItemGroup parent,
File modulesDir,
Function1<? extends K,? super V> key)
Loads all the child
Items. |
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)
Items.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.IOExceptionjavax.servlet.ServletExceptionprotected String redirectAfterCreateItem(org.kohsuke.stapler.StaplerRequest req, TopLevelItem result) throws IOException
TopLevelItem.IOExceptionpublic <T extends TopLevelItem> T copy(T src, String name) throws IOException
TopLevelItem to a new name.IOExceptionpublic TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException
IOExceptionpublic TopLevelItem createProject(TopLevelItemDescriptor type, String name, boolean notify) throws IOException
IOExceptionCopyright © 2019. All rights reserved.