@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension(ordinal=-1000.0) public final class StandardHandler extends RelocationHandler
AbstractItem
and TopLevelItem
into a DirectlyModifiableTopLevelItemGroup
.RelocationHandler.HandlingMode
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
StandardHandler() |
Modifier and Type | Method and Description |
---|---|
RelocationHandler.HandlingMode |
applicability(Item item)
Checks quickly whether this handler might be able to move a given item.
|
org.kohsuke.stapler.HttpResponse |
handle(Item item,
ItemGroup<?> destination,
AtomicReference<Item> newItem,
List<? extends RelocationHandler> chain)
Possibly handles redirecting an item.
|
boolean |
hasValidDestination(Item item) |
List<? extends ItemGroup<?>> |
validDestinations(Item item)
Gathers a list of possible destinations to which an item may be moved.
|
public RelocationHandler.HandlingMode applicability(Item item)
RelocationHandler
applicability
in class RelocationHandler
item
- an item which the user wishes to movepublic org.kohsuke.stapler.HttpResponse handle(Item item, ItemGroup<?> destination, AtomicReference<Item> newItem, List<? extends RelocationHandler> chain) throws IOException, InterruptedException
RelocationHandler
handle
in class RelocationHandler
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 interruptedpublic boolean hasValidDestination(Item item)
public List<? extends ItemGroup<?>> validDestinations(Item item)
RelocationHandler
validDestinations
in class RelocationHandler
item
- an item which the user wishes to moveCopyright © 2016–2020. All rights reserved.