Package hudson.model
Class ItemGroupMixIn
java.lang.Object
hudson.model.ItemGroupMixIn
Defines a bunch of static methods to be used as a "mix-in" for 
ItemGroup
 implementations. Not meant for a consumption from outside ItemGroups.- Author:
 - Kohsuke Kawaguchi
 - See Also:
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidadd(TopLevelItem item) Adds a newly created item to the parent.<T extends TopLevelItem>
TCopies an existingTopLevelItemto a new name.createProject(TopLevelItemDescriptor type, String name, boolean notify) createProjectFromXML(String name, InputStream xml) createTopLevelItem(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Creates aTopLevelItemfor example from the submission of the/lib/hudson/newFromList/formtag or throws an exception if it fails.createTopLevelItem(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.protected abstract FilegetRootDirFor(String name) Assigns the root directory for a prospective item.loadChildren(ItemGroup parent, File modulesDir, Function1<? extends K, ? super V> key) Loads all the childItems.protected StringredirectAfterCreateItem(org.kohsuke.stapler.StaplerRequest2 req, TopLevelItem result) Computes the redirection target URL for the newly createdTopLevelItem. 
- 
Field Details
- 
KEYED_BY_NAME
Item→ name function. 
 - 
 - 
Constructor Details
- 
ItemGroupMixIn
 
 - 
 - 
Method Details
- 
add
Adds a newly created item to the parent. - 
getRootDirFor
Assigns the root directory for a prospective item. - 
loadChildren
public static <K,V extends Item> Map<K,V> loadChildren(ItemGroup parent, File modulesDir, Function1<? extends K, ? super V> key) Loads all the childItems.- Parameters:
 modulesDir- Directory that contains sub-directories for each child item.
 - 
createTopLevelItem
public TopLevelItem createTopLevelItem(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Creates aTopLevelItemfor example from the submission of the/lib/hudson/newFromList/formtag or throws an exception if it fails.- Throws:
 IOExceptionjakarta.servlet.ServletException- Since:
 - 2.475
 
 - 
createTopLevelItem
@Deprecated public TopLevelItem createTopLevelItem(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException Deprecated.- Throws:
 IOExceptionjavax.servlet.ServletException
 - 
redirectAfterCreateItem
protected String redirectAfterCreateItem(org.kohsuke.stapler.StaplerRequest2 req, TopLevelItem result) throws IOException Computes the redirection target URL for the newly createdTopLevelItem.- Throws:
 IOException
 - 
copy
Copies an existingTopLevelItemto a new name.- Throws:
 IOException
 - 
createProjectFromXML
- Throws:
 IOException
 - 
createProject
@NonNull public TopLevelItem createProject(@NonNull TopLevelItemDescriptor type, @NonNull String name, boolean notify) throws IOException - Throws:
 IOException
 
 - 
 
createTopLevelItem(StaplerRequest2, StaplerResponse2)