@Override public String getUri() { return delegate.getUri(); }
@SuppressWarnings( "EqualsWhichDoesntCheckParameterClass" ) @Override public boolean equals( final Object other ) { return delegate.equals( other ); }
@Override public <T> T getAttribute( final String key, final Class<T> type, final T defaultValue ) { return delegate.getAttribute( key, type, defaultValue ); }
repository.setId( expLocation.getName().replaceAll( ".*:", "" ) ); repository.setUrl( expLocation.getUri() ); releasesPolicy.setEnabled( expLocation.allowsReleases() ); repository.setReleases( releasesPolicy ); snapshotsPolicy.setEnabled( expLocation.allowsSnapshots() ); repository.setSnapshots( snapshotsPolicy );
@Override public OutputStream decorateWrite( final OutputStream stream, final Transfer transfer, final TransferOperation op, final EventMetadata metadata ) throws IOException { final Location loc = transfer.getLocation(); final boolean allowsSnapshots = loc.allowsSnapshots(); final boolean allowsReleases = loc.allowsReleases(); if ( loc instanceof HttpLocation && ( !allowsSnapshots || !allowsReleases ) && transfer.getFullPath().endsWith( "maven-metadata.xml" ) ) { return new MetadataFilteringOutputStream( stream, allowsSnapshots, allowsReleases, transfer ); } else { return stream; } }
@Override public String getName() { return delegate.getName(); }
if ( !loc.getAttributes().containsKey( k ) ) loc.setAttribute( k, v );
@Override public boolean allowsSnapshots() { return delegate.allowsSnapshots(); }
@Override public boolean allowsReleases() { return location.allowsReleases(); }
public static void bind( final Location loc, final String type, final String password ) { if ( password == null ) { return; } loc.setAttribute( PASSWORD_PREFIX + type, password ); }
repository.setId( expLocation.getName().replaceAll( ".*:", "" ) ); repository.setUrl( expLocation.getUri() ); releasesPolicy.setEnabled( expLocation.allowsReleases() ); repository.setReleases( releasesPolicy ); snapshotsPolicy.setEnabled( expLocation.allowsSnapshots() ); repository.setSnapshots( snapshotsPolicy );
final boolean allowsSnapshots = loc.allowsSnapshots(); final boolean allowsReleases = loc.allowsReleases(); if ( !allowsSnapshots || !allowsReleases )
public String getLocationName() { return location.getName(); }
@Override public boolean allowsSnapshots() { return location.allowsSnapshots(); }
@Override public boolean allowsReleases() { return delegate.allowsReleases(); }
@Override public Object setAttribute( final String key, final Object value ) { return delegate.setAttribute( key, value ); }
public T withSourceLocation( final Location source ) { this.sourceLocation = source; this.source = sourceLocation.getUri(); return self; }
public static Integer getMaxConnections( Location location ) { return location.getAttribute( Location.MAX_CONNECTIONS, Integer.class, Location.DEFAULT_MAX_CONNECTIONS ); }
@Override public void clearMissing( final Location location ) { for ( final ConcreteResource resource : new HashSet<ConcreteResource>( missingWithTimeout.keySet() ) ) { if ( resource.getLocation() .equals( location ) ) { missingWithTimeout.remove( resource ); } } }
final boolean allowsSnapshots = loc.allowsSnapshots(); final boolean allowsReleases = loc.allowsReleases();