java.lang.Object
de.grogra.pm.PluginEntry
-
Field Summary
Modifier and TypeFieldDescriptionprotected Version
protected boolean
protected static String[]
protected String
protected String
protected String
protected static String[]
protected String
protected String
protected String
protected String
protected boolean
protected String
protected String
protected String
protected String
protected String
static final String
protected org.json.JSONObject
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Cache the installed version of the plugin to the cache folder Should not require to manage the libs as they should be included in the repo alreadyboolean
boolean
Test the downloaded zip (jar) by loading the plugin in a temporary Groimp Plugin.void
void
download
(de.grogra.pm.repo.RepoManager manager, GenericCallback<String> notify) static PluginEntry
fromJSON
(org.json.JSONObject elm) static PluginEntry
static String
static String
getDownloadUrl
(String version) static String
getID()
static String
getLibInstallPath
(String lib) static String
getLibPath
(String lib, String[] paths) getName()
getRequiredLibs
(String verStr) int
getState()
The state of the plugin follows the plugin manager action for plugins.getVersionChanges
(String versionStr) boolean
boolean
hasVersion
(String condition, String version) Return true if the plugin can provide a version that fulfill the condition.boolean
isCandidateVersionHigherThan
(String version) boolean
isConditionRespected
(String condition, String version, boolean installed) Return true if the version (installed?)boolean
boolean
boolean
isInstalledVersionHigherThan
(String version) boolean
boolean
void
void
resetVersionsCandidate
(boolean reload) The dependency resolving is messing with the candidate & enforced version: It changes the versions depending on what is possible based on the dependecies of the plugin to be changed.void
rollbackCandidateVersion
(boolean reload) Set the value of the candidate version to the highest of the "selected" listeners (jcheckbox).void
setCandidateVersion
(String candidateVersion) void
setCandidateVersion
(String condition, String candidateVersion) Set the candidate version to a new value.void
setEnforcedVersion
(String version) toString()
-
Field Details
-
VER_STOCK
- See Also:
-
versions
protected org.json.JSONObject versions -
id
-
name
-
description
-
helpUrl
-
vendor
-
dependencies
-
libsRepo
-
excluded
-
mainClass
-
installedPath
-
installedVersion
-
tempName
-
destName
-
candidateVersion
-
enforcedVersion
-
canUninstall
protected boolean canUninstall -
isDisabled
protected boolean isDisabled
-
-
Constructor Details
-
PluginEntry
-
-
Method Details
-
fromJSON
-
getDefaultDescriptionKey
-
getDefaultDeletionPermissionKey
-
fromPluginDescriptor
-
toString
-
detectInstalled
public void detectInstalled() -
isVersionFrozenToGroIMP
public boolean isVersionFrozenToGroIMP() -
hasEnforcedVersion
public boolean hasEnforcedVersion() -
getEnforcedVersion
-
setEnforcedVersion
-
rollbackCandidateVersion
public void rollbackCandidateVersion(boolean reload) Set the value of the candidate version to the highest of the "selected" listeners (jcheckbox). So the highest value of the selected box (between installed, update, and new) -
resetVersionsCandidate
public void resetVersionsCandidate(boolean reload) The dependency resolving is messing with the candidate & enforced version: It changes the versions depending on what is possible based on the dependecies of the plugin to be changed. This reset is performed at every change from the plugin manager (usually from the dialog). It ensure that the candidate version of the plugin entry matches the one from the dialog- Parameters:
skip
- Should the reset reload value from the listeners ?
-
getMaxVersion
-
getVersions
-
getGroIMPVersion
-
getLibInstallPath
-
getLibPath
-
getID
-
getInstalledPath
-
getDestName
-
getTempName
-
getLibRepo
-
isInstalled
public boolean isInstalled() -
isDisabled
public boolean isDisabled() -
getState
public int getState()The state of the plugin follows the plugin manager action for plugins. INSTALL if the plugin is installed, DISABLE is the plugin is disabled, and UNSINSTALL if the plugin is not installed- Returns:
-
download
public void download(de.grogra.pm.repo.RepoManager manager, GenericCallback<String> notify) throws IOException, URISyntaxException - Throws:
IOException
URISyntaxException
-
cachePlugin
Cache the installed version of the plugin to the cache folder Should not require to manage the libs as they should be included in the repo already- Throws:
IOException
URISyntaxException
-
getDownloadUrl
- Parameters:
version
-- Returns:
-
checkZip
Test the downloaded zip (jar) by loading the plugin in a temporary Groimp Plugin. The version of hte plugin is tested. This test required a groimp environment (aka a Workbench.current to be executed). The safeDeleter run outside of a groimp environment- Parameters:
version
-- Returns:
- Throws:
IOException
-
getName
-
getDescription
-
getHelpLink
-
getVendor
-
getCandidateVersion
-
addCandidateVersionListener
-
removeCandidateVersionListener
-
canUninstall
public boolean canUninstall() -
getInstalledVersion
-
getMainClass
-
setCandidateVersion
-
setCandidateVersion
Set the candidate version to a new value. If the condition require the version to be equal - then also set the enforced version -
isUpgradable
public boolean isUpgradable() -
isInstalledVersionHigherThan
-
isCandidateVersionHigherThan
-
isConditionRespected
Return true if the version (installed?) fulfill the condition- Parameters:
condition
- a string that is composed of the 3 char =, <, >version
- a string of a version to test against the plugin versioninstalled
- True if the version compared is the installed one. False if the version compared is the candidate one.- Returns:
-
hasVersion
Return true if the plugin can provide a version that fulfill the condition. If the plugin has an enforced version (aka. version that Need to be used from dependency) it checks if that enforced version is the tested one. If the condition look for a higher than version, test if the maxversion could fulfill the version;- Parameters:
condition
-version
-- Returns:
-
getDepends
- Throws:
org.json.JSONException
-
getExcluded
-
getLibs
-
getRequiredLibs
-
getVersionChanges
-
getSearchIndexString
-