public static final class RemoteRepository.Builder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static int |
AUTH |
(package private) Authentication |
authentication |
private static RepositoryPolicy |
DEFAULT_POLICY |
(package private) int |
delta |
(package private) java.lang.String |
id |
(package private) static int |
ID |
(package private) static int |
MIRRORED |
(package private) java.util.List<RemoteRepository> |
mirroredRepositories |
(package private) RemoteRepository |
prototype |
(package private) Proxy |
proxy |
(package private) static int |
PROXY |
(package private) RepositoryPolicy |
releasePolicy |
(package private) static int |
RELEASES |
(package private) static int |
REPOMAN |
(package private) boolean |
repositoryManager |
(package private) RepositoryPolicy |
snapshotPolicy |
(package private) static int |
SNAPSHOTS |
(package private) java.lang.String |
type |
(package private) static int |
TYPE |
(package private) java.lang.String |
url |
(package private) static int |
URL |
Constructor and Description |
---|
Builder(RemoteRepository prototype)
Creates a new repository builder which uses the specified remote repository as a prototype for the new one.
|
Builder(java.lang.String id,
java.lang.String type,
java.lang.String url)
Creates a new repository builder.
|
Modifier and Type | Method and Description |
---|---|
RemoteRepository.Builder |
addMirroredRepository(RemoteRepository mirroredRepository)
Adds the specified repository to the list of repositories being mirrored by the repository.
|
RemoteRepository |
build()
Builds a new remote repository from the current values of this builder.
|
private <T> void |
delta(int flag,
T builder,
T prototype) |
RemoteRepository.Builder |
setAuthentication(Authentication authentication)
Sets the authentication to use in order to access the repository.
|
RemoteRepository.Builder |
setContentType(java.lang.String type)
Sets the type of the repository, e.g.
|
RemoteRepository.Builder |
setId(java.lang.String id)
Sets the identifier of the repository.
|
RemoteRepository.Builder |
setMirroredRepositories(java.util.List<RemoteRepository> mirroredRepositories)
Sets the repositories being mirrored by the repository.
|
RemoteRepository.Builder |
setPolicy(RepositoryPolicy policy)
Sets the policy to apply for snapshot and release artifacts.
|
RemoteRepository.Builder |
setProxy(Proxy proxy)
Sets the proxy to use in order to access the repository.
|
RemoteRepository.Builder |
setReleasePolicy(RepositoryPolicy releasePolicy)
Sets the policy to apply for release artifacts.
|
RemoteRepository.Builder |
setRepositoryManager(boolean repositoryManager)
Marks the repository as a repository manager or not.
|
RemoteRepository.Builder |
setSnapshotPolicy(RepositoryPolicy snapshotPolicy)
Sets the policy to apply for snapshot artifacts.
|
RemoteRepository.Builder |
setUrl(java.lang.String url)
Sets the (base) URL of the repository.
|
private static final RepositoryPolicy DEFAULT_POLICY
static final int ID
static final int TYPE
static final int URL
static final int RELEASES
static final int SNAPSHOTS
static final int PROXY
static final int AUTH
static final int MIRRORED
static final int REPOMAN
int delta
RemoteRepository prototype
java.lang.String id
java.lang.String type
java.lang.String url
RepositoryPolicy releasePolicy
RepositoryPolicy snapshotPolicy
Proxy proxy
Authentication authentication
java.util.List<RemoteRepository> mirroredRepositories
boolean repositoryManager
public Builder(java.lang.String id, java.lang.String type, java.lang.String url)
id
- The identifier of the repository, may be null
.type
- The type of the repository, may be null
.url
- The (base) URL of the repository, may be null
.public Builder(RemoteRepository prototype)
prototype
- The remote repository to use as prototype, must not be null
.public RemoteRepository build()
null
.private <T> void delta(int flag, T builder, T prototype)
public RemoteRepository.Builder setId(java.lang.String id)
id
- The identifier of the repository, may be null
.null
.public RemoteRepository.Builder setContentType(java.lang.String type)
type
- The type of the repository, may be null
.null
.public RemoteRepository.Builder setUrl(java.lang.String url)
url
- The URL of the repository, may be null
.null
.public RemoteRepository.Builder setPolicy(RepositoryPolicy policy)
policy
- The repository policy to set, may be null
to use a default policy.null
.public RemoteRepository.Builder setReleasePolicy(RepositoryPolicy releasePolicy)
releasePolicy
- The repository policy to set, may be null
to use a default policy.null
.public RemoteRepository.Builder setSnapshotPolicy(RepositoryPolicy snapshotPolicy)
snapshotPolicy
- The repository policy to set, may be null
to use a default policy.null
.public RemoteRepository.Builder setProxy(Proxy proxy)
proxy
- The proxy to use, may be null
.null
.public RemoteRepository.Builder setAuthentication(Authentication authentication)
authentication
- The authentication to use, may be null
.null
.public RemoteRepository.Builder setMirroredRepositories(java.util.List<RemoteRepository> mirroredRepositories)
mirroredRepositories
- The repositories being mirrored by the repository, may be null
.null
.public RemoteRepository.Builder addMirroredRepository(RemoteRepository mirroredRepository)
constructed from a prototype
, the given repository
will be added to the list of mirrored repositories from the prototype.mirroredRepository
- The repository being mirrored by the repository, may be null
.null
.public RemoteRepository.Builder setRepositoryManager(boolean repositoryManager)
repositoryManager
- true
if the repository points at a repository manager, false
if the
repository is just serving static contents.null
.