@Extension(ordinal=-1000.0) public class DefaultRelocationUI extends RelocationUI
RelocationUI
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
DefaultRelocationUI() |
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doMove(org.kohsuke.stapler.StaplerRequest req,
Item item,
String destination)
Does the move.
|
boolean |
isApplicableTo(Class<? extends Item> itemClass)
Checks if this
RelocationUI is applicable to the specified type of item. |
boolean |
isAvailable(Item item)
Checks if the relocation operation is currently available for the specific item
(as
Jenkins.getAuthentication() if the user is a factor). |
Collection<ItemGroup<?>> |
listDestinations(Item item)
List of destinations that the item can be moved to by the current user.
|
for_, getDisplayName, getIconClassName, getIconFileName, getUrlName
public boolean isApplicableTo(Class<? extends Item> itemClass)
RelocationUI
is applicable to the specified type of item.isApplicableTo
in class RelocationUI
itemClass
- the type of item.true
if this UI is applicable to the specified type of item.ExtensionList
,
Extension#ordinal() sorting
public boolean isAvailable(Item item)
Jenkins.getAuthentication()
if the user is a factor). You can assume that the current user
has RelocationAction.RELOCATE
permission.isAvailable
in class RelocationUI
item
- the item being checked.true
if the UI is available for the current user on the specified item.public Collection<ItemGroup<?>> listDestinations(Item item)
item
- the item.public org.kohsuke.stapler.HttpResponse doMove(org.kohsuke.stapler.StaplerRequest req, @AncestorInPath Item item, @QueryParameter String destination) throws IOException, InterruptedException
req
- the request.item
- the itemdestination
- the destination.IOException
- if things go wrong.InterruptedException
- if interrupted.Copyright © 2016–2020. All rights reserved.