Class DefaultRelocationUI
- java.lang.Object
-
- com.cloudbees.hudson.plugins.folder.relocate.RelocationUI
-
- com.cloudbees.hudson.plugins.folder.relocate.DefaultRelocationUI
-
- All Implemented Interfaces:
ExtensionPoint,IconSpec
@Extension(ordinal=-1000.0) public class DefaultRelocationUI extends RelocationUI
Default implementation ofRelocationUI- Since:
- 4.9
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description DefaultRelocationUI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.kohsuke.stapler.HttpResponsedoMove(org.kohsuke.stapler.StaplerRequest req, Item item, String destination)Does 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
-
-
-
-
Method Detail
-
isApplicableTo
public boolean isApplicableTo(Class<? extends Item> itemClass)
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:
ExtensionList,Extension#ordinal() sorting
-
isAvailable
public boolean isAvailable(Item item)
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
public Collection<ItemGroup<?>> listDestinations(Item item)
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, InterruptedExceptionDoes the move.- Parameters:
req- the request.item- the itemdestination- the destination.- Returns:
- the response.
- Throws:
IOException- if things go wrong.InterruptedException- if interrupted.
-
-