Package org.eclipse.aether.repository
Class RemoteRepository
java.lang.Object
org.eclipse.aether.repository.RemoteRepository
- All Implemented Interfaces:
ArtifactRepository
A repository on a remote server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A builder to create remote repositories. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Authentication
private final boolean
private final String
private final String
private final List
<RemoteRepository> private final String
private final Proxy
private final RepositoryPolicy
private final boolean
private final RepositoryPolicy
private final String
private final String
private static final Pattern
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static List
<RemoteRepository> copy
(List<RemoteRepository> repos) boolean
Gets the authentication that has been selected for this repository.Gets the type of the repository, for example "default".getHost()
Gets the host part from the repository's URL.getId()
Gets the identifier of this repository.Gets the repositories that this repository serves as a mirror for.getPolicy
(boolean snapshot) Gets the policy to apply for snapshot/release artifacts.Gets the protocol part from the repository's URL, for examplefile
orhttp
.getProxy()
Gets the proxy that has been selected for this repository.getUrl()
Gets the (base) URL of this repository.private static int
int
hashCode()
boolean
Indicates whether this repository is blocked from performing any download requests.boolean
Indicates whether this repository refers to a repository manager or not.toString()
-
Field Details
-
URL_PATTERN
-
id
-
type
-
url
-
host
-
protocol
-
releasePolicy
-
snapshotPolicy
-
proxy
-
authentication
-
mirroredRepositories
-
repositoryManager
private final boolean repositoryManager -
blocked
private final boolean blocked
-
-
Constructor Details
-
RemoteRepository
RemoteRepository(RemoteRepository.Builder builder)
-
-
Method Details
-
copy
-
getId
Description copied from interface:ArtifactRepository
Gets the identifier of this repository.- Specified by:
getId
in interfaceArtifactRepository
- Returns:
- The (case-sensitive) identifier, never
null
.
-
getContentType
Description copied from interface:ArtifactRepository
Gets the type of the repository, for example "default".- Specified by:
getContentType
in interfaceArtifactRepository
- Returns:
- The (case-sensitive) type of the repository, never
null
.
-
getUrl
Gets the (base) URL of this repository.- Returns:
- The (base) URL of this repository, never
null
.
-
getProtocol
Gets the protocol part from the repository's URL, for examplefile
orhttp
. As suggested by RFC 2396, section 3.1 "Scheme Component", the protocol name should be treated case-insensitively.- Returns:
- The protocol or an empty string if none, never
null
.
-
getHost
Gets the host part from the repository's URL.- Returns:
- The host or an empty string if none, never
null
.
-
getPolicy
Gets the policy to apply for snapshot/release artifacts.- Parameters:
snapshot
-true
to retrieve the snapshot policy,false
to retrieve the release policy.- Returns:
- The requested repository policy, never
null
.
-
getProxy
Gets the proxy that has been selected for this repository.- Returns:
- The selected proxy or
null
if none.
-
getAuthentication
Gets the authentication that has been selected for this repository.- Returns:
- The selected authentication or
null
if none.
-
getMirroredRepositories
Gets the repositories that this repository serves as a mirror for.- Returns:
- The (read-only) repositories being mirrored by this repository, never
null
.
-
isRepositoryManager
public boolean isRepositoryManager()Indicates whether this repository refers to a repository manager or not.- Returns:
true
if this repository is a repository manager,false
otherwise.
-
isBlocked
public boolean isBlocked()Indicates whether this repository is blocked from performing any download requests.- Returns:
true
if this repository is blocked from performing any download requests,false
otherwise.
-
toString
-
equals
-
hashCode
public int hashCode() -
hash
-