public final class RemoteRepository extends java.lang.Object implements ArtifactRepository
Modifier and Type | Class and Description |
---|---|
static class |
RemoteRepository.Builder
A builder to create remote repositories.
|
Modifier and Type | Field and Description |
---|---|
private Authentication |
authentication |
private boolean |
blocked |
private java.lang.String |
host |
private java.lang.String |
id |
private java.util.List<RemoteRepository> |
mirroredRepositories |
private java.lang.String |
protocol |
private Proxy |
proxy |
private RepositoryPolicy |
releasePolicy |
private boolean |
repositoryManager |
private RepositoryPolicy |
snapshotPolicy |
private java.lang.String |
type |
private java.lang.String |
url |
private static java.util.regex.Pattern |
URL_PATTERN |
Constructor and Description |
---|
RemoteRepository(RemoteRepository.Builder builder) |
Modifier and Type | Method and Description |
---|---|
private static java.util.List<RemoteRepository> |
copy(java.util.List<RemoteRepository> repos) |
boolean |
equals(java.lang.Object obj) |
Authentication |
getAuthentication()
Gets the authentication that has been selected for this repository.
|
java.lang.String |
getContentType()
Gets the type of the repository, for example "default".
|
java.lang.String |
getHost()
Gets the host part from the repository's URL.
|
java.lang.String |
getId()
Gets the identifier of this repository.
|
java.util.List<RemoteRepository> |
getMirroredRepositories()
Gets the repositories that this repository serves as a mirror for.
|
RepositoryPolicy |
getPolicy(boolean snapshot)
Gets the policy to apply for snapshot/release artifacts.
|
java.lang.String |
getProtocol()
Gets the protocol part from the repository's URL, for example
file or http . |
Proxy |
getProxy()
Gets the proxy that has been selected for this repository.
|
java.lang.String |
getUrl()
Gets the (base) URL of this repository.
|
private static int |
hash(java.lang.Object obj) |
int |
hashCode() |
boolean |
isBlocked()
Indicates whether this repository is blocked from performing any download requests.
|
boolean |
isRepositoryManager()
Indicates whether this repository refers to a repository manager or not.
|
java.lang.String |
toString() |
private static final java.util.regex.Pattern URL_PATTERN
private final java.lang.String id
private final java.lang.String type
private final java.lang.String url
private final java.lang.String host
private final java.lang.String protocol
private final RepositoryPolicy releasePolicy
private final RepositoryPolicy snapshotPolicy
private final Proxy proxy
private final Authentication authentication
private final java.util.List<RemoteRepository> mirroredRepositories
private final boolean repositoryManager
private final boolean blocked
RemoteRepository(RemoteRepository.Builder builder)
private static java.util.List<RemoteRepository> copy(java.util.List<RemoteRepository> repos)
public java.lang.String getId()
ArtifactRepository
getId
in interface ArtifactRepository
null
.public java.lang.String getContentType()
ArtifactRepository
getContentType
in interface ArtifactRepository
null
.public java.lang.String getUrl()
null
.public java.lang.String getProtocol()
file
or http
. As suggested by RFC
2396, section 3.1 "Scheme Component", the protocol name should be treated case-insensitively.null
.public java.lang.String getHost()
null
.public RepositoryPolicy getPolicy(boolean snapshot)
snapshot
- true
to retrieve the snapshot policy, false
to retrieve the release policy.null
.public Proxy getProxy()
null
if none.public Authentication getAuthentication()
null
if none.public java.util.List<RemoteRepository> getMirroredRepositories()
null
.public boolean isRepositoryManager()
true
if this repository is a repository manager, false
otherwise.public boolean isBlocked()
true
if this repository is blocked from performing any download requests,
false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
private static int hash(java.lang.Object obj)