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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRelocationAction.TransientActionFactoryImplMakes sure thatItems have the action.
-
Field Summary
Fields Modifier and Type Field Description static PermissionRELOCATEThe permission required to move an item.
-
Constructor Summary
Constructors Constructor Description RelocationAction(Item item)Creates an instance of this action.RelocationAction(Item item, RelocationUI ui)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDisplayName()StringgetIconClassName()StringgetIconFileName()ItemgetItem()Gets the item that would be moved.ItemGroup<?>getItemParent()Avoids a CCE caused by return type ambiguity in script access.ObjectgetStaplerFallback()RelocationUIgetUi()Getter for the UI to display in this action.StringgetUrlName()
-
-
-
Field Detail
-
RELOCATE
public static final Permission RELOCATE
The permission required to move an item.
-
-
Constructor Detail
-
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 Detail
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileNamein interfaceAction
-
getIconClassName
public String getIconClassName()
- Specified by:
getIconClassNamein interfaceIconSpec
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlNamein interfaceAction
-
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
nullif not supported. - Since:
- 4.9
-
getStaplerFallback
public Object getStaplerFallback()
- Specified by:
getStaplerFallbackin interfaceorg.kohsuke.stapler.StaplerFallback
-
getItemParent
public ItemGroup<?> getItemParent()
Avoids a CCE caused by return type ambiguity in script access.- Returns:
Item.getParent()ofgetItem()
-
-