com.trendmicro.grid.acl.ds
Interface FileProvider

All Superinterfaces:
Repository

public interface FileProvider
extends Repository

Defines a readonly repository that provides information on files.

Version:
1.0
Author:
juergen_kellerer, 2010-05-06

Method Summary
 Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> getCanonicalIdentifiers(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files)
          Returns the canonical list of identifiers for the given file ids.
 Collection<SharedFileDetails> getFileDetailsList(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files)
          Returns the file details list for the given files.
 Collection<SharedFileInformation> getFileInformationList(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files)
          Returns the file information list for the given files.
 com.trendmicro.grid.acl.l0.datatypes.FileIdentiferListPage getMatchingFiles(TagQueryExpression expression, com.trendmicro.grid.acl.l0.datatypes.Range range, int pageNumber)
          Returns all known files that are matched by the given tag expression.
 Collection<Boolean> isFilesKnown(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files)
          Returns true if the identified files exist inside the CoreDB and are not marked 'unknown'.
 Collection<Boolean> isFilesTaggedWith(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files, String[] tags)
          Returns true if the given files are tagged with the specified tags.
 

Method Detail

isFilesKnown

Collection<Boolean> isFilesKnown(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files)
Returns true if the identified files exist inside the CoreDB and are not marked 'unknown'.

Parameters:
files - the files to check.
Returns:
a collection that contains the results of the requested files.

isFilesTaggedWith

Collection<Boolean> isFilesTaggedWith(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files,
                                      String[] tags)
Returns true if the given files are tagged with the specified tags.

Parameters:
files - The files to verify.
tags - The tags to check against.
Returns:
True if the tags apply to the files, false if not, 'null' if the file is unknown.

getMatchingFiles

com.trendmicro.grid.acl.l0.datatypes.FileIdentiferListPage getMatchingFiles(TagQueryExpression expression,
                                                                            com.trendmicro.grid.acl.l0.datatypes.Range range,
                                                                            int pageNumber)
Returns all known files that are matched by the given tag expression.

Parameters:
expression - An expression following the tag query grammar used to identify files.
range - A range limiting the output or 'null' if no range is specified.
pageNumber - The number of the list page to return, starting from 0 for the first chunk.
Returns:
A chunk of file identifiers for the files, matching the given expression or 'null' if no chunk exists under the given number.

getCanonicalIdentifiers

Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> getCanonicalIdentifiers(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files)
Returns the canonical list of identifiers for the given file ids.

Note: This is useful when using identifiers that are missing certain hashes. The method will ensure that SHA1 and MD5 are filled and valid.

Parameters:
files - The files to return the canonical list for.
Returns:
the canonical file identifier list for the given file ids. The list may contain 'null' entries if the corresponding file was unknown.

getFileInformationList

Collection<SharedFileInformation> getFileInformationList(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files)
Returns the file information list for the given files.

Parameters:
files - The files to return the information list for.
Returns:
the file information list for the given file. The list may contain 'null' entries if the corresponding file was unknown.

getFileDetailsList

Collection<SharedFileDetails> getFileDetailsList(Collection<com.trendmicro.grid.acl.l0.datatypes.FileIdentifier> files)
Returns the file details list for the given files.

Parameters:
files - The files to return the details list for.
Returns:
the file details list for the given file. The list may contain 'null' entries if the corresponding file was unknown.