public class ComponentDescription extends Observable implements Comparable<ComponentDescription>
Modifier and Type | Class and Description |
---|---|
static class |
ComponentDescription.Status |
Modifier and Type | Field and Description |
---|---|
static String |
installerNamespaceURI |
Modifier | Constructor and Description |
---|---|
protected |
ComponentDescription(Element xmlDescription) |
protected |
ComponentDescription(String name,
String version,
String packageFilename) |
Modifier and Type | Method and Description |
---|---|
void |
addLocation(URL aLocation) |
void |
cancel() |
int |
compareTo(ComponentDescription o)
Define a natural ordering for component descriptions.
|
static void |
copyInputStream(InputStream in,
OutputStream out) |
Document |
createComponentXML() |
void |
download(boolean synchronous) |
boolean |
equals(Object obj) |
ComponentDescription |
getAvailableUpdate()
If this component has an available update, get that update.
|
String |
getComponentTypeString() |
String |
getDescription() |
String |
getDisplayPackageSize() |
LinkedList<String> |
getInstalledFileNames() |
URL |
getLicenseURL() |
Locale |
getLocale() |
List<URL> |
getLocations() |
String |
getName() |
String |
getPackageFilename() |
String |
getPackageMD5Sum() |
int |
getPackageSize() |
int |
getProgress() |
ComponentDescription.Status |
getStatus() |
String |
getVersion() |
void |
install(boolean synchronous)
Install this component, if the user accepts the license.
|
boolean |
isSelected() |
boolean |
isUpdateAvailable()
Inform whether an update is available for this component.
|
boolean |
isUpdateOf(ComponentDescription other)
This is an update of other if and only if the following is true:
Both components have the same type (as identified by the class) and name;
other has status INSTALLED;
our version number is higher than other's version number.
|
static boolean |
isVersionNewerThan(String oneVersion,
String otherVersion)
Determine whether oneVersion is newer than otherVersion.
|
void |
pause() |
void |
removeAllLocations() |
void |
replaceWithUpdate()
Replace this component definition with its available update.
|
void |
resume(boolean synchronous) |
void |
setAvailableUpdate(ComponentDescription aDesc)
Set the given component description as the available update of this component.
|
void |
setDescription(String aDescription) |
void |
setLicenseURL(URL aLicense) |
void |
setLocale(Locale aLocale) |
void |
setPackageFilename(String aPackageFilename) |
void |
setPackageMD5Sum(String aMD5) |
void |
setPackageSize(int aSize) |
void |
setSelected(boolean value) |
void |
setSharedFiles(Set<String> fileList) |
void |
setVersion(String aVersion) |
String |
toString() |
boolean |
uninstall()
Uninstall this component.
|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
public static final String installerNamespaceURI
protected ComponentDescription(String name, String version, String packageFilename)
protected ComponentDescription(Element xmlDescription) throws NullPointerException
NullPointerException
public void replaceWithUpdate()
public String getComponentTypeString()
public String getName()
public Locale getLocale()
public void setLocale(Locale aLocale)
public String getVersion()
public void setVersion(String aVersion)
public String getDescription()
public void setDescription(String aDescription)
public URL getLicenseURL()
public void setLicenseURL(URL aLicense)
public void removeAllLocations()
public void addLocation(URL aLocation)
public String getPackageFilename()
public void setPackageFilename(String aPackageFilename)
public int getPackageSize()
public void setPackageSize(int aSize)
public String getDisplayPackageSize()
public String getPackageMD5Sum()
public void setPackageMD5Sum(String aMD5)
public boolean isSelected()
public void setSelected(boolean value)
public ComponentDescription.Status getStatus()
public LinkedList<String> getInstalledFileNames()
public void pause()
public void resume(boolean synchronous)
public void cancel()
public void download(boolean synchronous)
public void install(boolean synchronous) throws Exception
synchronous
- synchronousException
- Exceptionpublic boolean uninstall()
public int getProgress()
public Document createComponentXML() throws ParserConfigurationException
ParserConfigurationException
public boolean isUpdateAvailable()
public ComponentDescription getAvailableUpdate()
public void setAvailableUpdate(ComponentDescription aDesc)
aDesc
- an available update, or null to erase any previously set available updates.IllegalStateException
- if aDesc is not null and our status is not "INSTALLED".IllegalArgumentException
- if aDesc is not null and our name is not the same as aDesc's name, or if our version number is not smaller than
aDesc's version number.public boolean isUpdateOf(ComponentDescription other)
other
- otherpublic static boolean isVersionNewerThan(String oneVersion, String otherVersion)
oneVersion
- oneVersionotherVersion
- otherVersionpublic int compareTo(ComponentDescription o)
compareTo
in interface Comparable<ComponentDescription>
o
- opublic static final void copyInputStream(InputStream in, OutputStream out) throws IOException
IOException
Copyright © 2000–2016 DFKI GmbH. All rights reserved.