Class RelocationUI
- java.lang.Object
-
- com.cloudbees.hudson.plugins.folder.relocate.RelocationUI
-
- All Implemented Interfaces:
ExtensionPoint
,IconSpec
- Direct Known Subclasses:
DefaultRelocationUI
public abstract class RelocationUI extends Object implements ExtensionPoint, IconSpec
Extension point to provide a pluggable UI for movingItem
instances.- Since:
- 4.9
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description RelocationUI()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static RelocationUI
for_(Item item)
Retrieves theRelocationUI
to use for the specified item.String
getDisplayName()
TheAction.getDisplayName()
to present for this UI.String
getIconClassName()
String
getIconFileName()
TheAction.getIconFileName()
to present for this UI.String
getUrlName()
TheAction.getUrlName()
to present for this UI.abstract boolean
isApplicableTo(Class<? extends Item> itemClass)
Checks if thisRelocationUI
is applicable to the specified type of item.abstract boolean
isAvailable(Item item)
Checks if the relocation operation is currently available for the specific item (asJenkins.getAuthentication()
if the user is a factor).
-
-
-
Method Detail
-
getDisplayName
@NonNull public String getDisplayName()
TheAction.getDisplayName()
to present for this UI.- Returns:
- the
Action.getDisplayName()
to present for this UI, nevernull
- See Also:
Action.getDisplayName()
-
getUrlName
@NonNull public String getUrlName()
TheAction.getUrlName()
to present for this UI.- Returns:
- the
Action.getUrlName()
to present for this UI, nevernull
- See Also:
Action.getUrlName()
-
getIconFileName
@NonNull public String getIconFileName()
TheAction.getIconFileName()
to present for this UI.- Returns:
- the
Action.getIconFileName()
to present for this UI, nevernull
- See Also:
Action.getIconFileName()
-
getIconClassName
public String getIconClassName()
- Specified by:
getIconClassName
in interfaceIconSpec
-
isAvailable
public abstract 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.RELOCATE
permission.- Parameters:
item
- the item being checked.- Returns:
true
if the UI is available for the current user on the specified item.
-
isApplicableTo
public abstract boolean isApplicableTo(Class<? extends Item> itemClass)
Checks if thisRelocationUI
is applicable to the specified type of item.- Parameters:
itemClass
- the type of item.- Returns:
true
if this UI is applicable to the specified type of item.- See Also:
ExtensionList
,Extension#ordinal() sorting
-
for_
@CheckForNull public static RelocationUI for_(@NonNull Item item)
Retrieves theRelocationUI
to use for the specified item.- Parameters:
item
- the item.- Returns:
- the
RelocationUI
to use ornull
-
-