@Test public void testIsSupportFile() { assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.sha1" ) ); assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.md5" ) ); assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.asc" ) ); assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.pgp" ) ); assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1" ) ); assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml.md5" ) ); assertFalse( repoRequest.isSupportFile( "test.maven-arch/poms/test-arch-2.0.3-SNAPSHOT.pom" ) ); assertFalse( repoRequest.isSupportFile( "test/maven-arch/test-arch/2.0.3-SNAPSHOT/test-arch-2.0.3-SNAPSHOT.jar" ) ); assertFalse( repoRequest.isSupportFile( "org/apache/archiva/archiva-api/1.0/archiva-api-1.0.xml.zip" ) ); assertFalse( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) ); assertFalse( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml" ) ); assertFalse( repoRequest.isSupportFile( "org/apache/derby/derby/maven-metadata.xml" ) ); }
public boolean isSupportFile( String requestedPath ) { int idx = requestedPath.lastIndexOf( '.' ); if ( idx <= 0 ) { return false; } String ext = requestedPath.substring( idx ); return ( ".sha1".equals( ext ) || ".md5".equals( ext ) || ".asc".equals( ext ) || ".pgp".equals( ext ) ); }
MavenRepositoryRequestInfo implements RepositoryRequestInfo { public boolean isSupportFile( String requestedPath ) { int idx = requestedPath.lastIndexOf( '.' ); if ( idx <= 0 ) { return false; } String ext = requestedPath.substring( idx ); return ( ".sha1".equals( ext ) || ".md5".equals( ext ) || ".asc".equals( ext ) || ".pgp".equals( ext ) ); } }
MavenRepositoryRequestInfo implements RepositoryRequestInfo { public boolean isSupportFile( String requestedPath ) { int idx = requestedPath.lastIndexOf( '.' ); if ( idx <= 0 ) { return false; } String ext = requestedPath.substring( idx ); return ( ".sha1".equals( ext ) || ".md5".equals( ext ) || ".asc".equals( ext ) || ".pgp".equals( ext ) ); } MavenRepositoryRequestInfo(ManagedRepository repository); }
MavenRepositoryRequestInfo implements RepositoryRequestInfo { public boolean isSupportFile( String requestedPath ) { int idx = requestedPath.lastIndexOf( '.' ); if ( idx <= 0 ) { return false; } String ext = requestedPath.substring( idx ); return ( ".sha1".equals( ext ) || ".md5".equals( ext ) || ".asc".equals( ext ) || ".pgp".equals( ext ) ); } MavenRepositoryRequestInfo(ManagedRepository repository); @Override ItemSelector toItemSelector( String requestPath ); boolean isMetadata( String requestedPath ); boolean isArchetypeCatalog( String requestedPath ); boolean isSupportFile( String requestedPath ); boolean isMetadataSupportFile( String requestedPath ); @Override String getLayout(String requestPath); String toNativePath( String requestedPath); @Override RepositoryFeature<T> getFeature(Class<T> clazz); @Override boolean supportsFeature(Class<T> clazz); }
MavenRepositoryRequestInfo implements RepositoryRequestInfo { public boolean isSupportFile( String requestedPath ) { int idx = requestedPath.lastIndexOf( '.' ); if ( idx <= 0 ) { return false; } String ext = requestedPath.substring( idx ); return ( ".sha1".equals( ext ) || ".md5".equals( ext ) || ".asc".equals( ext ) || ".pgp".equals( ext ) ); } MavenRepositoryRequestInfo(ManagedRepository repository); @Override ItemSelector toItemSelector( String requestPath ); boolean isMetadata( String requestedPath ); boolean isArchetypeCatalog( String requestedPath ); boolean isSupportFile( String requestedPath ); boolean isMetadataSupportFile( String requestedPath ); @Override String getLayout(String requestPath); String toNativePath( String requestedPath); @Override RepositoryFeature<T> getFeature(Class<T> clazz); @Override boolean supportsFeature(Class<T> clazz);  }