public final class MetadataRequest extends Object
Constructor and Description |
---|
MetadataRequest()
Creates an uninitialized request.
|
MetadataRequest(Metadata metadata)
Creates a request to resolve the specified metadata from the local repository.
|
MetadataRequest(Metadata metadata,
RemoteRepository repository,
String context)
Creates a request with the specified properties.
|
Modifier and Type | Method and Description |
---|---|
Metadata |
getMetadata()
Gets the metadata to resolve.
|
RemoteRepository |
getRepository()
Gets the repository from which the metadata should be resolved.
|
String |
getRequestContext()
Gets the context in which this request is made.
|
RequestTrace |
getTrace()
Gets the trace information that describes the higher level request/operation in which this request is issued.
|
boolean |
isDeleteLocalCopyIfMissing()
Indicates whether the locally cached copy of the metadata should be removed if the corresponding file does not
exist (any more) in the remote repository.
|
boolean |
isFavorLocalRepository()
Indicates whether the metadata resolution should be suppressed if the corresponding metadata of the local
repository is up-to-date according to the update policy of the remote repository.
|
MetadataRequest |
setDeleteLocalCopyIfMissing(boolean deleteLocalCopyIfMissing)
Controls whether the locally cached copy of the metadata should be removed if the corresponding file does not
exist (any more) in the remote repository.
|
MetadataRequest |
setFavorLocalRepository(boolean favorLocalRepository)
Controls resolution of remote metadata when already corresponding metadata of the local repository exists.
|
MetadataRequest |
setMetadata(Metadata metadata)
Sets the metadata to resolve.
|
MetadataRequest |
setRepository(RemoteRepository repository)
Sets the repository from which the metadata should be resolved.
|
MetadataRequest |
setRequestContext(String context)
Sets the context in which this request is made.
|
MetadataRequest |
setTrace(RequestTrace trace)
Sets the trace information that describes the higher level request/operation in which this request is issued.
|
String |
toString() |
public MetadataRequest()
public MetadataRequest(Metadata metadata)
metadata
- The metadata to resolve, may be null
.public MetadataRequest(Metadata metadata, RemoteRepository repository, String context)
metadata
- The metadata to resolve, may be null
.repository
- The repository to resolve the metadata from, may be null
to resolve from the local
repository.context
- The context in which this request is made, may be null
.public Metadata getMetadata()
null
if not set.public MetadataRequest setMetadata(Metadata metadata)
metadata
- The metadata, may be null
.null
.public RemoteRepository getRepository()
null
to resolve from the local repository.public MetadataRequest setRepository(RemoteRepository repository)
repository
- The repository, may be null
to resolve from the local repository.null
.public String getRequestContext()
null
.public MetadataRequest setRequestContext(String context)
context
- The context, may be null
.null
.public boolean isDeleteLocalCopyIfMissing()
true
if locally cached metadata should be deleted if no corresponding remote file exists,
false
to keep the local copy.public MetadataRequest setDeleteLocalCopyIfMissing(boolean deleteLocalCopyIfMissing)
deleteLocalCopyIfMissing
- true
if locally cached metadata should be deleted if no corresponding
remote file exists, false
to keep the local copy.null
.public boolean isFavorLocalRepository()
true
to suppress resolution of remote metadata if the corresponding metadata of the local
repository is up-to-date, false
to resolve the remote metadata normally according to the update
policy.public MetadataRequest setFavorLocalRepository(boolean favorLocalRepository)
favorLocalRepository
- true
to suppress resolution of remote metadata if the corresponding metadata
of the local repository is up-to-date, false
to resolve the remote metadata normally according
to the update policy.null
.public RequestTrace getTrace()
null
if none.public MetadataRequest setTrace(RequestTrace trace)
trace
- The trace information about the higher level operation, may be null
.null
.Copyright © 2010–2018 The Apache Software Foundation. All rights reserved.