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 movingIteminstances.- 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 RelocationUIfor_(Item item)Retrieves theRelocationUIto use for the specified item.StringgetDisplayName()TheAction.getDisplayName()to present for this UI.StringgetIconClassName()StringgetIconFileName()TheAction.getIconFileName()to present for this UI.StringgetUrlName()TheAction.getUrlName()to present for this UI.abstract booleanisApplicableTo(Class<? extends Item> itemClass)Checks if thisRelocationUIis applicable to the specified type of item.abstract booleanisAvailable(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:
getIconClassNamein 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.RELOCATEpermission.- Parameters:
item- the item being checked.- Returns:
trueif the UI is available for the current user on the specified item.
-
isApplicableTo
public abstract boolean isApplicableTo(Class<? extends Item> itemClass)
Checks if thisRelocationUIis applicable to the specified type of item.- Parameters:
itemClass- the type of item.- Returns:
trueif 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 theRelocationUIto use for the specified item.- Parameters:
item- the item.- Returns:
- the
RelocationUIto use ornull
-
-