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 of RelocationUI
Since:
4.9
  • Constructor Details

    • DefaultRelocationUI

      public DefaultRelocationUI()
  • Method Details

    • isApplicableTo

      public boolean isApplicableTo(Class<? extends Item> itemClass)
      Checks if this RelocationUI is applicable to the specified type of item.
      Specified by:
      isApplicableTo in class RelocationUI
      Parameters:
      itemClass - the type of item.
      Returns:
      true if this UI is applicable to the specified type of item.
      See Also:
    • isAvailable

      public 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). You can assume that the current user has RelocationAction.RELOCATE permission.
      Specified by:
      isAvailable in class RelocationUI
      Parameters:
      item - the item being checked.
      Returns:
      true if 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, InterruptedException
      Does the move.
      Parameters:
      req - the request.
      item - the item
      destination - the destination.
      Returns:
      the response.
      Throws:
      IOException - if things go wrong.
      InterruptedException - if interrupted.