Class RelocationAction

java.lang.Object
com.cloudbees.hudson.plugins.folder.relocate.RelocationAction
All Implemented Interfaces:
Action, ModelObject, IconSpec, org.kohsuke.stapler.StaplerFallback

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class RelocationAction extends Object implements Action, org.kohsuke.stapler.StaplerFallback, IconSpec
Does the actual work of relocating an item.
  • Field Details

    • RELOCATE

      public static final Permission RELOCATE
      The permission required to move an item.
  • Constructor Details

    • RelocationAction

      public RelocationAction(@NonNull Item item)
      Creates an instance of this action.
      Parameters:
      item - the item that would be moved.
    • RelocationAction

      public RelocationAction(@NonNull Item item, @NonNull RelocationUI ui)
  • Method Details

    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getIconClassName

      public String getIconClassName()
      Specified by:
      getIconClassName in interface IconSpec
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getItem

      public Item getItem()
      Gets the item that would be moved.
      Returns:
      the item that would be moved.
    • getUi

      @CheckForNull public RelocationUI getUi()
      Getter for the UI to display in this action.
      Returns:
      the UI to display in this action or null if not supported.
      Since:
      4.9
    • getStaplerFallback

      public Object getStaplerFallback()
      Specified by:
      getStaplerFallback in interface org.kohsuke.stapler.StaplerFallback
    • getItemParent

      public ItemGroup<?> getItemParent()
      Avoids a CCE caused by return type ambiguity in script access.
      Returns:
      Item.getParent() of getItem()