public class DefaultPackageInfo extends Object implements PackageInfo
Modifier and Type | Class and Description |
---|---|
class |
DefaultPackageInfo.FileDownloadException |
Constructor and Description |
---|
DefaultPackageInfo() |
Modifier and Type | Method and Description |
---|---|
void |
addCategoriesAsString(String categoriesString) |
void |
addFileToCopy(File file) |
void |
checkSignature(byte[] pkgdata) |
void |
clearFilesToCopy() |
Object |
clone()
Creates a copy of the object.
|
File |
downloadFile() |
File |
downloadFile(SimpleTaskStatus taskStatus) |
boolean |
equals(Object obj) |
StringWithAlias |
getAllCodes() |
String |
getAntScript()
Gets the ant script that has to be executed in the installation process.
|
Version |
getApplicationVersion()
Returns the supported application version.
|
String |
getArchitecture()
Returns the supported hardware architecture.
|
int |
getBuild() |
List<String> |
getCategories() |
String |
getCategoriesAsString() |
String |
getCode() |
Dependencies |
getDependencies() |
String |
getDescription() |
URL |
getDownloadURL()
Returns the package bundle download
URL . |
URL |
getDownloadURL(URL baseURL)
Returns the package bundle download
URL . |
String |
getDownloadURLAsString() |
List<File> |
getFilesToCopy() |
File |
getFileToCopy(int i) |
String |
getGvSIGVersion()
Returns the supported gvSIG version.
|
String |
getID() |
String |
getJavaVM()
Returns the supported java vm version.
|
String |
getModelVersion()
Returns the package info model version.
|
String |
getName() |
String |
getOperatingSystem()
Returns the supported operating system.
|
String |
getOperatingSystemFamily() |
String |
getOperatingSystemName() |
String |
getOperatingSystemVersion() |
String |
getOwner() |
URL |
getOwnerURL()
Returns the owner's url
URL . |
String |
getPreferedPackageFileName() |
URL |
getSourcesURL()
Returns the package source files url
URL . |
String |
getState() |
String |
getType() |
Object |
getValue(String name) |
Version |
getVersion() |
URL |
getWebURL()
Returns the package web url
URL . |
boolean |
hasThisCode(String code) |
boolean |
hasThisCode(StringWithAlias code) |
boolean |
isBroken() |
boolean |
isOfficial() |
boolean |
isSigned() |
boolean |
matchID(String string) |
boolean |
removeFilesFolder(File folder) |
void |
removeFileToCopy(File file) |
boolean |
removeInstallFolder(File folder) |
void |
setAntScript(String antScript)
Sets the ant script that can be executed in the installation process.
|
void |
setApplicationVersion(Version version)
Sets the supported application version.
|
void |
setArchitecture(String architecture)
Sets the supported hardware architecture.
|
void |
setBuild(int build) |
void |
setCategories(List categoriesList) |
void |
setCode(String code) |
void |
setDependencies(Dependencies dependencies) |
void |
setDependencies(String dependencies) |
void |
setDescription(String description) |
void |
setDownloadURL(String defaultDownloadURL) |
void |
setDownloadURL(URL defaultDownloadURL)
Sets the package bundle download
URL . |
void |
setGvSIGVersion(String gvSIGVersion)
Sets the supported gvSIG version.
|
void |
setJavaVM(String javaVM)
Sets the supported java vm version.
|
void |
setModelVersion(String modelVersion)
Sets the package info model version.
|
void |
setName(String name) |
void |
setOfficial(boolean official) |
void |
setOperatingSystem(String operatingSystem)
Sets the supported operating system.
|
void |
setOperatingSystemFamily(String operatingSystemFamily) |
void |
setOperatingSystemName(String operatingSystemName) |
void |
setOperatingSystemVersion(String operatingSystemVersion) |
void |
setOwner(String owner)
Sets the package owner.
|
void |
setOwnerURL(URL sources)
Sets the package owner's url.
|
void |
setSourcesURL(URL sources)
Sets the package sources.
|
void |
setState(String state)
Sets the state of the package
|
void |
setType(String type) |
void |
setValue(String name,
Object value) |
void |
setVersion(String version) |
void |
setVersion(Version version) |
void |
setWebURL(URL webURL)
Sets the package web url
URL . |
String |
toString() |
String |
toStringCompact() |
public String getCode()
getCode
in interface PackageInfo
public StringWithAlias getAllCodes()
getAllCodes
in interface PackageInfo
public boolean hasThisCode(String code)
hasThisCode
in interface PackageInfo
public boolean hasThisCode(StringWithAlias code)
hasThisCode
in interface PackageInfo
public String getID()
getID
in interface PackageInfo
public String getName()
getName
in interface PackageInfo
public String getDescription()
getDescription
in interface PackageInfo
public Version getVersion()
getVersion
in interface PackageInfo
public int getBuild()
getBuild
in interface PackageInfo
public String getState()
getState
in interface PackageInfo
PackageManager.STATE
public boolean isOfficial()
isOfficial
in interface PackageInfo
public void setCode(String code)
setCode
in interface PackageInfo
public void setName(String name)
setName
in interface PackageInfo
public void setDescription(String description)
setDescription
in interface PackageInfo
public void setVersion(String version)
setVersion
in interface PackageInfo
public void setVersion(Version version)
setVersion
in interface PackageInfo
public void setBuild(int build)
setBuild
in interface PackageInfo
public void setState(String state)
PackageInfo
setState
in interface PackageInfo
PackageManager.STATE
public void setOfficial(boolean official)
setOfficial
in interface PackageInfo
public String getOperatingSystem()
PackageInfo
getOperatingSystem
in interface PackageInfo
PackageManager.OS
public void setOperatingSystem(String operatingSystem)
PackageInfo
setOperatingSystem
in interface PackageInfo
operatingSystem
- the supported operating systemPackageManager.OS
public String getOperatingSystemFamily()
getOperatingSystemFamily
in interface PackageInfo
public String getOperatingSystemName()
getOperatingSystemName
in interface PackageInfo
public String getOperatingSystemVersion()
getOperatingSystemVersion
in interface PackageInfo
public void setOperatingSystemFamily(String operatingSystemFamily)
setOperatingSystemFamily
in interface PackageInfo
public void setOperatingSystemName(String operatingSystemName)
setOperatingSystemName
in interface PackageInfo
public void setOperatingSystemVersion(String operatingSystemVersion)
setOperatingSystemVersion
in interface PackageInfo
public String getArchitecture()
PackageInfo
getArchitecture
in interface PackageInfo
PackageManager.ARCH
public void setArchitecture(String architecture)
PackageInfo
setArchitecture
in interface PackageInfo
architecture
- the supported hardware architecturePackageManager.ARCH
public String getJavaVM()
PackageInfo
getJavaVM
in interface PackageInfo
PackageManager.JVM
public void setJavaVM(String javaVM)
PackageInfo
setJavaVM
in interface PackageInfo
javaVM
- the supported java vm versionPackageManager.JVM
public String getAntScript()
PackageInfo
getAntScript
in interface PackageInfo
public void setAntScript(String antScript)
PackageInfo
setAntScript
in interface PackageInfo
antScript
- The ant script to copy.public String getType()
getType
in interface PackageInfo
public void setType(String type)
setType
in interface PackageInfo
public String getGvSIGVersion()
PackageInfo
getGvSIGVersion
in interface PackageInfo
public void setGvSIGVersion(String gvSIGVersion)
PackageInfo
setGvSIGVersion
in interface PackageInfo
gvSIGVersion
- the supported gvSIG versionpublic URL getDownloadURL()
PackageInfo
URL
.
May be null if there is no remote URL to download the bundle.getDownloadURL
in interface PackageInfo
URL
public URL getDownloadURL(URL baseURL)
PackageInfo
URL
.
May be null if there is no remote URL to download the bundle.getDownloadURL
in interface PackageInfo
URL
public String getDownloadURLAsString()
getDownloadURLAsString
in interface PackageInfo
public void setDownloadURL(URL defaultDownloadURL)
PackageInfo
URL
. Optional.setDownloadURL
in interface PackageInfo
defaultDownloadURL
- the package bundle download URL
public void setDownloadURL(String defaultDownloadURL)
setDownloadURL
in interface PackageInfo
public String getModelVersion()
PackageInfo
getModelVersion
in interface PackageInfo
public void setModelVersion(String modelVersion)
PackageInfo
setModelVersion
in interface PackageInfo
modelVersion
- the package info model versionpublic String getOwner()
getOwner
in interface PackageInfo
public void setOwner(String owner)
PackageInfo
setOwner
in interface PackageInfo
owner
- the package ownerpublic URL getOwnerURL()
PackageInfo
URL
.getOwnerURL
in interface PackageInfo
URL
public void setOwnerURL(URL sources)
PackageInfo
setOwnerURL
in interface PackageInfo
sources
- the package owner's urlpublic URL getSourcesURL()
PackageInfo
URL
.getSourcesURL
in interface PackageInfo
URL
public void setSourcesURL(URL sources)
PackageInfo
setSourcesURL
in interface PackageInfo
sources
- the package sourcespublic String toStringCompact()
toStringCompact
in interface PackageInfo
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.
public File downloadFile() throws InstallPackageServiceException
downloadFile
in interface PackageInfo
InstallPackageServiceException
public File downloadFile(SimpleTaskStatus taskStatus) throws InstallPackageServiceException
downloadFile
in interface PackageInfo
InstallPackageServiceException
public void addFileToCopy(File file)
addFileToCopy
in interface PackageInfo
public File getFileToCopy(int i)
getFileToCopy
in interface PackageInfo
public void removeFileToCopy(File file)
removeFileToCopy
in interface PackageInfo
public void clearFilesToCopy()
clearFilesToCopy
in interface PackageInfo
public List<File> getFilesToCopy()
getFilesToCopy
in interface PackageInfo
public boolean removeInstallFolder(File folder)
removeInstallFolder
in interface PackageInfo
public boolean removeFilesFolder(File folder)
removeFilesFolder
in interface PackageInfo
public boolean matchID(String string)
matchID
in interface PackageInfo
public Dependencies getDependencies()
getDependencies
in interface PackageInfo
public void setDependencies(Dependencies dependencies)
setDependencies
in interface PackageInfo
public void setDependencies(String dependencies)
setDependencies
in interface PackageInfo
public URL getWebURL()
PackageInfo
URL
.getWebURL
in interface PackageInfo
URL
public void setWebURL(URL webURL)
PackageInfo
URL
.setWebURL
in interface PackageInfo
webURL
- the package web url URL
public List<String> getCategories()
getCategories
in interface PackageInfo
public void setCategories(List categoriesList)
setCategories
in interface PackageInfo
public String getCategoriesAsString()
getCategoriesAsString
in interface PackageInfo
public void addCategoriesAsString(String categoriesString)
addCategoriesAsString
in interface PackageInfo
public void checkSignature(byte[] pkgdata)
checkSignature
in interface PackageInfo
public boolean isBroken()
isBroken
in interface PackageInfo
public boolean isSigned()
isSigned
in interface PackageInfo
public Version getApplicationVersion()
PackageInfo
getApplicationVersion
in interface PackageInfo
public void setApplicationVersion(Version version)
PackageInfo
setApplicationVersion
in interface PackageInfo
public String getPreferedPackageFileName()