Class MapiPropsExtractorUtil


  • public class MapiPropsExtractorUtil
    extends Object
    Utility class for extracting MAPI properties from JNEF Message streams. for a good overview about the different attributes see https://github.com/Teamwork/tnef/blob/master/tnef.go
    • Method Detail

      • collectRecipientInformation

        protected static List<String> collectRecipientInformation​(net.freeutils.tnef.Message msg)
        This method collects all recipient email addresses from a JNEF message object and provides them in form of list of strings.
        Parameters:
        msg - the provided JNEF message.
        Returns:
        a list of strings of the collected recipient information.
      • fetchRecipientsData

        protected static Optional<List<RecipientData>> fetchRecipientsData​(net.freeutils.tnef.Message message)
        This method fetches all available RecipientData information from a given JNEF message.
        Parameters:
        message - the JNEF message object.
        Returns:
        an Optional of an extracted list of recipients data.
      • fetchRecipientsData

        protected static Optional<List<RecipientData>> fetchRecipientsData​(net.freeutils.tnef.Message message,
                                                                           Map<Integer,​RecipientData.Attribute> attributesToExtract)
        This method create RecipientData objects that correspond to the information inside the provided JNEF Message.
        Parameters:
        message - the JNEF message object.
        attributesToExtract - determines which attributes shall be extracted into the recipient data objects.
        Returns:
        an Optional of the collected recipient data in a list.
      • getSingleRecipientDataList

        protected static Optional<List<RecipientData>> getSingleRecipientDataList​(net.freeutils.tnef.MAPIProps mapiProps,
                                                                                  Map<Integer,​RecipientData.Attribute> attributesToExtract)
        This method extracts a single RecipientData object from a set of recipient data values inside the given mapi properties.
        Parameters:
        mapiProps - the provided mapi properties.
        attributesToExtract - determines which attributes shall be extracted for each data set.
        Returns:
        an Optional of the collected RecipientData object.
      • getMultipleRecipientsDataList

        protected static Optional<List<RecipientData>> getMultipleRecipientsDataList​(net.freeutils.tnef.MAPIProps[] mapiPropsArray,
                                                                                     Map<Integer,​RecipientData.Attribute> attributesToExtract)
        This method iterates over all the mapiPropsArrays. Each mapiPropsArray thereby defines one recipient data set. As a result this method returns an optional of a list of RecipientData objects.
        Parameters:
        mapiPropsArray - the recipient data sets.
        attributesToExtract - determines which attributes shall be extracted for each data set.
        Returns:
        an Optional of the collected RecipientData objects.