|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonatype.aether.impl.UpdateCheck<T,E>
public class UpdateCheck<T,E extends RepositoryException>
A request to check if an update of an artifact/metadata from a remote repository is needed.
UpdateCheckManager
Constructor Summary | |
---|---|
UpdateCheck()
|
Method Summary | |
---|---|
RemoteRepository |
getAuthoritativeRepository()
Gets the repository which ultimately hosts the metadata to update. |
E |
getException()
Gets the exception that occurred during the update check. |
File |
getFile()
Returns the local file of the item. |
T |
getItem()
Gets the item of the check. |
long |
getLocalLastUpdated()
Gets the last-modified timestamp of the corresponding item produced by a local installation. |
String |
getPolicy()
Gets the policy to use for the check. |
RemoteRepository |
getRepository()
Gets the repository from which a potential update/download will performed. |
boolean |
isFileValid()
Indicates whether the local file given by getFile() , if existent, should be considered valid or not. |
boolean |
isRequired()
Gets the result of a check, denoting whether the remote repository should be checked for updates. |
UpdateCheck<T,E> |
setAuthoritativeRepository(RemoteRepository authoritativeRepository)
Sets the repository which ultimately hosts the metadata to update. |
UpdateCheck<T,E> |
setException(E exception)
Sets the exception for this update check. |
UpdateCheck<T,E> |
setFile(File file)
Sets the local file of the item. |
UpdateCheck<T,E> |
setFileValid(boolean fileValid)
Controls whether the local file given by getFile() , if existent, should be considered valid or not. |
UpdateCheck<T,E> |
setItem(T item)
Sets the item of the check. |
UpdateCheck<T,E> |
setLocalLastUpdated(long localLastUpdated)
Sets the last-modified timestamp of the corresponding item produced by a local installation. |
UpdateCheck<T,E> |
setPolicy(String policy)
Sets the policy to use for the check. |
UpdateCheck<T,E> |
setRepository(RemoteRepository repository)
Sets the repository from which a potential update/download will performed. |
UpdateCheck<T,E> |
setRequired(boolean required)
Sets the result of an update check. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UpdateCheck()
Method Detail |
---|
public long getLocalLastUpdated()
0
to
ignore any local item.public UpdateCheck<T,E> setLocalLastUpdated(long localLastUpdated)
localLastUpdated
- The last-modified timestamp of the corresponding item produced by a local installation or
0
to ignore any local item.
public T getItem()
null
.public UpdateCheck<T,E> setItem(T item)
item
- The item of the check, must not be null
.
public File getFile()
public UpdateCheck<T,E> setFile(File file)
file
- The file of the item, never null
.
public boolean isFileValid()
getFile()
, if existent, should be considered valid or not. An
invalid file is equivalent to a physically missing file.
true
if the file should be considered valid if existent, false
if the file should be
treated as if it was missing.public UpdateCheck<T,E> setFileValid(boolean fileValid)
getFile()
, if existent, should be considered valid or not. An
invalid file is equivalent to a physically missing file.
fileValid
- true
if the file should be considered valid if existent, false
if the file
should be treated as if it was missing.
public String getPolicy()
RepositoryPolicy
public UpdateCheck<T,E> setPolicy(String policy)
policy
- The policy to use for the check, may be null
.
RepositoryPolicy
public RemoteRepository getRepository()
public UpdateCheck<T,E> setRepository(RemoteRepository repository)
repository
- The repository to use for the check, must not be null
.
public RemoteRepository getAuthoritativeRepository()
getRepository()
in case the latter denotes a repository manager.
null
for a
metadata update check.public UpdateCheck<T,E> setAuthoritativeRepository(RemoteRepository authoritativeRepository)
getRepository()
in case the latter denotes a repository manager.
authoritativeRepository
- The actual repository hosting the authoritative copy of the metadata to update,
must not be null
for a metadata update check.
public boolean isRequired()
public UpdateCheck<T,E> setRequired(boolean required)
required
- The result of an update check. In case of false
and 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.
public E getException()
null
if the update check was successful.public UpdateCheck<T,E> setException(E exception)
exception
- The exception for this update check, may be null
if the check was successful.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |