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 java.lang.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.
 java.util.Set<ContentProviderPackageDetails> getDeletedPackages()
           
 java.util.Set<ContentProviderPackageDetails> getNewPackages()
           
 java.lang.String getSummary()
           
 java.util.Set<ContentProviderPackageDetails> getUpdatedPackages()
           
 void setSummary(java.lang.String summary)
          The synchronization summary.
 java.lang.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 java.util.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 java.util.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 java.util.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 java.lang.String getSummary()

setSummary

public void setSummary(java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object


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