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