com.redhat.rhn.domain.errata
Class AbstractErrata

java.lang.Object
  extended by com.redhat.rhn.domain.BaseDomainHelper
      extended by com.redhat.rhn.domain.errata.AbstractErrata
All Implemented Interfaces:
Errata, Selectable
Direct Known Subclasses:
PublishedErrata, UnpublishedErrata

public abstract class AbstractErrata
extends BaseDomainHelper
implements Errata, Selectable

AbstractErrata abstract implmenetation of Errata


Field Summary
protected  java.util.Set packages
           
 
Constructor Summary
AbstractErrata()
           
 
Method Summary
 void addBug(Bug bugIn)
          Adds a bug to the bugs set
 void addFile(ErrataFile fileIn)
          Adds a file to the file set
 void addKeyword(Keyword keywordIn)
          Adds a keyword to the keywords set.
 void addKeyword(java.lang.String keywordIn)
          Convienience method so we can add keywords logically Adds a keyword to the keywords set
 void addNotification(java.util.Date dateIn)
          Add a new notification for this errata
 void addPackage(Package packageIn)
          Adds a package to the packages set and create an ErrataFile that represents this package
 void clearChannels()
          Clears out the Channels associated with this errata.
 java.lang.String getAdvisory()
          Getter for advisory
 java.lang.String getAdvisoryName()
          Getter for advisoryName
 java.lang.Long getAdvisoryRel()
          Getter for advisoryRel
 java.lang.String getAdvisorySynopsis()
          Getter for synopsis
 java.lang.String getAdvisoryType()
          Getter for advisoryType
 java.util.Set getBugs()
           
 java.lang.String getDescription()
          Getter for description
 java.util.Set getFiles()
           
 java.lang.Long getId()
          Getter for id
 java.util.Date getIssueDate()
          Getter for issueDate
 java.util.Set getKeywords()
           
 java.util.Date getLastModified()
          Getter for lastModified
 java.lang.Boolean getLocallyModified()
          Getter for locallyModified
 java.lang.String getNotes()
          Getter for notes
 java.util.Set getNotificationQueue()
          Get the set of notifications in the queue for this errata.
 Org getOrg()
          Getter for orgId
 java.util.Set getPackages()
           
 java.lang.String getProduct()
          Getter for product
 java.lang.String getRefersTo()
          Getter for refersTo
 java.lang.String getSelectionKey()
          
 java.lang.String getSolution()
          Getter for solution
 java.lang.String getSynopsis()
          Getter for synopsis
 java.lang.String getTopic()
          Getter for topic
 java.util.Date getUpdateDate()
          Getter for updateDate
 boolean isBugFix()
          Returns true if the advisory is a Bug Fix.
abstract  boolean isCloned()
          Tells whether or not the errata is cloned.
 boolean isProductEnhancement()
          Returns true if the advisory is a Product Enhancement.
abstract  boolean isPublished()
          Tells whether or not the errata is published.
 boolean isSecurityAdvisory()
          Returns true if the advisory is a Security Advisory.
 boolean isSelectable()
           
 boolean isSelected()
           
 void removeBug(java.lang.Long bugId)
          Removes a bug from the bugs set
 void removeFile(java.lang.Long fileId)
          Removes a file from the files set
 void removePackage(Package packageIn)
          Removes a package from the packages set.
 void setAdvisory(java.lang.String advisoryIn)
          Setter for advisory
 void setAdvisoryName(java.lang.String advisoryNameIn)
          Setter for advisoryName
 void setAdvisoryRel(java.lang.Long advisoryRelIn)
          Setter for advisoryRel
 void setAdvisoryType(java.lang.String advisoryTypeIn)
          Setter for advisoryType
 void setBugs(java.util.Set b)
           
 void setDescription(java.lang.String descriptionIn)
          Setter for description
 void setFiles(java.util.Set f)
           
 void setId(java.lang.Long idIn)
          Setter for id
 void setIssueDate(java.util.Date issueDateIn)
          Setter for issueDate
 void setKeywords(java.util.Set k)
           
 void setLastModified(java.util.Date lastModifiedIn)
          Setter for lastModified
 void setLocallyModified(java.lang.Boolean locallyModifiedIn)
          Setter for locallyModified
 void setNotes(java.lang.String notesIn)
          Setter for notes
 void setNotificationQueue(java.util.Set queueIn)
          Sets the notification queue for this errata
 void setOrg(Org orgIn)
          Setter for org
 void setPackages(java.util.Set p)
           
 void setProduct(java.lang.String productIn)
          Setter for product
 void setRefersTo(java.lang.String refersToIn)
          Setter for refersTo
 void setSelected(boolean isSelected)
          sets the selection parameter
 void setSolution(java.lang.String solutionIn)
          Setter for solution
 void setSynopsis(java.lang.String synopsisIn)
          Setter for synopsis
 void setTopic(java.lang.String topicIn)
          Setter for topic
 void setUpdateDate(java.util.Date updateDateIn)
          Setter for updateDate
 java.lang.String toString()
          
 
Methods inherited from class com.redhat.rhn.domain.BaseDomainHelper
getCreated, getModified, setCreated, setModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.redhat.rhn.domain.errata.Errata
addChannel, getChannels, setChannels
 

Field Detail

packages

protected java.util.Set packages
Constructor Detail

AbstractErrata

public AbstractErrata()
Method Detail

getId

public java.lang.Long getId()
Getter for id

Specified by:
getId in interface Errata
Returns:
Long to get

setId

public void setId(java.lang.Long idIn)
Setter for id

Specified by:
setId in interface Errata
Parameters:
idIn - to set

getAdvisory

public java.lang.String getAdvisory()
Getter for advisory

Specified by:
getAdvisory in interface Errata
Returns:
String to get

setAdvisory

public void setAdvisory(java.lang.String advisoryIn)
Setter for advisory

Specified by:
setAdvisory in interface Errata
Parameters:
advisoryIn - to set

getAdvisoryType

public java.lang.String getAdvisoryType()
Getter for advisoryType

Specified by:
getAdvisoryType in interface Errata
Returns:
String to get

setAdvisoryType

public void setAdvisoryType(java.lang.String advisoryTypeIn)
Setter for advisoryType

Specified by:
setAdvisoryType in interface Errata
Parameters:
advisoryTypeIn - to set

getProduct

public java.lang.String getProduct()
Getter for product

Specified by:
getProduct in interface Errata
Returns:
String to get

setProduct

public void setProduct(java.lang.String productIn)
Setter for product

Specified by:
setProduct in interface Errata
Parameters:
productIn - to set

getDescription

public java.lang.String getDescription()
Getter for description

Specified by:
getDescription in interface Errata
Returns:
String to get

setDescription

public void setDescription(java.lang.String descriptionIn)
Setter for description

Specified by:
setDescription in interface Errata
Parameters:
descriptionIn - to set

getSynopsis

public java.lang.String getSynopsis()
Getter for synopsis

Specified by:
getSynopsis in interface Errata
Returns:
String to get

getAdvisorySynopsis

public java.lang.String getAdvisorySynopsis()
Getter for synopsis

Returns:
String to get

setSynopsis

public void setSynopsis(java.lang.String synopsisIn)
Setter for synopsis

Specified by:
setSynopsis in interface Errata
Parameters:
synopsisIn - to set

getTopic

public java.lang.String getTopic()
Getter for topic

Specified by:
getTopic in interface Errata
Returns:
String to get

setTopic

public void setTopic(java.lang.String topicIn)
Setter for topic

Specified by:
setTopic in interface Errata
Parameters:
topicIn - to set

getSolution

public java.lang.String getSolution()
Getter for solution

Specified by:
getSolution in interface Errata
Returns:
String to get

setSolution

public void setSolution(java.lang.String solutionIn)
Setter for solution

Specified by:
setSolution in interface Errata
Parameters:
solutionIn - to set

getIssueDate

public java.util.Date getIssueDate()
Getter for issueDate

Specified by:
getIssueDate in interface Errata
Returns:
Date to get

setIssueDate

public void setIssueDate(java.util.Date issueDateIn)
Setter for issueDate

Specified by:
setIssueDate in interface Errata
Parameters:
issueDateIn - to set

getUpdateDate

public java.util.Date getUpdateDate()
Getter for updateDate

Specified by:
getUpdateDate in interface Errata
Returns:
Date to get

setUpdateDate

public void setUpdateDate(java.util.Date updateDateIn)
Setter for updateDate

Specified by:
setUpdateDate in interface Errata
Parameters:
updateDateIn - to set

getNotes

public java.lang.String getNotes()
Getter for notes

Specified by:
getNotes in interface Errata
Returns:
String to get

setNotes

public void setNotes(java.lang.String notesIn)
Setter for notes

Specified by:
setNotes in interface Errata
Parameters:
notesIn - to set

getOrg

public Org getOrg()
Getter for orgId

Specified by:
getOrg in interface Errata
Returns:
Long to get

setOrg

public void setOrg(Org orgIn)
Setter for org

Specified by:
setOrg in interface Errata
Parameters:
orgIn - to set

getRefersTo

public java.lang.String getRefersTo()
Getter for refersTo

Specified by:
getRefersTo in interface Errata
Returns:
String to get

setRefersTo

public void setRefersTo(java.lang.String refersToIn)
Setter for refersTo

Specified by:
setRefersTo in interface Errata
Parameters:
refersToIn - to set

getAdvisoryName

public java.lang.String getAdvisoryName()
Getter for advisoryName

Specified by:
getAdvisoryName in interface Errata
Returns:
String to get

setAdvisoryName

public void setAdvisoryName(java.lang.String advisoryNameIn)
Setter for advisoryName

Specified by:
setAdvisoryName in interface Errata
Parameters:
advisoryNameIn - to set

getAdvisoryRel

public java.lang.Long getAdvisoryRel()
Getter for advisoryRel

Specified by:
getAdvisoryRel in interface Errata
Returns:
Long to get

setAdvisoryRel

public void setAdvisoryRel(java.lang.Long advisoryRelIn)
Setter for advisoryRel

Specified by:
setAdvisoryRel in interface Errata
Parameters:
advisoryRelIn - to set

getLocallyModified

public java.lang.Boolean getLocallyModified()
Getter for locallyModified

Specified by:
getLocallyModified in interface Errata
Returns:
Boolean to get

setLocallyModified

public void setLocallyModified(java.lang.Boolean locallyModifiedIn)
Setter for locallyModified

Specified by:
setLocallyModified in interface Errata
Parameters:
locallyModifiedIn - to set

getLastModified

public java.util.Date getLastModified()
Getter for lastModified

Specified by:
getLastModified in interface Errata
Returns:
Date to get

setLastModified

public void setLastModified(java.util.Date lastModifiedIn)
Setter for lastModified

Specified by:
setLastModified in interface Errata
Parameters:
lastModifiedIn - to set

isProductEnhancement

public boolean isProductEnhancement()
Returns true if the advisory is a Product Enhancement.

Specified by:
isProductEnhancement in interface Errata
Returns:
true if the advisory is a Product Enhancement.

isSecurityAdvisory

public boolean isSecurityAdvisory()
Returns true if the advisory is a Security Advisory.

Specified by:
isSecurityAdvisory in interface Errata
Returns:
true if the advisory is a Security Advisory.

isBugFix

public boolean isBugFix()
Returns true if the advisory is a Bug Fix.

Specified by:
isBugFix in interface Errata
Returns:
true if the advisory is a Bug Fix.

removeBug

public void removeBug(java.lang.Long bugId)
Removes a bug from the bugs set

Specified by:
removeBug in interface Errata
Parameters:
bugId - The id of the bug to remove

addBug

public void addBug(Bug bugIn)
Adds a bug to the bugs set

Specified by:
addBug in interface Errata
Parameters:
bugIn - The bug to add

getBugs

public java.util.Set getBugs()
Specified by:
getBugs in interface Errata
Returns:
Returns the bugs.

setBugs

public void setBugs(java.util.Set b)
Specified by:
setBugs in interface Errata
Parameters:
b - The bugs to set.

addFile

public void addFile(ErrataFile fileIn)
Adds a file to the file set

Specified by:
addFile in interface Errata
Parameters:
fileIn - The file to add

removeFile

public void removeFile(java.lang.Long fileId)
Removes a file from the files set

Specified by:
removeFile in interface Errata
Parameters:
fileId - The id of the file to remove

getFiles

public java.util.Set getFiles()
Specified by:
getFiles in interface Errata
Returns:
Returns the files.

setFiles

public void setFiles(java.util.Set f)
Specified by:
setFiles in interface Errata
Parameters:
f - The files to set.

addKeyword

public void addKeyword(java.lang.String keywordIn)
Convienience method so we can add keywords logically Adds a keyword to the keywords set

Specified by:
addKeyword in interface Errata
Parameters:
keywordIn - The keyword to add.

addKeyword

public void addKeyword(Keyword keywordIn)
Adds a keyword to the keywords set.

Specified by:
addKeyword in interface Errata
Parameters:
keywordIn - The keyword to add.

getKeywords

public java.util.Set getKeywords()
Specified by:
getKeywords in interface Errata
Returns:
Returns the keywords.

setKeywords

public void setKeywords(java.util.Set k)
Specified by:
setKeywords in interface Errata
Parameters:
k - The keywords to set.

addPackage

public void addPackage(Package packageIn)
Adds a package to the packages set and create an ErrataFile that represents this package

Specified by:
addPackage in interface Errata
Parameters:
packageIn - The package to add.

removePackage

public void removePackage(Package packageIn)
Removes a package from the packages set.

Specified by:
removePackage in interface Errata
Parameters:
packageIn - The package to remove.

getPackages

public java.util.Set getPackages()
Specified by:
getPackages in interface Errata
Returns:
Returns the packages.

setPackages

public void setPackages(java.util.Set p)
Specified by:
setPackages in interface Errata
Parameters:
p - The packages to set.

getNotificationQueue

public java.util.Set getNotificationQueue()
Get the set of notifications in the queue for this errata.

Specified by:
getNotificationQueue in interface Errata
Returns:
Returns the set of notifications for this errata

setNotificationQueue

public void setNotificationQueue(java.util.Set queueIn)
Sets the notification queue for this errata

Specified by:
setNotificationQueue in interface Errata
Parameters:
queueIn - The Set of notifications for this errata

addNotification

public void addNotification(java.util.Date dateIn)
Add a new notification for this errata

Specified by:
addNotification in interface Errata
Parameters:
dateIn - The notify date

toString

public java.lang.String toString()

Specified by:
toString in interface Errata
Overrides:
toString in class java.lang.Object

clearChannels

public void clearChannels()
Clears out the Channels associated with this errata.

Specified by:
clearChannels in interface Errata

isPublished

public abstract boolean isPublished()
Tells whether or not the errata is published.

Specified by:
isPublished in interface Errata
Returns:
Returns true if this is a PublishedErrata

isCloned

public abstract boolean isCloned()
Tells whether or not the errata is cloned.

Specified by:
isCloned in interface Errata
Returns:
Returns true if this errata is cloned

isSelectable

public boolean isSelectable()
Specified by:
isSelectable in interface Selectable
Returns:
whether this object is selectable for RhnSet

isSelected

public boolean isSelected()
Specified by:
isSelected in interface Selectable
Returns:
the selected

setSelected

public void setSelected(boolean isSelected)
Description copied from interface: Selectable
sets the selection parameter

Specified by:
setSelected in interface Selectable
Parameters:
isSelected - the selected to set

getSelectionKey

public java.lang.String getSelectionKey()

Specified by:
getSelectionKey in interface Selectable
Returns:
the value of the selection key used in the "selectable" column of an rhn list tag.