Class DefaultRelocationUI
java.lang.Object
com.cloudbees.hudson.plugins.folder.relocate.RelocationUI
com.cloudbees.hudson.plugins.folder.relocate.DefaultRelocationUI
- All Implemented Interfaces:
ExtensionPoint
,IconSpec
Default implementation of
RelocationUI
- Since:
- 4.9
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.kohsuke.stapler.HttpResponse
Does the move.boolean
isApplicableTo
(Class<? extends Item> itemClass) Checks if thisRelocationUI
is applicable to the specified type of item.boolean
isAvailable
(Item item) Checks if the relocation operation is currently available for the specific item (asJenkins.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.Methods inherited from class com.cloudbees.hudson.plugins.folder.relocate.RelocationUI
for_, getDisplayName, getIconClassName, getIconFileName, getUrlName
-
Constructor Details
-
DefaultRelocationUI
public DefaultRelocationUI()
-
-
Method Details
-
isApplicableTo
Checks if thisRelocationUI
is applicable to the specified type of item.- Specified by:
isApplicableTo
in classRelocationUI
- Parameters:
itemClass
- the type of item.- Returns:
true
if this UI is applicable to the specified type of item.- See Also:
-
isAvailable
Checks if the relocation operation is currently available for the specific item (asJenkins.getAuthentication()
if the user is a factor). You can assume that the current user hasRelocationAction.RELOCATE
permission.- Specified by:
isAvailable
in classRelocationUI
- Parameters:
item
- the item being checked.- Returns:
true
if the UI is available for the current user on the specified item.
-
listDestinations
List of destinations that the item can be moved to by the current user.- Parameters:
item
- the item.- Returns:
- the list of destinations that the item can be moved to by the current user.
-
doMove
public org.kohsuke.stapler.HttpResponse doMove(org.kohsuke.stapler.StaplerRequest req, @AncestorInPath Item item, @QueryParameter String destination) throws IOException, InterruptedException Does the move.- Parameters:
req
- the request.item
- the itemdestination
- the destination.- Returns:
- the response.
- Throws:
IOException
- if things go wrong.InterruptedException
- if interrupted.
-