public class Upload extends Object implements GroupAction
This class determines whether a bunch of files can be uploaded to a given update site (possibly shadowing another update site's versions of the same files), how to mark them to be uploaded, and what to call this action in the GUI.
Modifier and Type | Method and Description |
---|---|
String |
getLabel(FilesCollection files,
Iterable<FileObject> selected) |
boolean |
isValid(FilesCollection files,
FileObject file)
Determines whether a particular set of files can be uploaded to this
update site.
|
void |
setAction(FilesCollection files,
FileObject file) |
String |
toString() |
public Upload(String updateSite)
public boolean isValid(FilesCollection files, FileObject file)
Uploading to a higher-ranked update site is called shadowing. This table indicates what actions are valid:
upload | shadow | |
---|---|---|
INSTALLED | NO | RANK |
LOCAL_ONLY | YES | NO |
MODIFIED | YES | RANK |
NEW | NO | NO |
NOT_INSTALLED | NO | NO |
OBSOLETE | YES | RANK |
OBSOLETE_MODIFIED | YES | RANK |
OBSOLETE_UNINSTALLED | NO | NO |
UPDATEABLE | YES | RANK |
where RANK means that the rank of the update site to upload to must be greater than the rank of the file's current update site.
isValid
in interface GroupAction
public void setAction(FilesCollection files, FileObject file)
setAction
in interface GroupAction
public String getLabel(FilesCollection files, Iterable<FileObject> selected)
getLabel
in interface GroupAction
Copyright © 2014–2022 ImageJ. All rights reserved.