Package org.eclipse.aether.resolution
Class MetadataRequest
java.lang.Object
org.eclipse.aether.resolution.MetadataRequest
A request to resolve metadata from either a remote repository or the local repository.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCreates 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.
- 
Method SummaryModifier and TypeMethodDescriptionGets the metadata to resolve.Gets the repository from which the metadata should be resolved.Gets the context in which this request is made.getTrace()Gets the trace information that describes the higher level request/operation in which this request is issued.booleanIndicates whether the locally cached copy of the metadata should be removed if the corresponding file does not exist (any more) in the remote repository.booleanIndicates 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.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.setFavorLocalRepository(boolean favorLocalRepository) Controls resolution of remote metadata when already corresponding metadata of the local repository exists.setMetadata(Metadata metadata) Sets the metadata to resolve.setRepository(RemoteRepository repository) Sets the repository from which the metadata should be resolved.setRequestContext(String context) Sets the context in which this request is made.setTrace(RequestTrace trace) Sets the trace information that describes the higher level request/operation in which this request is issued.toString()
- 
Constructor Details- 
MetadataRequestpublic MetadataRequest()Creates an uninitialized request.
- 
MetadataRequestCreates a request to resolve the specified metadata from the local repository.- Parameters:
- metadata- The metadata to resolve, may be- null.
 
- 
MetadataRequestCreates a request with the specified properties.- Parameters:
- metadata- The metadata to resolve, may be- null.
- repository- The repository to resolve the metadata from, may be- nullto resolve from the local repository.
- context- The context in which this request is made, may be- null.
 
 
- 
- 
Method Details- 
getMetadataGets the metadata to resolve.- Returns:
- The metadata or nullif not set.
 
- 
setMetadataSets the metadata to resolve.- Parameters:
- metadata- The metadata, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
getRepositoryGets the repository from which the metadata should be resolved.- Returns:
- The repository or nullto resolve from the local repository.
 
- 
setRepositorySets the repository from which the metadata should be resolved.- Parameters:
- repository- The repository, may be- nullto resolve from the local repository.
- Returns:
- This request for chaining, never null.
 
- 
getRequestContextGets the context in which this request is made.- Returns:
- The context, never null.
 
- 
setRequestContextSets the context in which this request is made.- Parameters:
- context- The context, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
isDeleteLocalCopyIfMissingIndicates whether the locally cached copy of the metadata should be removed if the corresponding file does not exist (any more) in the remote repository.- Returns:
- trueif locally cached metadata should be deleted if no corresponding remote file exists,- falseto keep the local copy.
 
- 
setDeleteLocalCopyIfMissingControls whether the locally cached copy of the metadata should be removed if the corresponding file does not exist (any more) in the remote repository.- Parameters:
- deleteLocalCopyIfMissing-- trueif locally cached metadata should be deleted if no corresponding remote file exists,- falseto keep the local copy.
- Returns:
- This request for chaining, never null.
 
- 
isFavorLocalRepositoryIndicates 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. In this case, the metadata resolution will even be suppressed if no local copy of the remote metadata exists yet.- Returns:
- trueto suppress resolution of remote metadata if the corresponding metadata of the local repository is up-to-date,- falseto resolve the remote metadata normally according to the update policy.
 
- 
setFavorLocalRepositoryControls resolution of remote metadata when already corresponding metadata of the local repository exists. In cases where the local repository's metadata is sufficient and going to be preferred, resolution of the remote metadata can be suppressed to avoid unnecessary network access.- Parameters:
- favorLocalRepository-- trueto suppress resolution of remote metadata if the corresponding metadata of the local repository is up-to-date,- falseto resolve the remote metadata normally according to the update policy.
- Returns:
- This request for chaining, never null.
 
- 
getTraceGets the trace information that describes the higher level request/operation in which this request is issued.- Returns:
- The trace information about the higher level operation or nullif none.
 
- 
setTraceSets the trace information that describes the higher level request/operation in which this request is issued.- Parameters:
- trace- The trace information about the higher level operation, may be- null.
- Returns:
- This request for chaining, never null.
 
- 
toString
 
-