Examples of BodyTerm


Examples of javax.mail.search.BodyTerm

    public SearchTermBuilder body(String pattern) {
        return body(Op.and, pattern);
    }

    public SearchTermBuilder body(Op op, String pattern) {
        SearchTerm st = new BodyTerm(pattern);
        addTerm(op, st);
        return this;
    }
View Full Code Here

Examples of javax.mail.search.BodyTerm

            case DATE_EQ:
                seekStrategy = new SentDateTerm(SentDateTerm.EQ,parseDate(value));
                LOG.debug("Fetching emails with a send date newer than \"" + value + "\"");
                break;
            case KEYWORD:
                seekStrategy = new BodyTerm(value);
                LOG.debug("Fetching emails containing the keyword \"" + value + "\"");
                break;
            case UNREAD:
                seekStrategy = new FlagTerm(new Flags(Flags.Flag.SEEN), false);
                LOG.debug("Fetching all unread emails");
View Full Code Here

Examples of javax.mail.search.BodyTerm

            case DATE_EQ:
                seekStrategy = new SentDateTerm(SentDateTerm.EQ,parseDate(value));
                LOG.debug("Fetching emails with a send date newer than \"" + value + "\"");
                break;
            case KEYWORD:
                seekStrategy = new BodyTerm(value);
                LOG.debug("Fetching emails containing the keyword \"" + value + "\"");
                break;
            case UNREAD:
                seekStrategy = new FlagTerm(new Flags(Flags.Flag.SEEN), false);
                LOG.debug("Fetching all unread emails");
View Full Code Here

Examples of javax.mail.search.BodyTerm

                    if (message.getFrom().getEmail().equalsIgnoreCase(value)) {
                        matchedEmails.add(message);
                    }
                    break;
                case KEYWORD:
                    if (((JavaMailGmailMessage)message).getMessage().match(new BodyTerm(value))) {
                        matchedEmails.add(message);
                    }
                    break;
                case CC:
                    wasFound = false;
View Full Code Here

Examples of javax.mail.search.BodyTerm

      String dateToValue = getParamValue( params, SearchFields.DATE_TO.name() );

      try {
        // Body search
        if ( StringUtils.contains( extendedSearchFields, SearchFields.CONTENT.name() ) ) {
          BodyTerm term = new BodyTerm( contentValue );
          msgs = mailFolder.search( term, msgs );
          if ( msgs == null ) {
            msgs = new Message[0];
          }
        }
View Full Code Here

Examples of javax.mail.search.BodyTerm

      }
      else if ( searchField == MessageListFields.CC ) {
        terms[i] = new RecipientStringTerm( RecipientType.CC, searchValues[i] );
      }
      else if ( searchField == MessageListFields.CONTENT ) {
        terms[i] = new BodyTerm( searchValues[i] );
      }
      else {
        throw new IllegalArgumentException( "Search field now allowed: " + searchField.name() );
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.