Class StandardHandler

    • Constructor Detail

      • StandardHandler

        public StandardHandler()
    • Method Detail

      • handle

        public org.kohsuke.stapler.HttpResponse handle​(Item item,
                                                       ItemGroup<?> destination,
                                                       AtomicReference<Item> newItem,
                                                       List<? extends RelocationHandler> chain)
                                                throws IOException,
        Description copied from class: RelocationHandler
        Possibly handles redirecting an item.
        Specified by:
        handle in class RelocationHandler
        item - an item which the user wishes to move
        destination - the location the user wishes to move it to
        newItem - 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 possible
        IOException - if the move was attempted but failed
        InterruptedException - if the move was attempted but was interrupted
      • hasValidDestination

        public boolean hasValidDestination​(Item item)
      • validDestinations

        public List<? extends ItemGroup<?>> validDestinations​(Item item)
        Description copied from class: RelocationHandler
        Gathers a list of possible destinations to which an item may be moved. The union of all destinations from various handlers is used.
        Specified by:
        validDestinations in class RelocationHandler
        item - an item which the user wishes to move
        potential destinations (may be empty if this handler does not need to add new kinds of destinations)