core/src/main/java/org/commonjava/indy/core/content/DefaultContentManager.java
@Override
    public Transfer store( final List<? extends ArtifactStore> stores, final StoreKey topKey, final String path, final InputStream stream,
                           final TransferOperation op, final EventMetadata eventMetadata )
            throws IndyWorkflowException
    {
        logger.debug( "Storing: {} in: {} with event metadata: {}", path, stores, eventMetadata );
        final Transfer txfr = downloadManager.store( stores, path, stream, op, eventMetadata );
        if ( txfr != null )
        {
            final KeyedLocation kl = (KeyedLocation) txfr.getLocation();
            ArtifactStore transferStore;
            try
            {
                transferStore = storeManager.getArtifactStore( kl.getKey() );
            }
            catch ( final IndyDataException e )
            {
                throw new IndyWorkflowException( "Failed to lookup store: %s. Reason: %s", e, kl.getKey(),
                                                  e.getMessage() );
            }

            for ( final ContentGenerator generator : contentGenerators )
            {
                logger.debug( "{} Handling content storage of: {} in: {}", generator, path, transferStore.getKey() );
                generator.handleContentStorage( transferStore, path, txfr, eventMetadata );
            }

            clearNFCEntries(kl, path);
        }

        return txfr;
    }
@Override
    public Transfer store( final List<? extends ArtifactStore> stores, final StoreKey topKey, final String path, final InputStream stream,
                           final TransferOperation op, final EventMetadata eventMetadata )
            throws IndyWorkflowException
    {
        logger.debug( "Storing: {} in: {} with event metadata: {}", path, stores, eventMetadata );
        final Transfer txfr = downloadManager.store( stores, path, stream, op, eventMetadata );
        if ( txfr != null )
        {
            final KeyedLocation kl = (KeyedLocation) txfr.getLocation();
            ArtifactStore transferStore;
            try
            {
                transferStore = storeManager.getArtifactStore( kl.getKey() );
            }
            catch ( final IndyDataException e )
            {
                throw new IndyWorkflowException( "Failed to lookup store: %s. Reason: %s", e, kl.getKey(),
                                                  e.getMessage() );
            }

            for ( final ContentGenerator generator : contentGenerators )
            {
                logger.debug( "{} Handling content storage of: {} in: {}", generator, path, transferStore.getKey() );
                generator.handleContentStorage( transferStore, path, txfr, eventMetadata );
            }

            clearNFCEntries(kl, path);
        }

        return txfr;
    }
@ Override public Transfer store ( final List < ? extends ArtifactStore > stores , final StoreKey topKey , final String path , final InputStream stream , final TransferOperation op , final EventMetadata eventMetadata ) throws IndyWorkflowException { logger . debug ( "Storing: {} in: {} with event metadata: {}" , path , stores , eventMetadata ) ; final Transfer txfr = downloadManager . store ( stores , path , stream , op , eventMetadata ) ; if ( txfr != null ) { final KeyedLocation kl = ( KeyedLocation ) txfr . getLocation ( ) ; ArtifactStore transferStore ; try { transferStore = storeManager . getArtifactStore ( kl . getKey ( ) ) ; } catch ( final IndyDataException e ) { throw new IndyWorkflowException ( "Failed to lookup store: %s. Reason: %s" , e , kl . getKey ( ) , e . getMessage ( ) ) ; } for ( final ContentGenerator generator : contentGenerators ) { logger . debug ( "{} Handling content storage of: {} in: {}" , generator , path , transferStore . getKey ( ) ) ; generator . handleContentStorage ( transferStore , path , txfr , eventMetadata ) ; } clearNFCEntries ( kl , path ) ; } return txfr ; }
}
}