org.rhq.core.domain.content
Class Package

java.lang.Object
  extended by org.rhq.core.domain.content.Package
All Implemented Interfaces:
Serializable

public class Package
extends Object
implements Serializable

Represents a package inventoried in the system. A package can be created by either a ContentSource (on the server side) or via a plugin discovery (on the agent side). A package has no knowledge of how it was created (i.e. it doesn't know if it was pulled down from a content source or pushed in from an agent discovery).

Regardless of how a package was created, it can be placed in one or more Channels so resources can later subscribe to those channels and install different versions of the package.

A package can have one or more PackageVersions associated with it. Package versions allow for things like different software revisions or different architectures.

See Also:
Serialized Form

Field Summary
static String QUERY_FIND_BY_NAME_PKG_TYPE_ID
           
static String QUERY_FIND_BY_NAME_PKG_TYPE_RESOURCE_TYPE
           
 
Constructor Summary
Package()
           
Package(String name, PackageType type)
           
 
Method Summary
 void addVersion(PackageVersion version)
           
 boolean equals(Object o)
           
 String getClassification()
          Provides a second means for indicating a package's type.
 int getId()
           
 String getName()
          Programmatic name of the package.
 PackageType getPackageType()
          The type definition of this package.
 List<PackageVersion> getVersions()
          List of all versions of this package known to the system.
 int hashCode()
           
 void setClassification(String classification)
           
 void setId(int id)
           
 void setName(String name)
           
 void setPackageType(PackageType packageType)
           
 void setVersions(List<PackageVersion> versions)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_FIND_BY_NAME_PKG_TYPE_ID

public static final String QUERY_FIND_BY_NAME_PKG_TYPE_ID
See Also:
Constant Field Values

QUERY_FIND_BY_NAME_PKG_TYPE_RESOURCE_TYPE

public static final String QUERY_FIND_BY_NAME_PKG_TYPE_RESOURCE_TYPE
See Also:
Constant Field Values
Constructor Detail

Package

public Package()

Package

public Package(String name,
               PackageType type)
Method Detail

getId

public int getId()

setId

public void setId(int id)

getPackageType

public PackageType getPackageType()
The type definition of this package.


setPackageType

public void setPackageType(PackageType packageType)

getName

public String getName()
Programmatic name of the package.


setName

public void setName(String name)

getClassification

public String getClassification()
Provides a second means for indicating a package's type. The possible values for this attribute will vary based on package type. For instance, two packages of the same package type may be differentiated as a "bug fix" or a "security update". Another example would be to indicate a grouping means, such as "System Environment" or "Applications/Editors".


setClassification

public void setClassification(String classification)

getVersions

public List<PackageVersion> getVersions()
List of all versions of this package known to the system. The list will be in descending order, with the most recent version first.


addVersion

public void addVersion(PackageVersion version)

setVersions

public void setVersions(List<PackageVersion> versions)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.