public abstract class RelocationHandler extends Object implements hudson.ExtensionPoint
Modifier and Type | Class and Description |
---|---|
static class |
RelocationHandler.HandlingMode |
Constructor and Description |
---|
RelocationHandler() |
Modifier and Type | Method and Description |
---|---|
abstract RelocationHandler.HandlingMode |
applicability(hudson.model.Item item)
Checks quickly whether this handler might be able to move a given item.
|
abstract org.kohsuke.stapler.HttpResponse |
handle(hudson.model.Item item,
hudson.model.ItemGroup<?> destination,
AtomicReference<hudson.model.Item> newItem,
List<? extends RelocationHandler> chain)
Possibly handles redirecting an item.
|
abstract List<? extends hudson.model.ItemGroup<?>> |
validDestinations(hudson.model.Item item)
Gathers a list of possible destinations to which an item may be moved.
|
@NonNull public abstract RelocationHandler.HandlingMode applicability(@NonNull hudson.model.Item item)
item
- an item which the user wishes to move@CheckForNull public abstract org.kohsuke.stapler.HttpResponse handle(@NonNull hudson.model.Item item, @NonNull hudson.model.ItemGroup<?> destination, @NonNull AtomicReference<hudson.model.Item> newItem, @NonNull List<? extends RelocationHandler> chain) throws IOException, InterruptedException
item
- an item which the user wishes to movedestination
- the location the user wishes to move it tonewItem
- if moving succeeds, set this to the new item (typically same object as item
)chain
- zero or more remaining handlers which could be delegated to (may call this method on the first and pass in the rest of the chain)Failure
if the move is known to not be able to proceed, or a custom response such as a redirect, or a delegated response from the first handler in the chain, or null if no HTTP response is warranted or possibleIOException
- if the move was attempted but failedInterruptedException
- if the move was attempted but was interrupted@NonNull public abstract List<? extends hudson.model.ItemGroup<?>> validDestinations(@NonNull hudson.model.Item item)
item
- an item which the user wishes to moveCopyright © 2016–2017. All rights reserved.