addons/promote/common/src/main/java/org/commonjava/indy/promote/data/PromotionManager.java
@Measure
    public PathsPromoteResult promotePaths( final PathsPromoteRequest request, final String baseUrl )
            throws PromotionException, IndyWorkflowException
    {
        MDC.put( PROMOTION_TYPE, PATH_PROMOTION );
        MDC.put( PROMOTION_SOURCE, request.getSource().toString() );
        MDC.put( PROMOTION_TARGET, request.getTargetKey().toString() );

        Future<PathsPromoteResult> future = submitPathsPromoteRequest( request, baseUrl );
        if ( request.isAsync() )
        {
            return new PathsPromoteResult( request ).accepted();
        }
        else
        {
            try
            {
                return future.get();
            }
            catch ( InterruptedException | ExecutionException e )
            {
                logger.error( "Path prromotion failed: " + request.getSource() + " -> " + request.getTargetKey(), e );
                throw new PromotionException( "Execution of path promotion failed.", e );
            }
        }
    }
@Measure
    public PathsPromoteResult promotePaths( final PathsPromoteRequest request, final String baseUrl )
            throws PromotionException, IndyWorkflowException
    {
        MDC.put( PROMOTION_TYPE, PATH_PROMOTION );
        MDC.put( PROMOTION_SOURCE, request.getSource().toString() );
        MDC.put( PROMOTION_TARGET, request.getTargetKey().toString() );

        Future<PathsPromoteResult> future = submitPathsPromoteRequest( request, baseUrl );
        if ( request.isAsync() )
        {
            return new PathsPromoteResult( request ).accepted();
        }
        else
        {
            try
            {
                return future.get();
            }
            catch ( InterruptedException | ExecutionException e )
            {
                logger.error( "Path prromotion failed: " + request.getSource() + " -> " + request.getTargetKey(), e );
                throw new PromotionException( "Execution of path promotion failed.", e );
            }
        }
    }
@ Measure public PathsPromoteResult promotePaths ( final PathsPromoteRequest request , final String baseUrl ) throws PromotionException , IndyWorkflowException { MDC . put ( PROMOTION_TYPE , PATH_PROMOTION ) ; MDC . put ( PROMOTION_SOURCE , request . getSource ( ) . toString ( ) ) ; MDC . put ( PROMOTION_TARGET , request . getTargetKey ( ) . toString ( ) ) ; Future < PathsPromoteResult > future = submitPathsPromoteRequest ( request , baseUrl ) ; if ( request . isAsync ( ) ) { return new PathsPromoteResult ( request ) . accepted ( ) ; } else { try { return future . get ( ) ; } catch ( InterruptedException | ExecutionException e ) { logger . error ( "Path prromotion failed: " + request . getSource ( ) + " -> " + request . getTargetKey ( ) , e ) ; throw new PromotionException ( "Execution of path promotion failed." , e ) ; } } }
Promote artifacts from the source to the target given in the {@link PathsPromoteRequest}. If a set of paths are given, only try to promotePaths those.
Otherwise, build a recursive list of available artifacts in the source store, and try to promotePaths them all.

@param request The request containing source and target store keys, and an optional list of paths to promotePaths

@return The result, including the source and target store keys used, the paths completed (promoted successfully), the pending paths (those that
weren't processed due to some error...or null), and a nullable error explaining what (if anything) went wrong with the promotion.

@throws PromotionException
@throws IndyWorkflowException
Promote artifacts from the source to the target given in the { @link PathsPromoteRequest } . If a set of paths are given only try to promotePaths those . Otherwise build a recursive list of available artifacts in the source store and try to promotePaths them all .