|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.domain.content.PackageVersion
public class PackageVersion
Represents a specific version of a Package
. This does not represent an installed package found
deployed in any platform or on a resource (that's InstalledPackage
). This object refers to a known version of
a particular package that can be installed on applicable resources.
Nested Class Summary | |
---|---|
static class |
PackageVersion.DefaultPackageVersionComparator
This is a default Comparator implementation for package versions. |
Constructor Summary | |
---|---|
PackageVersion()
|
|
PackageVersion(Package pkg,
String version,
Architecture arch)
|
Method Summary | |
---|---|
ProductVersionPackageVersion |
addProductVersion(ProductVersion productVersion)
Directly assign a product version to this package version. |
RepoPackageVersion |
addRepo(Repo repo)
Directly assign this package version to the given repo. |
boolean |
equals(Object o)
|
Architecture |
getArchitecture()
Architecture of this package version which tells you the kinds of platforms (e.g. operating system or hardware) that this package version can be installed on. |
String |
getDisplayName()
Name of this package version that is suitable for display to the user in the UI. |
String |
getDisplayVersion()
A version string suitable for displaying to a user. |
Configuration |
getExtraProperties()
Values to further describe this package version. |
Long |
getFileCreatedDate()
Timestamp indicating when the package's file was created. |
String |
getFileName()
Name of the file with the contents of this package. |
Long |
getFileSize()
Size of the package's file. |
Package |
getGeneralPackage()
Package that this version applies to. |
int |
getId()
|
Set<InstalledPackageHistory> |
getInstalledPackageHistory()
|
Set<InstalledPackage> |
getInstalledPackages()
|
String |
getLicenseName()
Name of the license under which the package falls. |
String |
getLicenseVersion()
Version of the package's license . |
String |
getLongDescription()
Long free text description of this version of the package. |
String |
getMD5()
The MD5 hash of this package version's file contents. |
byte[] |
getMetadata()
Optional blob of metadata that is only meaningful to the plugin that is responsible for installing this package version. |
PackageBits |
getPackageBits()
If this package version's actual contents (its "bits") have been inventoried, this will return a PackageBits object representing that data. |
Set<ProductVersionPackageVersion> |
getProductVersionPackageVersions()
Returns the explicit mapping entities. |
Set<ProductVersion> |
getProductVersions()
The product versions that this package version is associated with. |
Set<RepoPackageVersion> |
getRepoPackageVersions()
Returns the explicit mapping entities. |
Set<Repo> |
getRepos()
The set of repos that can serve up this package version. |
String |
getSHA256()
The SHA-256 hash of this package version's file contents. |
String |
getShortDescription()
Short free text description of this version of the package. |
String |
getVersion()
The machine understandable version of the package. |
int |
hashCode()
|
ProductVersionPackageVersion |
removeProductVersion(ProductVersion productVersion)
Removes the product version from this package version, if it exists. |
RepoPackageVersion |
removeRepo(Repo repo)
Removes the repo as one that this package version is related to. |
void |
setArchitecture(Architecture architecture)
|
void |
setDisplayName(String displayName)
|
void |
setDisplayVersion(String displayVersion)
|
void |
setExtraProperties(Configuration extraProperties)
|
void |
setFileCreatedDate(Long fileCreatedDate)
|
void |
setFileName(String fileName)
|
void |
setFileSize(Long fileSize)
|
void |
setGeneralPackage(Package generalPackage)
|
void |
setId(int id)
|
void |
setLicenseName(String licenseName)
|
void |
setLicenseVersion(String licenseVersion)
|
void |
setLongDescription(String longDescription)
|
void |
setMD5(String md5)
|
void |
setMetadata(byte[] metadata)
|
void |
setPackageBits(PackageBits packageBits)
|
void |
setSHA256(String sha256)
|
void |
setShortDescription(String shortDescription)
|
void |
setVersion(String version)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String QUERY_FIND_BY_PACKAGE_DETAILS
public static final String QUERY_FIND_BY_PACKAGE_VER_ARCH
public static final String QUERY_FIND_BY_PACKAGE_SHA
public static final String QUERY_FIND_BY_PACKAGE_SHA_RES_TYPE
public static final String QUERY_FIND_BY_PACKAGE_DETAILS_KEY_WITH_NON_NULL_RESOURCE_TYPE
public static final String QUERY_FIND_BY_PACKAGE_DETAILS_KEY
public static final String QUERY_FIND_BY_PACKAGE_DETAILS_SHA
public static final String QUERY_FIND_ID_BY_PACKAGE_DETAILS_KEY_AND_RES_ID
public static final String QUERY_FIND_BY_REPO_ID
public static final String QUERY_FIND_BY_REPO_ID_FILTERED
public static final String QUERY_FIND_BY_PACKAGE_ID
public static final String QUERY_FIND_BY_PACKAGE_AND_REPO_ID
public static final String QUERY_FIND_BY_REPO_ID_WITH_PACKAGE
public static final String QUERY_FIND_BY_REPO_ID_WITH_PACKAGE_FILTERED
public static final String QUERY_FIND_METADATA_BY_RESOURCE_ID
public static final String QUERY_FIND_BY_ID_IF_NO_CONTENT_SOURCES_OR_REPOS
public static final String QUERY_GET_PKG_BITS_LENGTH_BY_PKG_DETAILS_AND_RES_ID
public static final String DELETE_IF_NO_CONTENT_SOURCES_OR_REPOS
public static final String DELETE_SINGLE_IF_NO_CONTENT_SOURCES_OR_REPOS
public static final String DELETE_MULTIPLE_IF_NO_CONTENT_SOURCES_OR_REPOS
public static final String DELETE_PVPV_IF_NO_CONTENT_SOURCES_OR_REPOS
public static final String FIND_EXTRA_PROPS_IF_NO_CONTENT_SOURCES_OR_REPOS
public static final String FIND_FILES_IF_NO_CONTENT_SOURCES_OR_REPOS
public static final String QUERY_FIND_COMPOSITE_BY_ID
public static final String QUERY_FIND_COMPOSITE_BY_ID_WITH_PROPS
public static final String QUERY_FIND_COMPOSITES_BY_IDS
public static final String QUERY_FIND_COMPOSITE_BY_FILTERS
public static final String QUERY_FIND_BY_ID
public static final String QUERY_FIND_PACKAGE_BY_FILENAME
public static final String QUERY_FIND_PACKAGEVERSION_BY_FILENAME
public static final String QUERY_FIND_DELETEABLE_IDS_IN_REPO
public static final PackageVersion.DefaultPackageVersionComparator DEFAULT_COMPARATOR
PackageVersion.DefaultPackageVersionComparator
Constructor Detail |
---|
public PackageVersion()
public PackageVersion(Package pkg, String version, Architecture arch)
Method Detail |
---|
public int getId()
public void setId(int id)
public Package getGeneralPackage()
public void setGeneralPackage(Package generalPackage)
public String getDisplayName()
public void setDisplayName(String displayName)
public String getShortDescription()
public void setShortDescription(String shortDescription)
public String getLongDescription()
public void setLongDescription(String longDescription)
public String getVersion()
public void setVersion(String version)
public String getDisplayVersion()
public void setDisplayVersion(String displayVersion)
public Architecture getArchitecture()
public void setArchitecture(Architecture architecture)
public String getFileName()
public void setFileName(String fileName)
public Long getFileSize()
public void setFileSize(Long fileSize)
public String getMD5()
public void setMD5(String md5)
public String getSHA256()
public void setSHA256(String sha256)
public Long getFileCreatedDate()
public void setFileCreatedDate(Long fileCreatedDate)
public String getLicenseName()
getLicenseVersion()
public void setLicenseName(String licenseName)
public String getLicenseVersion()
license
.
public void setLicenseVersion(String licenseVersion)
public byte[] getMetadata()
null
if this package version has no applicable metadata for it. Typical usages
of this is to provide instructional information describing the install steps the plugin needs to perform to
install the package; or yum XML information on rpms.
public void setMetadata(byte[] metadata)
public Configuration getExtraProperties()
package
.
PackageType.getPackageExtraPropertiesDefinition()
public void setExtraProperties(Configuration extraProperties)
public Set<RepoPackageVersion> getRepoPackageVersions()
getRepos()
public Set<Repo> getRepos()
The returned set is not backed by this entity - if you want to alter the set of associated repos, use
getRepoPackageVersions()
or addRepo(Repo)
, removeRepo(Repo)
.
public RepoPackageVersion addRepo(Repo repo)
packageVersion
-
public Set<InstalledPackage> getInstalledPackages()
public Set<InstalledPackageHistory> getInstalledPackageHistory()
public RepoPackageVersion removeRepo(Repo repo)
null
is returned.
repo
-
null
if this package version was not mapped to the given
repopublic PackageBits getPackageBits()
PackageBits
object representing that data. If there is no content available yet, this will return
null
. When null
is returned, it means it has to be pulled down, usually via a
ContentSource
. WARNING! You most likely do not want to call this method if inside the scope
of an entity manager session. If you do, this will load in the PackageBits
object which potentially will
load the entire package's contents in memory (and thus, if large enough, will cause an OutOfMemoryError).
public void setPackageBits(PackageBits packageBits)
public Set<ProductVersionPackageVersion> getProductVersionPackageVersions()
#getPackageVersions()
public Set<ProductVersion> getProductVersions()
The returned set is not backed by this entity - if you want to alter the set of associated product versions,
use getProductVersionPackageVersions()
or addProductVersion(ProductVersion)
,
removeProductVersion(ProductVersion)
.
public ProductVersionPackageVersion addProductVersion(ProductVersion productVersion)
productVersion
-
public ProductVersionPackageVersion removeProductVersion(ProductVersion productVersion)
null
is returned.
productVersion
- the product version to remove
null
if the product version was not mapped to this package
versionpublic String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |