Package org.eclipse.aether.repository
Class RemoteRepository
- java.lang.Object
-
- org.eclipse.aether.repository.RemoteRepository
-
- All Implemented Interfaces:
ArtifactRepository
public final class RemoteRepository extends Object implements ArtifactRepository
A repository on a remote server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRemoteRepository.BuilderA builder to create remote repositories.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)AuthenticationgetAuthentication()Gets the authentication that has been selected for this repository.StringgetContentType()Gets the type of the repository, for example "default".StringgetHost()Gets the host part from the repository's URL.StringgetId()Gets the identifier of this repository.List<RemoteRepository>getMirroredRepositories()Gets the repositories that this repository serves as a mirror for.RepositoryPolicygetPolicy(boolean snapshot)Gets the policy to apply for snapshot/release artifacts.StringgetProtocol()Gets the protocol part from the repository's URL, for examplefileorhttp.ProxygetProxy()Gets the proxy that has been selected for this repository.StringgetUrl()Gets the (base) URL of this repository.inthashCode()booleanisRepositoryManager()Indicates whether this repository refers to a repository manager or not.StringtoString()
-
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:ArtifactRepositoryGets the identifier of this repository.- Specified by:
getIdin interfaceArtifactRepository- Returns:
- The (case-sensitive) identifier, never
null.
-
getContentType
public String getContentType()
Description copied from interface:ArtifactRepositoryGets the type of the repository, for example "default".- Specified by:
getContentTypein interfaceArtifactRepository- Returns:
- The (case-sensitive) type of the repository, never
null.
-
getUrl
public String getUrl()
Gets the (base) URL of this repository.- Returns:
- The (base) URL of this repository, never
null.
-
getProtocol
public String getProtocol()
Gets the protocol part from the repository's URL, for examplefileorhttp. 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
public String getHost()
Gets the host part from the repository's URL.- Returns:
- The host or an empty string if none, never
null.
-
getPolicy
public RepositoryPolicy getPolicy(boolean snapshot)
Gets the policy to apply for snapshot/release artifacts.- Parameters:
snapshot-trueto retrieve the snapshot policy,falseto retrieve the release policy.- Returns:
- The requested repository policy, never
null.
-
getProxy
public Proxy getProxy()
Gets the proxy that has been selected for this repository.- Returns:
- The selected proxy or
nullif none.
-
getAuthentication
public Authentication getAuthentication()
Gets the authentication that has been selected for this repository.- Returns:
- The selected authentication or
nullif none.
-
getMirroredRepositories
public List<RemoteRepository> 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:
trueif this repository is a repository manager,falseotherwise.
-
-