com.trendmicro.grid.acl.ds.jpa
Class AbstractReceivedFileContentsHandler<T>
java.lang.Object
com.trendmicro.grid.acl.ds.jpa.AbstractReceivedResultsHandler<T>
com.trendmicro.grid.acl.ds.jpa.AbstractReceivedFileContentsHandler<T>
- Direct Known Subclasses:
- ReceivedDataSetsHandler, ReceivedPreparedPackagesHandler
public abstract class AbstractReceivedFileContentsHandler<T>
- extends AbstractReceivedResultsHandler<T>
Is the base for handlers that deal with JpaFileDetails.
- Version:
- 1.0
- Author:
- juergen_kellerer, 2010-11-22
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractReceivedFileContentsHandler
protected AbstractReceivedFileContentsHandler(JpaFileRepository fileRepository)
- Creates a new instance.
- Parameters:
fileRepository
- the repository to use for file contents.
createOrUpdateFileReferences
protected Collection<JpaFileDetails> createOrUpdateFileReferences(AbstractReceivedResultsHandler.StorageContext context,
Collection<com.trendmicro.grid.acl.l0.datatypes.PackageMember> members)
- Creates or updates the file references for the given list of package members.
- Parameters:
context
- the context for the current transaction.members
- the members to convert to file references.
- Returns:
- a list of file content references (to be used as FILE_CONTENT_IDs).
createOrUpdateFileReference
protected JpaFileDetails createOrUpdateFileReference(AbstractReceivedResultsHandler.StorageContext context,
com.trendmicro.grid.acl.l0.datatypes.FileDetails details,
boolean forceTimeUpdates)
- Creates or updates the file reference for the given source file details instance.
- Parameters:
context
- the context for the current transaction.details
- the source details to create or update.forceTimeUpdates
- Forces updating timestamps even if file details did not contain changed content and
alwaysUpdateTimestamps is set to false.
- Returns:
- a list of file content references (to be used as FILE_CONTENT_IDs).