public class MockFolder
extends hudson.model.AbstractItem
implements jenkins.model.DirectlyModifiableTopLevelItemGroup, hudson.model.TopLevelItem, hudson.model.ModifiableViewGroup, org.kohsuke.stapler.StaplerFallback
If you need to work with the UI during the test, or just prefer to depend on a plugin POM earlier than this class,
you can simply add a test dependency on cloudbees-folder to your plugin and use jenkinsRule.jenkins.createProject(Folder.class, "name").
| Modifier and Type | Class and Description |
|---|---|
static class |
MockFolder.DescriptorImpl |
| Modifier and Type | Method and Description |
|---|---|
<I extends hudson.model.TopLevelItem> |
add(I item,
String name) |
void |
addView(hudson.model.View view) |
boolean |
canAdd(hudson.model.TopLevelItem item) |
boolean |
canDelete(hudson.model.View view) |
<T extends hudson.model.TopLevelItem> |
copy(T src,
String name) |
<T extends hudson.model.TopLevelItem> |
createProject(Class<T> type,
String name)
Convenience method to create a
FreeStyleProject or similar. |
hudson.model.TopLevelItem |
createProject(hudson.model.TopLevelItemDescriptor type,
String name,
boolean notify) |
hudson.model.TopLevelItem |
createProjectFromXML(String name,
InputStream xml) |
void |
deleteView(hudson.model.View view) |
hudson.model.TopLevelItem |
doCreateItem(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
Collection<? extends hudson.model.Job> |
getAllJobs() |
hudson.model.TopLevelItemDescriptor |
getDescriptor() |
hudson.model.TopLevelItem |
getItem(String name) |
hudson.model.ItemGroup<? extends hudson.model.TopLevelItem> |
getItemGroup() |
Collection<hudson.model.TopLevelItem> |
getItems() |
hudson.model.TopLevelItem |
getJob(String name)
Same as
getItem(java.lang.String) but named this way as a WebMethod. |
hudson.model.View |
getPrimaryView() |
File |
getRootDirFor(hudson.model.TopLevelItem child) |
Object |
getStaplerFallback() |
String |
getUrlChildPrefix() |
hudson.model.View |
getView(String name) |
List<hudson.model.Action> |
getViewActions() |
Collection<hudson.model.View> |
getViews() |
hudson.views.ViewsTabBar |
getViewsTabBar() |
void |
onCopiedFrom(hudson.model.Item src) |
void |
onDeleted(hudson.model.TopLevelItem item) |
void |
onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent,
String name) |
void |
onRenamed(hudson.model.TopLevelItem item,
String oldName,
String newName) |
void |
onViewRenamed(hudson.model.View view,
String oldName,
String newName) |
void |
remove(hudson.model.TopLevelItem item) |
void |
renameTo(String newName) |
checkPermission, delete, delete, doConfigDotXml, doDoDelete, doReload, doSetName, doSubmitDescription, getAbsoluteUrl, getACL, getApi, getConfigFile, getDescription, getDescriptorByName, getDisplayName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getPronoun, getRelativeDisplayNameFrom, getRelativeNameFrom, getRelativeNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getUrl, hasPermission, movedTo, onCreatedFromScratch, performDelete, resolveForCLI, save, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXmladdAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, replaceActiongetSearch, getSearchIndex, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendErrorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdelete, getAbsoluteUrl, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCreatedFromScratch, savepublic void onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent,
String name)
throws IOException
onLoad in interface hudson.model.ItemonLoad in class hudson.model.AbstractItemIOExceptionpublic Collection<hudson.model.TopLevelItem> getItems()
getItems in interface hudson.model.ItemGroup<hudson.model.TopLevelItem>public hudson.model.TopLevelItem getItem(String name)
getItem in interface hudson.model.ItemGroup<hudson.model.TopLevelItem>public Collection<? extends hudson.model.Job> getAllJobs()
getAllJobs in interface hudson.model.ItemgetAllJobs in class hudson.model.AbstractItempublic <T extends hudson.model.TopLevelItem> T copy(T src,
String name)
throws IOException
copy in interface jenkins.model.ModifiableTopLevelItemGroupIOExceptionpublic void onCopiedFrom(hudson.model.Item src)
onCopiedFrom in interface hudson.model.ItemonCopiedFrom in class hudson.model.AbstractItempublic hudson.model.TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException
createProjectFromXML in interface jenkins.model.ModifiableTopLevelItemGroupIOExceptionpublic hudson.model.TopLevelItem createProject(hudson.model.TopLevelItemDescriptor type,
String name,
boolean notify)
throws IOException
createProject in interface jenkins.model.ModifiableTopLevelItemGroupIOExceptionpublic <T extends hudson.model.TopLevelItem> T createProject(Class<T> type, String name) throws IOException
FreeStyleProject or similar.IOExceptionpublic hudson.model.TopLevelItem doCreateItem(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
doCreateItem in interface hudson.model.ModifiableItemGroup<hudson.model.TopLevelItem>IOExceptionjavax.servlet.ServletExceptionpublic String getUrlChildPrefix()
getUrlChildPrefix in interface hudson.model.ItemGroup<hudson.model.TopLevelItem>public File getRootDirFor(hudson.model.TopLevelItem child)
getRootDirFor in interface hudson.model.ItemGroup<hudson.model.TopLevelItem>public void onRenamed(hudson.model.TopLevelItem item,
String oldName,
String newName)
throws IOException
onRenamed in interface hudson.model.ItemGroup<hudson.model.TopLevelItem>IOExceptionpublic void renameTo(String newName) throws IOException
renameTo in class hudson.model.AbstractItemIOExceptionpublic void onDeleted(hudson.model.TopLevelItem item)
throws IOException
onDeleted in interface hudson.model.ItemGroup<hudson.model.TopLevelItem>IOExceptionpublic boolean canAdd(hudson.model.TopLevelItem item)
canAdd in interface jenkins.model.DirectlyModifiableTopLevelItemGrouppublic <I extends hudson.model.TopLevelItem> I add(I item,
String name)
throws IOException,
IllegalArgumentException
add in interface jenkins.model.DirectlyModifiableTopLevelItemGroupIOExceptionIllegalArgumentExceptionpublic void remove(hudson.model.TopLevelItem item)
throws IOException,
IllegalArgumentException
remove in interface jenkins.model.DirectlyModifiableTopLevelItemGroupIOExceptionIllegalArgumentExceptionpublic hudson.model.TopLevelItemDescriptor getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.model.TopLevelItem>getDescriptor in interface hudson.model.TopLevelItempublic void addView(hudson.model.View view)
throws IOException
addView in interface hudson.model.ModifiableViewGroupIOExceptionpublic boolean canDelete(hudson.model.View view)
canDelete in interface hudson.model.ViewGrouppublic void deleteView(hudson.model.View view)
throws IOException
deleteView in interface hudson.model.ViewGroupIOExceptionpublic Collection<hudson.model.View> getViews()
getViews in interface hudson.model.ViewGrouppublic hudson.model.View getView(String name)
getView in interface hudson.model.ViewGrouppublic hudson.model.View getPrimaryView()
getPrimaryView in interface hudson.model.ViewGrouppublic void onViewRenamed(hudson.model.View view,
String oldName,
String newName)
onViewRenamed in interface hudson.model.ViewGrouppublic hudson.views.ViewsTabBar getViewsTabBar()
getViewsTabBar in interface hudson.model.ViewGrouppublic hudson.model.ItemGroup<? extends hudson.model.TopLevelItem> getItemGroup()
getItemGroup in interface hudson.model.ViewGrouppublic List<hudson.model.Action> getViewActions()
getViewActions in interface hudson.model.ViewGrouppublic Object getStaplerFallback()
getStaplerFallback in interface org.kohsuke.stapler.StaplerFallbackpublic hudson.model.TopLevelItem getJob(String name)
getItem(java.lang.String) but named this way as a WebMethod.Hudson.getJob(java.lang.String)Copyright © 2004–2015. All rights reserved.