Configure how ContentChecker performs checks. More...
Content checked using the Content Checker interface is by default configured to send the URL, IP address or message to the BlackBerry Cloud for verification. Advanced machine-learning capabilities and accumulated knowledge from threat intelligence feeds are used to provide an instant assessment of the safety of the content.
Use this class to configure additional custom allowlists and denylists to evaluate when checking URLs or IP addresses. Alternatively, opt to evaluate content using a recent threat detection model running locally on the device. Using the on-device model prevents the need to make networking requests to the BlackBerry Cloud.
To evaluate content against a custom allowlist and denylist, call ManageRules.setContentCheckerRules to configure a list of URLs or IP addresses. IP addresses maybe be defined as either IPv4 or IPv6.
To configure content checks to only use the BlackBerry Protect on-device threat model, call ManageRules.setContentCheckerRules with the CheckType set to ON_DEVICE.
Classes | |
enum | CheckListCategory |
Enumeration defining the category of a checklist. More... | |
enum | CheckListType |
Enumeration specifying whether a list is a denylist or a allowlist. More... | |
enum | CheckType |
Enumeration which defines the type of check performed. More... | |
Public Member Functions | |
CheckType | getCheckType (ThreatType threatType) |
Determine how the library will evaluate content which needs to be checked. More... | |
ContentCheckerRules | setCheckType (ThreatType threatType, CheckType checkType) |
Control how the content will be evaluated. More... | |
List< String > | getCheckList (CheckListType checkListType, CheckListCategory checkListCategory) |
Return the items within the checklist. More... | |
ContentCheckerRules | setCheckList (CheckListType checkListType, CheckListCategory checkListCategory, List< String > list) |
Define the items within the checklist. More... | |
CheckType getCheckType | ( | ThreatType | threatType | ) |
The default configuration is to query the threat model hosted within BlackBerry Cloud in combination with any configured checklists. If the device is off-line the check will fall back to using the on-device threat model.
threatType | threatType Specify if you want to look at the safeMessaging or safeBrowsing ThreatType. |
ContentCheckerRules setCheckType | ( | ThreatType | threatType, |
CheckType | checkType | ||
) |
Control how the URLs and IPs checked by ContentChecker will be evaluated. (Cloud or Device)
threatType | threatType Indicate if you want to control safeMessaging of safeBrowsing ThreatType. |
checkType | checkType Set if you want the library to use device or cloud based models or just to use a configured checklist. |
List<String> getCheckList | ( | CheckListType | checkListType, |
CheckListCategory | checkListCategory | ||
) |
Return the items within the checklist matching the specified parameters.
checkListType | A checkListType which defines if the items are allowed or denied. |
checkListCategory | A ChecklistCategory which indicates if the items are domain URLs or IP address. |
ContentCheckerRules setCheckList | ( | CheckListType | checkListType, |
CheckListCategory | checkListCategory, | ||
List< String > | list | ||
) |
Define the list of items within a checklist.
checkListType | A checkListType which defines if the items are allowed or denied. |
checkListCategory | A ChecklistCategory which defines if the items are domain URLs or IP address. |
list | The full list of strings (URLs or IP addresses) to be configured for this checklist. |