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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.kohsuke.stapler.HttpResponseDoes the move.booleanisApplicableTo(Class<? extends Item> itemClass) Checks if thisRelocationUIis applicable to the specified type of item.booleanisAvailable(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 thisRelocationUIis applicable to the specified type of item.- Specified by:
isApplicableToin classRelocationUI- Parameters:
itemClass- the type of item.- Returns:
trueif 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.RELOCATEpermission.- Specified by:
isAvailablein classRelocationUI- Parameters:
item- the item being checked.- Returns:
trueif 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.StaplerRequest2 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.
-