mirror of https://github.com/apache/archiva.git
Removing unused method
This commit is contained in:
parent
a4b60a3b5b
commit
ae41cf55fa
|
@ -428,22 +428,6 @@ public interface ManagedRepositoryContent extends RepositoryContent
|
||||||
ManagedRepository getRepository();
|
ManagedRepository getRepository();
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* Given a specific {@link VersionedReference}, return the list of available versions for that
|
|
||||||
* versioned reference.
|
|
||||||
* </p>
|
|
||||||
* <p>
|
|
||||||
* <strong>NOTE:</strong> This is really only useful when working with SNAPSHOTs.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @param reference the versioned reference to work off of.
|
|
||||||
* @return the set of versions found.
|
|
||||||
* @throws ContentNotFoundException if the versioned reference does not exist within the repository.
|
|
||||||
*/
|
|
||||||
Set<String> getVersions( VersionedReference reference )
|
|
||||||
throws ContentNotFoundException, ContentAccessException, LayoutException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if the artifact referenced exists in the repository.
|
* Determines if the artifact referenced exists in the repository.
|
||||||
*
|
*
|
||||||
|
|
|
@ -40,7 +40,6 @@ import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -236,12 +235,6 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent
|
||||||
return repository;
|
return repository;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<String> getVersions( VersionedReference reference ) throws ContentNotFoundException, ContentAccessException, LayoutException
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasContent( ArtifactReference reference ) throws ContentAccessException
|
public boolean hasContent( ArtifactReference reference ) throws ContentAccessException
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,6 @@ import java.nio.file.Paths;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
@ -258,12 +257,6 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent
|
||||||
return repository;
|
return repository;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<String> getVersions( VersionedReference reference ) throws ContentNotFoundException, ContentAccessException, LayoutException
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasContent( ArtifactReference reference ) throws ContentAccessException
|
public boolean hasContent( ArtifactReference reference ) throws ContentAccessException
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,7 +47,6 @@ import java.nio.file.Paths;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
@ -262,12 +261,6 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent
|
||||||
return repository;
|
return repository;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<String> getVersions( VersionedReference reference ) throws ContentNotFoundException, ContentAccessException, LayoutException
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasContent( ArtifactReference reference ) throws ContentAccessException
|
public boolean hasContent( ArtifactReference reference ) throws ContentAccessException
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,7 +67,6 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
@ -1170,22 +1169,6 @@ public class ManagedDefaultRepositoryContent
|
||||||
return repository;
|
return repository;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<String> getVersions( VersionedReference reference )
|
|
||||||
throws ContentNotFoundException, ContentAccessException, LayoutException
|
|
||||||
{
|
|
||||||
try(Stream<ArtifactReference> stream = newArtifactStream( reference ))
|
|
||||||
{
|
|
||||||
return stream.filter( Objects::nonNull )
|
|
||||||
.map( ar -> ar.getVersion( ) )
|
|
||||||
.collect( Collectors.toSet( ) );
|
|
||||||
} catch (IOException e) {
|
|
||||||
final String path = toPath( reference );
|
|
||||||
log.error("Could not read directory from repository {} - {}: ", getId(), path, e.getMessage(), e);
|
|
||||||
throw new ContentAccessException( "Could not read path for repository "+getId()+": "+ path, e );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasContent( ArtifactReference reference ) throws ContentAccessException
|
public boolean hasContent( ArtifactReference reference ) throws ContentAccessException
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue