|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicRequestContext @WebServlet(value="/ws/level-0/files") public interface PublicFileService
Defines public reachable services to query file details.
Method Summary | |
---|---|
FileDetails |
getFileDetails(FileIdentifier file)
Returns the file details for the given file. |
Collection<FileDetails> |
getFileDetailsList(BatchCollection<FileIdentifier> files)
Returns the file details list for the given files. |
FileInformation |
getFileInformation(FileIdentifier file)
Returns the file information for the given file. |
Collection<FileInformation> |
getFileInformationList(BatchCollection<FileIdentifier> files)
Returns the file information list for the given files. |
FileIdentiferListPage |
getFilesTaggedWith(String[] tags,
int pageNumber)
Returns all known files that are tagged with the given list of tags. |
FileIdentiferListPage |
getMatchingFiles(String tagExpression,
String tagExpressionVersion,
int pageNumber)
Returns all known files that are matched by the given tag expression. |
FileIdentiferListPage |
getMatchingFilesInRange(String tagExpression,
String tagExpressionVersion,
Range range,
int pageNumber)
Returns all known files that are matched by the given tag expression and are in the given range. |
boolean |
isFileKnown(FileIdentifier file)
Returns true if the GRID database knows (contains) the given file. |
IsTrueResult |
isFileKnownGood(FileIdentifier file)
Returns 'Yes' if the GRID database knows that the file is good. |
IsTrueResult |
isFilePureWhite(FileIdentifier file)
Returns 'Yes' if the GRID database knows that the file is good and not included in the high risk category. |
Collection<Boolean> |
isFilesKnown(BatchCollection<FileIdentifier> files)
Implements a batch query for isFileKnown(FileIdentifier) . |
Collection<IsTrueResult> |
isFilesKnownGood(BatchCollection<FileIdentifier> files)
Implements a batch query for isFileKnownGood(FileIdentifier) . |
Collection<IsTrueResult> |
isFilesPureWhite(BatchCollection<FileIdentifier> files)
Implements a batch query for isFilePureWhite(FileIdentifier) . |
Collection<Boolean> |
isFilesTaggedWith(BatchCollection<FileIdentifier> files,
String[] tags)
Deprecated. Please use isFilesTaggedWithAll(BatchCollection, String[]) instead. |
Collection<IsTrueResult> |
isFilesTaggedWithAll(BatchCollection<FileIdentifier> files,
String[] tags)
Returns 'Yes' if the given files are tagged with the specified tags. |
Boolean |
isFileTaggedWith(FileIdentifier file,
String[] tags)
Deprecated. Please use isFileTaggedWithAll(FileIdentifier, String[]) instead. |
IsTrueResult |
isFileTaggedWithAll(FileIdentifier file,
String[] tags)
Returns 'Yes' if the given file is tagged with the specified tags. |
Method Detail |
---|
@RequiredRoles(value="run.hash.queries") boolean isFileKnown(FileIdentifier file) throws AuthenticationException
file
- the file to check.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.hash.queries") Collection<Boolean> isFilesKnown(BatchCollection<FileIdentifier> files) throws AuthenticationException
isFileKnown(FileIdentifier)
.
files
- the files to check.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.hash.queries") IsTrueResult isFileKnownGood(FileIdentifier file) throws AuthenticationException
file
- the file to check.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.hash.queries") Collection<IsTrueResult> isFilesKnownGood(BatchCollection<FileIdentifier> files) throws AuthenticationException
isFileKnownGood(FileIdentifier)
.
files
- the files to check.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.hash.queries") IsTrueResult isFilePureWhite(FileIdentifier file) throws AuthenticationException
file
- the file to check.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.hash.queries") Collection<IsTrueResult> isFilesPureWhite(BatchCollection<FileIdentifier> files) throws AuthenticationException
isFilePureWhite(FileIdentifier)
.
files
- the files to check.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@Deprecated @RequiredRoles(value="run.hash.queries") Boolean isFileTaggedWith(FileIdentifier file, String[] tags) throws AuthenticationException
isFileTaggedWithAll(FileIdentifier, String[])
instead.
FileIdentifier id = new FileIdentifier(sha1Hash);
Boolean isClean = publicFileService.isFileTaggedWith(id, "clean");
if (isClean == null) {
// file is unknown
} else if (isClean) {
// file is known bood
} else {
// file is known bad
}
file
- The file to verify.tags
- The tags to check against.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@Deprecated @RequiredRoles(value="run.hash.queries") Collection<Boolean> isFilesTaggedWith(BatchCollection<FileIdentifier> files, String[] tags) throws AuthenticationException
isFilesTaggedWithAll(BatchCollection, String[])
instead.
isFileTaggedWith(FileIdentifier, String[])
.
Important Note: This method returned incorrect data when 'null' values were contained in the result.
'Null' values are swallowed by the XML serialization framework, because it considers the booleans
as primitive types. Therefore starting from GACL 1.2, this method substitutes 'null' with 'false'.
Use isFilesTaggedWithAll(BatchCollection, String[])
instead, to get a 3-way result.
files
- The files to verify.tags
- The tags to check against.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.hash.queries") IsTrueResult isFileTaggedWithAll(FileIdentifier file, String[] tags) throws AuthenticationException
FileIdentifier id = new FileIdentifier(sha1Hash);
switch(publicFileService.isFileTaggedWithAll(id, "clean")) {
case Yes: // file is known good
break;
case No: // file is known bad
break;
case NotKnown: // file is unknown
break;
}
When querying multiple files, isFilesTaggedWithAll(BatchCollection, String[])
, may be more efficient.
Note: This method is a replacement for isFileTaggedWith(FileIdentifier, String[])
as a 3-way boolean
is not obvious and not supported in all programming languages.
file
- The file to verify.tags
- The tags to check against.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.hash.queries") Collection<IsTrueResult> isFilesTaggedWithAll(BatchCollection<FileIdentifier> files, String[] tags) throws AuthenticationException
isFileTaggedWithAll(FileIdentifier, String[])
.
Note: This method is a replacement for isFilesTaggedWith(BatchCollection, String[])
as a 3-way boolean
is not obvious and not supported in all programming languages.
files
- The files to verify.tags
- The tags to check against.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.tag.matching.queries") FileIdentiferListPage getFilesTaggedWith(String[] tags, int pageNumber) throws AuthenticationException
tags
- The tags to get the files for.pageNumber
- The number of the list page to return, starting from 0 for the first chunk.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.tag.matching.queries") FileIdentiferListPage getMatchingFiles(String tagExpression, String tagExpressionVersion, int pageNumber) throws AuthenticationException
(mustBeInGroup1 -mustNotBeInGroup1) (mustBeInGroup2 -mustNotBeInGroup2 mustBe2InGroup2)
selects all files that were tagged with "mustBeInGroup1" but not with "mustNotBeInGroup1" and files that were
tagged with "mustBeInGroup2" and "mustBe2InGroup2" but not "mustNotBeInGroup2".
tagExpression
- An expression following the tag query grammar used to identify files.tagExpressionVersion
- The version of the expression (the most recent version is assumed if omitted).pageNumber
- The number of the list page to return, starting from 0 for the first chunk.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.tag.matching.queries") FileIdentiferListPage getMatchingFilesInRange(String tagExpression, String tagExpressionVersion, Range range, int pageNumber) throws AuthenticationException
tagExpression
- An expression following the tag query grammar used to identify files.tagExpressionVersion
- The version of the expression (the most recent version is assumed if omitted).range
- The range limiting the output.pageNumber
- The number of the list page to return, starting from 0 for the first chunk.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value="run.hash.queries") FileInformation getFileInformation(FileIdentifier file) throws AuthenticationException
file
- The file to return the information for.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@ResponseWrapper(className="com.trendmicro.grid.acl.l0.wrappers.GetFileInformationListResponse") @RequiredRoles(value="run.hash.queries") Collection<FileInformation> getFileInformationList(BatchCollection<FileIdentifier> files) throws AuthenticationException
files
- The files to return the information list for.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@RequiredRoles(value={"run.hash.queries","access.details"}) FileDetails getFileDetails(FileIdentifier file) throws AuthenticationException
file
- The file to return the details for.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.@ResponseWrapper(className="com.trendmicro.grid.acl.l0.wrappers.GetFileDetailsListResponse") @RequiredRoles(value={"run.hash.queries","access.details"}) Collection<FileDetails> getFileDetailsList(BatchCollection<FileIdentifier> files) throws AuthenticationException
files
- The files to return the details list for.
AuthenticationException
- In case of this service requires authentication and the current user session
is not authenticated or doesn't have the right to access the service.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |