addons/implied-repos/model-java/src/main/java/org/commonjava/indy/implrepo/data/ImpliedRepoMetadataManager.java
public void addImpliedMetadata( final ArtifactStore origin, final List<ArtifactStore> implied )
        throws ImpliedReposException
    {
        try
        {
            final List<StoreKey> impliedKeys = new ArrayList<>( implied.size() );
            for ( final ArtifactStore store : implied )
            {
                impliedKeys.add( store.getKey() );
                updateImpliedBy( store, origin );
            }

            origin.setMetadata( IMPLIED_STORES, mapper.writeValueAsString( new ImpliedRemotesWrapper( impliedKeys ) ) );
        }
        catch ( final JsonProcessingException e )
        {
            throw new ImpliedReposException( "Failed to serialize implied stores: %s to JSON: %s. Error: %s", e,
                                             implied, origin.getKey(), e.getMessage() );
        }
    }
public void addImpliedMetadata( final ArtifactStore origin, final List<ArtifactStore> implied )
        throws ImpliedReposException
    {
        try
        {
            final List<StoreKey> impliedKeys = new ArrayList<>( implied.size() );
            for ( final ArtifactStore store : implied )
            {
                impliedKeys.add( store.getKey() );
                updateImpliedBy( store, origin );
            }

            origin.setMetadata( IMPLIED_STORES, mapper.writeValueAsString( new ImpliedRemotesWrapper( impliedKeys ) ) );
        }
        catch ( final JsonProcessingException e )
        {
            throw new ImpliedReposException( "Failed to serialize implied stores: %s to JSON: %s. Error: %s", e,
                                             implied, origin.getKey(), e.getMessage() );
        }
    }
TODO: Need to deal with pre-existing implications.