Class MailBox


  • public class MailBox
    extends Object
    • Field Detail

      • firstname

        public String firstname
      • lastname

        public String lastname
      • address

        public String address
    • Constructor Detail

      • MailBox

        public MailBox​(DocumentModel user,
                       boolean isStrict)
      • MailBox

        public MailBox​(String info,
                       boolean isStrict)
    • Method Detail

      • fetchPersonsFromList

        public static List<MailBox> fetchPersonsFromList​(List<String> values,
                                                         boolean isStrict)
        Fetch for each string given the mailbox target associated see
      • fetchPersonsFromString

        public static List<MailBox> fetchPersonsFromString​(String value,
                                                           boolean isStrict)
        Resolve value to find the mailbox associated. if strict is true and if value is prefixed by "user:" then find the email address in his profile, otherwise the given string is considered as the email address. if strict is false, and there is comma. The value is considered as a list. For each substring the resolution is as explained below : if the substring startswith by "user:" then try to resolve the user email, otherwise try to fetch the user without prefix if not found considered the string as an email address.
      • toString

        public String toString()
        returning the mailbox address as String. If firstname and lastname is set add it into the returned string.
        Overrides:
        toString in class Object