Class MockItemGroup<T extends Job<?,?>>
- java.lang.Object
-
- hudson.plugins.project_inheritance.util.MockItemGroup<T>
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<TopLevelItem>
,Item
,ItemGroup<T>
,ModelObject
,PersistenceRoot
,Saveable
,TopLevelItem
,SearchableModelObject
,SearchItem
,AccessControlled
,OnMaster
- Direct Known Subclasses:
ProjectWizard
public class MockItemGroup<T extends Job<?,?>> extends Object implements ItemGroup<T>, TopLevelItem
This class is a pure mockery of anItemGroup
, used to handle projects that are created only ephemerally and should not be visible to the Jenkins core.- Author:
- Martin Schroeder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description MockItemGroup()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, hasAnyPermission, hasPermission, hasPermission2
-
Methods inherited from interface hudson.model.ItemGroup
allItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getItems, getItemsStream, getItemsStream
-
-
-
-
Method Detail
-
clean
public void clean()
-
getRootDir
public File getRootDir()
- Specified by:
getRootDir
in interfacePersistenceRoot
-
save
public void save() throws IOException
- Specified by:
save
in interfaceItem
- Specified by:
save
in interfaceSaveable
- Throws:
IOException
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceItem
- Specified by:
getDisplayName
in interfaceModelObject
-
getFullName
public String getFullName()
- Specified by:
getFullName
in interfaceItem
- Specified by:
getFullName
in interfaceItemGroup<T extends Job<?,?>>
-
getFullDisplayName
public String getFullDisplayName()
- Specified by:
getFullDisplayName
in interfaceItem
- Specified by:
getFullDisplayName
in interfaceItemGroup<T extends Job<?,?>>
-
getItems
public Collection<T> getItems()
-
getUrl
public String getUrl()
-
getUrlChildPrefix
public String getUrlChildPrefix()
- Specified by:
getUrlChildPrefix
in interfaceItemGroup<T extends Job<?,?>>
-
addItem
public void addItem(T item)
-
getItem
public T getItem(String name) throws AccessDeniedException
- Specified by:
getItem
in interfaceItemGroup<T extends Job<?,?>>
- Throws:
AccessDeniedException
-
getRootDirFor
public File getRootDirFor(T child)
- Specified by:
getRootDirFor
in interfaceItemGroup<T extends Job<?,?>>
-
onRenamed
public void onRenamed(T item, String oldName, String newName) throws IOException
- Specified by:
onRenamed
in interfaceItemGroup<T extends Job<?,?>>
- Throws:
IOException
-
onDeleted
public void onDeleted(T item) throws IOException
- Specified by:
onDeleted
in interfaceItemGroup<T extends Job<?,?>>
- Throws:
IOException
-
delete
public void delete() throws IOException, InterruptedException
- Specified by:
delete
in interfaceItem
- Throws:
IOException
InterruptedException
-
getAbsoluteUrl
public String getAbsoluteUrl()
- Specified by:
getAbsoluteUrl
in interfaceItem
-
getAllJobs
public Collection<? extends Job> getAllJobs()
- Specified by:
getAllJobs
in interfaceItem
-
getRelativeNameFrom
public String getRelativeNameFrom(ItemGroup arg0)
- Specified by:
getRelativeNameFrom
in interfaceItem
-
getRelativeNameFrom
public String getRelativeNameFrom(Item arg0)
- Specified by:
getRelativeNameFrom
in interfaceItem
-
getShortUrl
public String getShortUrl()
- Specified by:
getShortUrl
in interfaceItem
-
onCopiedFrom
public void onCopiedFrom(Item arg0)
- Specified by:
onCopiedFrom
in interfaceItem
-
onCreatedFromScratch
public void onCreatedFromScratch()
- Specified by:
onCreatedFromScratch
in interfaceItem
-
onLoad
public void onLoad(ItemGroup<? extends Item> arg0, String arg1) throws IOException
- Specified by:
onLoad
in interfaceItem
- Throws:
IOException
-
getSearch
public Search getSearch()
- Specified by:
getSearch
in interfaceSearchableModelObject
-
getSearchIndex
public SearchIndex getSearchIndex()
- Specified by:
getSearchIndex
in interfaceSearchItem
-
getSearchName
public String getSearchName()
- Specified by:
getSearchName
in interfaceSearchItem
-
getSearchUrl
public String getSearchUrl()
- Specified by:
getSearchUrl
in interfaceSearchItem
-
checkPermission
public void checkPermission(Permission arg0) throws AccessDeniedException
- Specified by:
checkPermission
in interfaceAccessControlled
- Throws:
AccessDeniedException
-
getACL
public ACL getACL()
- Specified by:
getACL
in interfaceAccessControlled
-
hasPermission
public boolean hasPermission(Permission arg0)
- Specified by:
hasPermission
in interfaceAccessControlled
-
getDescriptor
public TopLevelItemDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<T extends Job<?,?>>
- Specified by:
getDescriptor
in interfaceTopLevelItem
-
-