Package org.eclipse.aether.repository
Class LocalArtifactResult
java.lang.Object
org.eclipse.aether.repository.LocalArtifactResult
A result from the local repository about the existence of an artifact.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionLocalArtifactResult(LocalArtifactRequest request) Creates a new result for the specified request.
- 
Method SummaryModifier and TypeMethodDescriptiongetFile()Gets the file to the requested artifact.Gets the (first) remote repository from which the artifact was cached (if any).Gets the request corresponding to this result.booleanIndicates whether the requested artifact is available for use.setAvailable(boolean available) Sets whether the artifact is available.Sets the file to requested artifact.setRepository(RemoteRepository repository) Sets the (first) remote repository from which the artifact was cached.toString()
- 
Constructor Details- 
LocalArtifactResultCreates a new result for the specified request.- Parameters:
- request- The local artifact request, must not be- null.
 
 
- 
- 
Method Details- 
getRequestGets the request corresponding to this result.- Returns:
- The corresponding request, never null.
 
- 
getFileGets the file to the requested artifact. Note that this file must not be used unlessisAvailable()returnstrue. An artifact file can be found but considered unavailable if the artifact was cached from a remote repository that is not part of the list of remote repositories used for the query.- Returns:
- The file to the requested artifact or nullif the artifact does not exist locally.
 
- 
setFileSets the file to requested artifact.- Parameters:
- file- The artifact file, may be- null.
- Returns:
- This result for chaining, never null.
 
- 
isAvailableIndicates whether the requested artifact is available for use. As a minimum, the file needs to be physically existent in the local repository to be available. Additionally, a local repository manager can consider the list of supplied remote repositories to determine whether the artifact is logically available and mark an artifact unavailable (despite its physical existence) if it is not known to be hosted by any of the provided repositories.- Returns:
- trueif the artifact is available,- falseotherwise.
- See Also:
 
- 
setAvailableSets whether the artifact is available.- Parameters:
- available-- trueif the artifact is available,- falseotherwise.
- Returns:
- This result for chaining, never null.
 
- 
getRepositoryGets the (first) remote repository from which the artifact was cached (if any).- Returns:
- The remote repository from which the artifact was originally retrieved or nullif unknown or if the artifact has been locally installed.
- See Also:
 
- 
setRepositorySets the (first) remote repository from which the artifact was cached.- Parameters:
- repository- The remote repository from which the artifact was originally retrieved, may be- nullif unknown or if the artifact has been locally installed.
- Returns:
- This result for chaining, never null.
 
- 
toString
 
-