com.trendmicro.grid.acl.ds.jpa
Class ReceivedPackageFamiliesHandler

java.lang.Object
  extended by com.trendmicro.grid.acl.ds.jpa.AbstractReceivedResultsHandler<Collection<JpaPackageFamily>>
      extended by com.trendmicro.grid.acl.ds.jpa.ReceivedPackageFamiliesHandler

public class ReceivedPackageFamiliesHandler
extends AbstractReceivedResultsHandler<Collection<JpaPackageFamily>>

Implements a handler for syncing package families contained in processing results.

The handler returns a corresponding collection of package family references that can be used as references when storing the packages contained in the processing result.

Version:
1.0
Author:
juergen_kellerer, 2010-11-22

Nested Class Summary
 
Nested classes/interfaces inherited from class com.trendmicro.grid.acl.ds.jpa.AbstractReceivedResultsHandler
AbstractReceivedResultsHandler.StorageContext
 
Constructor Summary
ReceivedPackageFamiliesHandler(JpaVendorRepository vendorRepository, JpaPackageFamilyRepository packageFamilyRepository)
          Creates a new instance that operates on the given repositories and settings.
 
Method Summary
protected  Collection<JpaPackageFamily> handle(AbstractReceivedResultsHandler.StorageContext context)
          Creates a corresponding collection of package family references that can be used to store packages.
 
Methods inherited from class com.trendmicro.grid.acl.ds.jpa.AbstractReceivedResultsHandler
getValue, isAfter, isNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceivedPackageFamiliesHandler

public ReceivedPackageFamiliesHandler(JpaVendorRepository vendorRepository,
                                      JpaPackageFamilyRepository packageFamilyRepository)
Creates a new instance that operates on the given repositories and settings.

Parameters:
vendorRepository - The vendor repository to use for syncing the vendors.
packageFamilyRepository - the PF repository to use for syncing the PackageFamilies.
Method Detail

handle

protected Collection<JpaPackageFamily> handle(AbstractReceivedResultsHandler.StorageContext context)
Creates a corresponding collection of package family references that can be used to store packages.

Specified by:
handle in class AbstractReceivedResultsHandler<Collection<JpaPackageFamily>>
Parameters:
context - the data set to handle.
Returns:
a corresponding collection of package family references.