core/src/main/java/org/commonjava/indy/core/content/DefaultDownloadManager.java
@Override
    public Transfer store( final List<? extends ArtifactStore> stores, final String path, final InputStream stream,
                           final TransferOperation op, final EventMetadata eventMetadata )
            throws IndyWorkflowException
    {
        final ContentQuality quality = getQuality( path );

        HostedRepository selected = null;
        for ( final ArtifactStore store : stores )
        {
            if ( !isIgnoreReadonly( eventMetadata ) && storeManager.isReadonly( store ) )
            {
                logger.debug( "The store {} is readonly, store operation not allowed" );
                continue;
            }
            if ( storeIsSuitableFor( store, quality, op ) )
            {
                selected = (HostedRepository) store;
                break;
            }
        }

        if ( selected == null )
        {
            logger.warn( "Cannot deploy. No valid deploy points in group." );
            throw new IndyWorkflowException( ApplicationStatus.BAD_REQUEST.code(),
                                             "No deployment locations available." );
        }

        logger.info( "Storing: {} in selected: {} with event metadata: {}", path, selected, eventMetadata );
        store( selected, path, stream, op, eventMetadata );

        return getStorageReference( selected.getKey(), path );
    }
@Override
    public Transfer store( final List<? extends ArtifactStore> stores, final String path, final InputStream stream,
                           final TransferOperation op, final EventMetadata eventMetadata )
            throws IndyWorkflowException
    {
        final ContentQuality quality = getQuality( path );

        HostedRepository selected = null;
        for ( final ArtifactStore store : stores )
        {
            if ( !isIgnoreReadonly( eventMetadata ) && storeManager.isReadonly( store ) )
            {
                logger.debug( "The store {} is readonly, store operation not allowed" );
                continue;
            }
            if ( storeIsSuitableFor( store, quality, op ) )
            {
                selected = (HostedRepository) store;
                break;
            }
        }

        if ( selected == null )
        {
            logger.warn( "Cannot deploy. No valid deploy points in group." );
            throw new IndyWorkflowException( ApplicationStatus.BAD_REQUEST.code(),
                                             "No deployment locations available." );
        }

        logger.info( "Storing: {} in selected: {} with event metadata: {}", path, selected, eventMetadata );
        store( selected, path, stream, op, eventMetadata );

        return getStorageReference( selected.getKey(), path );
    }
/*
(non-Javadoc)
@see org.commonjava.indy.core.rest.util.FileManager#upload(java.util.List, java.lang.String,
java.io.InputStream)