Package org.eclipse.aether.impl
Class UpdateCheck<T,E extends org.eclipse.aether.RepositoryException> 
java.lang.Object
org.eclipse.aether.impl.UpdateCheck<T,E> 
- Type Parameters:
- T-
- E-
A request to check if an update of an artifact/metadata from a remote repository is needed.
- See Also:
- Provisional:
- This type is provisional and can be changed, moved or removed without prior notice.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGets the policy to use for the artifact check.org.eclipse.aether.repository.RemoteRepositoryGets the repository which ultimately hosts the metadata to update.Gets the exception that occurred during the update check.getFile()Deprecated.getItem()Gets the item of the check.longGets the last-modified timestamp of the corresponding item produced by a local installation.Gets the policy to use for the metadata check.getPath()Returns the local file of the item.org.eclipse.aether.repository.RemoteRepositoryGets the repository from which a potential update/download will performed.booleanIndicates whether the local file given bygetFile(), if existent, should be considered valid or not.booleanGets the result of a check, denoting whether the remote repository should be checked for updates.setArtifactPolicy(String artifactPolicy) Sets the artifact policy to use for the check.setAuthoritativeRepository(org.eclipse.aether.repository.RemoteRepository authoritativeRepository) Sets the repository which ultimately hosts the metadata to update.setException(E exception) Sets the exception for this update check.Deprecated.UsesetPath(Path)instead.setFileValid(boolean fileValid) Controls whether the local file given bygetFile(), if existent, should be considered valid or not.Sets the item of the check.setLocalLastUpdated(long localLastUpdated) Sets the last-modified timestamp of the corresponding item produced by a local installation.setMetadataPolicy(String metadataPolicy) Sets the metadata policy to use for the check.Sets the local file of the item.setRepository(org.eclipse.aether.repository.RemoteRepository repository) Sets the repository from which a potential update/download will performed.setRequired(boolean required) Sets the result of an update check.toString()
- 
Constructor Details- 
UpdateCheckpublic UpdateCheck()Creates an uninitialized update check request.
 
- 
- 
Method Details- 
getLocalLastUpdatedGets the last-modified timestamp of the corresponding item produced by a local installation. If non-zero, a remote update will be surpressed if the local item is up-to-date, even if the remote item has not been cached locally.- Returns:
- The last-modified timestamp of the corresponding item produced by a local installation or 0to ignore any local item.
 
- 
setLocalLastUpdatedSets the last-modified timestamp of the corresponding item produced by a local installation. If non-zero, a remote update will be surpressed if the local item is up-to-date, even if the remote item has not been cached locally.- Parameters:
- localLastUpdated- The last-modified timestamp of the corresponding item produced by a local installation or- 0to ignore any local item.
- Returns:
- This object for chaining.
 
- 
getItemGets the item of the check.- Returns:
- The item of the check, never null.
 
- 
setItemSets the item of the check.- Parameters:
- item- The item of the check, must not be- null.
- Returns:
- This object for chaining.
 
- 
getFileDeprecated.UsegetPath()instead.Returns the local file of the item.- Returns:
- The local file of the item.
 
- 
getPathReturns the local file of the item.- Returns:
- The local file of the item.
- Since:
- 2.0.0
 
- 
setFileDeprecated.UsesetPath(Path)instead.Sets the local file of the item.- Parameters:
- file- The file of the item, never- null.
- Returns:
- This object for chaining.
 
- 
setPathSets the local file of the item.- Parameters:
- path- The file of the item, never- null.
- Returns:
- This object for chaining.
- Since:
- 2.0.0
 
- 
isFileValidIndicates whether the local file given bygetFile(), if existent, should be considered valid or not. An invalid file is equivalent to a physically missing file.- Returns:
- trueif the file should be considered valid if existent,- falseif the file should be treated as if it was missing.
 
- 
setFileValidControls whether the local file given bygetFile(), if existent, should be considered valid or not. An invalid file is equivalent to a physically missing file.- Parameters:
- fileValid-- trueif the file should be considered valid if existent,- falseif the file should be treated as if it was missing.
- Returns:
- This object for chaining.
 
- 
getArtifactPolicyGets the policy to use for the artifact check.- Returns:
- The policy to use for the artifact check.
- Since:
- 2.0.0
- See Also:
 
- 
getMetadataPolicyGets the policy to use for the metadata check.- Returns:
- The policy to use for the metadata check.
- Since:
- 2.0.0
- See Also:
 
- 
setArtifactPolicySets the artifact policy to use for the check.- Parameters:
- artifactPolicy- The policy to use for the artifact check, may be- null.
- Returns:
- This object for chaining.
- Since:
- 2.0.0
- See Also:
 
- 
setMetadataPolicySets the metadata policy to use for the check.- Parameters:
- metadataPolicy- The policy to use for the metadata check, may be- null.
- Returns:
- This object for chaining.
- Since:
- 2.0.0
- See Also:
 
- 
getRepositoryGets the repository from which a potential update/download will performed.- Returns:
- The repository to use for the check.
 
- 
setRepositorySets the repository from which a potential update/download will performed.- Parameters:
- repository- The repository to use for the check, must not be- null.
- Returns:
- This object for chaining.
 
- 
getAuthoritativeRepositoryGets the repository which ultimately hosts the metadata to update. This will be different from the repository given bygetRepository()in case the latter denotes a repository manager.- Returns:
- The actual repository hosting the authoritative copy of the metadata to update, never nullfor a metadata update check.
 
- 
setAuthoritativeRepositorypublic UpdateCheck<T,E> setAuthoritativeRepository(org.eclipse.aether.repository.RemoteRepository authoritativeRepository) Sets the repository which ultimately hosts the metadata to update. This will be different from the repository given bygetRepository()in case the latter denotes a repository manager.- Parameters:
- authoritativeRepository- The actual repository hosting the authoritative copy of the metadata to update, must not be- nullfor a metadata update check.
- Returns:
- This object for chaining.
 
- 
isRequiredGets the result of a check, denoting whether the remote repository should be checked for updates.- Returns:
- The result of a check.
 
- 
setRequiredSets the result of an update check.- Parameters:
- required- The result of an update check. In case of- falseand the local file given by- getFile()does actually not exist,- setException(RepositoryException)should be used to provide the previous/cached failure that explains the absence of the file.
- Returns:
- This object for chaining.
 
- 
getExceptionGets the exception that occurred during the update check.- Returns:
- The occurred exception or nullif the update check was successful.
 
- 
setExceptionSets the exception for this update check.- Parameters:
- exception- The exception for this update check, may be- nullif the check was successful.
- Returns:
- This object for chaining.
 
- 
toString
 
- 
getPath()instead.