public class PackageMetadata extends BaseDto implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
static int |
ACTION_DOWNGRADE |
static int |
ACTION_INSTALL |
static int |
ACTION_NONE |
static int |
ACTION_REMOVE |
static int |
ACTION_UPGRADE |
static int |
KEY_NO_DIFF |
static int |
KEY_OTHER_NEWER |
static int |
KEY_OTHER_ONLY |
static int |
KEY_THIS_NEWER |
static int |
KEY_THIS_ONLY |
Constructor and Description |
---|
PackageMetadata()
Default ctor
|
PackageMetadata(PackageListItem sys,
PackageListItem victim)
Constructs a PackageMetadata
|
Modifier and Type | Method and Description |
---|---|
void |
addChannel(Channel c)
Add a channel which supplies this package to the list.
|
int |
compareTo(java.lang.Object o) |
java.lang.String |
getActionStatus()
Return the localized action status string.
|
int |
getActionStatusAsInt()
Return the actionstatus as an int.
|
java.lang.String |
getActionTargetNevra() |
java.lang.String |
getArch()
Returns the arch of the Package, if both the system and
other PackageListItem are null, returns null.
|
java.lang.Long |
getArchId()
Returns the archid of the Package, if both the system and
other PackageListItem are null, returns null.
|
java.util.List |
getChannels()
Returns the list of Channels which supply this package.
|
java.lang.String |
getComparison() |
int |
getComparisonAsInt()
Returns the comparison key.
|
java.lang.String |
getEpoch()
Returns the epoch of the Package, if both the system and
other PackageListItem are null, returns null.
|
java.lang.Long |
getEvrId()
Returns the evrid of the Package, if both the system and
other PackageListItem are null, returns null.
|
java.lang.Long |
getId()
Returns id to be stored in RhnSet.
|
java.lang.String |
getIdCombo()
Returns the IdCombo which is the nameid, evrid and archid seperated by a pipe (|).
|
java.lang.String |
getMapHash()
Returns a unique id (nameId x archId) for HashMap
|
java.lang.String |
getName()
Returns the name of the Package, if both the system and
other PackageListItem are null, returns the empty string.
|
java.lang.Long |
getNameId()
Returns the nameid of the Package, if both the system and
other PackageListItem are null, returns null.
|
PackageListItem |
getOther()
Returns the other system or profile's PackageListItem
|
java.lang.String |
getOtherEvr()
Get the EVR of the Other's package
|
java.lang.String |
getRelease()
Returns the release of the Package, if both the system and
other PackageListItem are null, returns null.
|
java.lang.String |
getSelectionKey() |
PackageListItem |
getSystem()
Returns the System's PackageListItem
|
java.lang.String |
getSystemEvr()
Get the EVR of the System's rev of the RPM
|
java.lang.String |
getVersion()
Returns the version of the Package, if both the system and
other PackageListItem are null, returns null.
|
void |
setChannels(java.util.List chanList)
Sets the list of Channels which supply this package.
|
void |
setCompareParam(java.lang.String aCompareParam) |
void |
setComparison(int comparisonIn)
Sets the comparison to given value.
|
java.lang.String |
toString() |
void |
updateActionStatus()
Updates the action status.
|
isDisabled, isSelectable, isSelected, setDisabled, setSelected
public static final int KEY_NO_DIFF
public static final int KEY_THIS_ONLY
public static final int KEY_THIS_NEWER
public static final int KEY_OTHER_ONLY
public static final int KEY_OTHER_NEWER
public static final int ACTION_NONE
public static final int ACTION_INSTALL
public static final int ACTION_REMOVE
public static final int ACTION_UPGRADE
public static final int ACTION_DOWNGRADE
public PackageMetadata(PackageListItem sys, PackageListItem victim)
sys
- PackageListItem for the current systemvictim
- PackageListItem for the profile or other systempublic PackageMetadata()
public int getActionStatusAsInt()
public java.lang.String getActionStatus()
public int getComparisonAsInt()
public java.lang.String getComparison()
public void setComparison(int comparisonIn)
comparisonIn
- The comparison to set.public void setCompareParam(java.lang.String aCompareParam)
aCompareParam
- The parameter to the comparison string.public PackageListItem getSystem()
public PackageListItem getOther()
public java.lang.String getName()
public java.lang.Long getNameId()
public java.lang.Long getEvrId()
public java.lang.Long getArchId()
public java.lang.String getArch()
public java.lang.String getEpoch()
public java.lang.String getVersion()
public java.lang.String getRelease()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public void updateActionStatus()
public java.lang.String getActionTargetNevra()
public java.lang.Long getId()
getId
in interface Identifiable
getId
in class BaseDto
public java.util.List getChannels()
public void setChannels(java.util.List chanList)
chanList
- list of Channels which supply this package.public void addChannel(Channel c)
c
- the Channel which supplies this package.public java.lang.String getIdCombo()
nameid|evrid[|archid]
. Arch id will only be included if it is
available.public java.lang.String getMapHash()
public java.lang.String getSystemEvr()
public java.lang.String getOtherEvr()
public java.lang.String getSelectionKey()
getSelectionKey
in interface Selectable
getSelectionKey
in class BaseDto