Package javax.mail.search

Examples of javax.mail.search.SearchTerm


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

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


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

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

    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

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

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

    public SearchTermBuilder recipient(Message.RecipientType type, String pattern) {
        return recipient(Op.and, type, pattern);
    }

    public SearchTermBuilder recipient(Op op, Message.RecipientType type, String pattern) {
        SearchTerm st = new RecipientStringTerm(type, pattern);
        addTerm(op, st);
        return this;
    }
View Full Code Here

    public SearchTermBuilder flag(Flags flags, boolean set) {
        return flag(Op.and, flags, set);
    }

    public SearchTermBuilder flag(Op op, Flags flags, boolean set) {
        SearchTerm st = new FlagTerm(flags, set);
        addTerm(op, st);
        return this;
    }
View Full Code Here

        Map<String, Object> sstParams = IntrospectionSupport.extractProperties(parameters, "searchTerm.");
        if (!sstParams.isEmpty()) {
            // use SimpleSearchTerm as POJO to store the configuration and then convert that to the actual SearchTerm
            SimpleSearchTerm sst = new SimpleSearchTerm();
            setProperties(sst, sstParams);
            SearchTerm st = MailConverters.toSearchTerm(sst, getCamelContext().getTypeConverter());
            endpoint.setSearchTerm(st);
        }

        // sanity check that we know the mail server
        ObjectHelper.notEmpty(config.getHost(), "host");
View Full Code Here

  //*
  //***************************************************************************/
 
  private SearchTerm parseSearchTerms( Node terms ) throws XPathException
  {
    SearchTerm  st = null;
   
    if( terms.getNodeType() == Node.ELEMENT_NODE && terms.getLocalName().equalsIgnoreCase( "searchTerm" ) ) {
      String type  = ((Element)terms).getAttribute( "type" );
     
      if( type != null ) {
View Full Code Here

 
  private SearchTerm parseChildSearchTerm( Node terms ) throws XPathException
  {
    // Parent only allows a single child search term
   
    SearchTerm  st = null;
   
    NodeList children = terms.getChildNodes();
   
    if( children.getLength() == 1 ) {
      Node child = children.item( 0 );
View Full Code Here

  }
 
 
  private SearchTerm parseFromTerm( Node terms ) throws XPathException
  {
    SearchTerm  st = null;
   
    String pattern  = ((Element)terms).getAttribute( "pattern" );
   
    if( pattern != null && pattern.length() > 0 ) {
      st = new FromStringTerm( pattern );
View Full Code Here

TOP

Related Classes of javax.mail.search.SearchTerm

Copyright © 2018 www.massapicom. 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.