org.rhq.enterprise.server.plugin.pc.content
Class PackageSyncReport

java.lang.Object
  extended by org.rhq.enterprise.server.plugin.pc.content.PackageSyncReport

public class PackageSyncReport
extends Object

Indicates the results of performing a syncronize with a package source. This object carries the diff information necessary to update the server's current knowledge of the source's packages.

Author:
Jason Dobies

Constructor Summary
PackageSyncReport()
           
 
Method Summary
 void addDeletePackage(ContentProviderPackageDetails deletedPackage)
          Add to the set of packages that are known to the server but no longer in the external source.
 void addNewPackage(ContentProviderPackageDetails newPackage)
          Add to the set of packages that have been added to the external package source that are not yet known to the server.
 void addUpdatedPackage(ContentProviderPackageDetails updatedPackage)
          Add to the set of packages that are already known to the server and whose metadata has changed in the external package source.
 Set<ContentProviderPackageDetails> getDeletedPackages()
           
 Set<ContentProviderPackageDetails> getNewPackages()
           
 String getSummary()
           
 Set<ContentProviderPackageDetails> getUpdatedPackages()
           
 void setSummary(String summary)
          The synchronization summary.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PackageSyncReport

public PackageSyncReport()
Method Detail

getNewPackages

public Set<ContentProviderPackageDetails> getNewPackages()

addNewPackage

public void addNewPackage(ContentProviderPackageDetails newPackage)
Add to the set of packages that have been added to the external package source that are not yet known to the server. A new version of a package constitutes an entry in this list.

Parameters:
newPackage - contains the details of the new package to be added; should not be null

getUpdatedPackages

public Set<ContentProviderPackageDetails> getUpdatedPackages()

addUpdatedPackage

public void addUpdatedPackage(ContentProviderPackageDetails updatedPackage)
Add to the set of packages that are already known to the server and whose metadata has changed in the external package source. The data in this package will be merged with the server's existing knowledge of the package. Packages should only be added to this updated list if the name and version are the same as a package in the server; new versions of a package belong in the new packages list.

Parameters:
updatedPackage - contains the new information of a package that was updated; should not be null

getDeletedPackages

public Set<ContentProviderPackageDetails> getDeletedPackages()

addDeletePackage

public void addDeletePackage(ContentProviderPackageDetails deletedPackage)
Add to the set of packages that are known to the server but no longer in the external source.

Parameters:
deletedPackage - details object identifying the package that was removed; should not be null

getSummary

public String getSummary()

setSummary

public void setSummary(String summary)
The synchronization summary. Free form textual report that will be stored with the content source sync report.

Parameters:
summary - should not be null

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.