Sleuth Kit Java Bindings (JNI)  4.10.0
Java bindings for using The Sleuth Kit
org.sleuthkit.datamodel.CommunicationsUtils Class Reference

Static Public Member Functions

static boolean isValidAccountId (Account.Type accountType, String accountUniqueID)
 
static boolean isValidEmailAddress (String emailAddress)
 
static boolean isValidPhoneNumber (String phoneNum)
 
static String normalizeEmailAddress (String emailAddress) throws InvalidAccountIDException
 
static String normalizePhoneNum (String phoneNumber) throws InvalidAccountIDException
 

Detailed Description

Provides general utility methods related to communications artifacts.

Definition at line 30 of file CommunicationsUtils.java.

Member Function Documentation

static boolean org.sleuthkit.datamodel.CommunicationsUtils.isValidAccountId ( Account.Type  accountType,
String  accountUniqueID 
)
static

Checks if the given accountId is a valid id for the specified account type.

Parameters
accountTypeAccount type.
accountUniqueIDId to check.
Returns
True, if the id is a valid id for the given account type, False otherwise.

Definition at line 116 of file CommunicationsUtils.java.

References org.sleuthkit.datamodel.Account.Type.EMAIL, org.sleuthkit.datamodel.CommunicationsUtils.isValidEmailAddress(), org.sleuthkit.datamodel.CommunicationsUtils.isValidPhoneNumber(), and org.sleuthkit.datamodel.Account.Type.PHONE.

static boolean org.sleuthkit.datamodel.CommunicationsUtils.isValidEmailAddress ( String  emailAddress)
static

Checks if the given string is a valid email address.

Note: this method intentionally performs a rather lenient validation in order to not drop any collected data.

Note: We are requiring that an email address have a "." on the right-hand side to allow us to differentiate between app-specific identifiers and email addresses. We realize that some emails can be sent within enterprises without a ".', but that this is less common than encountering app-specific identifiers of the form a.

Parameters
emailAddressString to check.
Returns
True if the given string is a valid email address, false otherwise.

Definition at line 187 of file CommunicationsUtils.java.

Referenced by org.sleuthkit.datamodel.CommunicationsUtils.isValidAccountId(), and org.sleuthkit.datamodel.CommunicationsUtils.normalizeEmailAddress().

static boolean org.sleuthkit.datamodel.CommunicationsUtils.isValidPhoneNumber ( String  phoneNum)
static

Checks if the given string is a valid phone number.

NOTE: this method intentionally performs a rather lenient validation of the phone number in order to not drop any collected data.

Parameters
phoneNumPhone number string to check.
Returns
True if the given string is a valid phone number, false otherwise.

Definition at line 138 of file CommunicationsUtils.java.

Referenced by org.sleuthkit.datamodel.CommunicationsUtils.isValidAccountId(), and org.sleuthkit.datamodel.CommunicationsUtils.normalizePhoneNum().

static String org.sleuthkit.datamodel.CommunicationsUtils.normalizeEmailAddress ( String  emailAddress) throws InvalidAccountIDException
static

Normalizes the given email address.

Parameters
emailAddressThe email address string to be normalized.
Returns
The normalized email address.
Exceptions
InvalidAccountIDExceptionIf the given string is not a valid email address.

Definition at line 93 of file CommunicationsUtils.java.

References org.sleuthkit.datamodel.CommunicationsUtils.isValidEmailAddress().

static String org.sleuthkit.datamodel.CommunicationsUtils.normalizePhoneNum ( String  phoneNumber) throws InvalidAccountIDException
static

Normalize the given phone number by removing all non numeric characters, except: a leading + # or * or ,

Note: this method intentionally performs a rather lenient validation of the phone number in order to not drop any collected data.

Parameters
phoneNumberThe string to normalize.
Returns
The normalized phone number.
Exceptions
InvalidAccountIDExceptionIf the given string is not a valid phone number.

Definition at line 61 of file CommunicationsUtils.java.

References org.sleuthkit.datamodel.CommunicationsUtils.isValidPhoneNumber().


The documentation for this class was generated from the following file:

Copyright © 2011-2020 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.