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

java.lang.Object
  extended by com.trendmicro.grid.acl.ds.jpa.AbstractReceivedResultsHandler<T>
      extended by com.trendmicro.grid.acl.ds.jpa.AbstractReceivedFileContentsHandler<Collection<ReceivedPreparedPackagesHandler.PreparedPackage>>
          extended by com.trendmicro.grid.acl.ds.jpa.ReceivedPreparedPackagesHandler

public class ReceivedPreparedPackagesHandler
extends AbstractReceivedFileContentsHandler<Collection<ReceivedPreparedPackagesHandler.PreparedPackage>>

Manages updates to PACKAGES & HISTORY table.

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

Nested Class Summary
static class ReceivedPreparedPackagesHandler.PreparedPackage
          Defines a prepared package that may be used for further updates.
 
Nested classes/interfaces inherited from class com.trendmicro.grid.acl.ds.jpa.AbstractReceivedResultsHandler
AbstractReceivedResultsHandler.StorageContext
 
Constructor Summary
ReceivedPreparedPackagesHandler(JpaFileRepository fileRepository, JpaPackageRepository packageRepository, AbstractReceivedResultsHandler<Collection<JpaPackageFamily>> familyHandler)
          Creates a new thread safe instance.
 
Method Summary
protected  Collection<ReceivedPreparedPackagesHandler.PreparedPackage> handle(AbstractReceivedResultsHandler.StorageContext context)
          Handles the job in relation to the given storage context.
 
Methods inherited from class com.trendmicro.grid.acl.ds.jpa.AbstractReceivedFileContentsHandler
createOrUpdateFileReference, createOrUpdateFileReferences
 
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

ReceivedPreparedPackagesHandler

public ReceivedPreparedPackagesHandler(JpaFileRepository fileRepository,
                                       JpaPackageRepository packageRepository,
                                       AbstractReceivedResultsHandler<Collection<JpaPackageFamily>> familyHandler)
Creates a new thread safe instance.

Parameters:
fileRepository - the repository to use for file contents.
packageRepository - the repository to use for packages.
familyHandler - the FamilyHandler to use.
Method Detail

handle

protected Collection<ReceivedPreparedPackagesHandler.PreparedPackage> handle(AbstractReceivedResultsHandler.StorageContext context)
Handles the job in relation to the given storage context.

Specified by:
handle in class AbstractReceivedResultsHandler<Collection<ReceivedPreparedPackagesHandler.PreparedPackage>>
Parameters:
context - the data set to handle.
Returns:
an arbitrary value that may be used by downstream handlers, or 'null' if not relevant.