Examples of UnsupportedSearchException


Examples of org.apache.james.mailbox.UnsupportedSearchException

        case BEFORE:
            return NumericRangeQuery.newLongRange(field ,0L, value, true, false);
        case AFTER:
            return NumericRangeQuery.newLongRange(field ,value, Long.MAX_VALUE, false, true);
        default:
            throw new UnsupportedSearchException();
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.UnsupportedSearchException

        case GREATER_THAN:
            return NumericRangeQuery.newLongRange(SIZE_FIELD, op.getValue(), Long.MAX_VALUE, false, true);
        case LESS_THAN:
            return NumericRangeQuery.newLongRange(SIZE_FIELD, Long.MIN_VALUE, op.getValue(), true, false);
        default:
            throw new UnsupportedSearchException();
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.UnsupportedSearchException

            return new TermQuery(new Term(fieldName, cop.getValue()));
        } else if (op instanceof SearchQuery.ExistsOperator){
            return new PrefixQuery(new Term(fieldName, ""));
        } else {
            // Operator not supported
            throw new UnsupportedSearchException();
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.UnsupportedSearchException

            BooleanQuery query = new BooleanQuery();
            query.add(new TermQuery(new Term(BODY_FIELD, crit.getOperator().getValue().toLowerCase(Locale.US))), BooleanClause.Occur.SHOULD);
            query.add(new TermQuery(new Term(HEADERS_FIELD, crit.getOperator().getValue().toLowerCase(Locale.US))), BooleanClause.Occur.SHOULD);
            return query;
        default:
            throw new UnsupportedSearchException();
        }
    }
View Full Code Here

Examples of org.apache.james.mailbox.UnsupportedSearchException

            break;
        case NOR:
            occur = BooleanClause.Occur.MUST_NOT;
            break;
        default:
            throw new UnsupportedSearchException();
        }
        List<Criterion> crits = crit.getCriteria();
        BooleanQuery conQuery = new BooleanQuery();
        for (int i = 0; i < crits.size(); i++) {
            conQuery.add(createQuery(crits.get(i)), occur);
View Full Code Here

Examples of org.apache.james.mailbox.UnsupportedSearchException

            return createAllQuery((AllCriterion) criterion);
        } else if (criterion instanceof SearchQuery.ConjunctionCriterion) {
            SearchQuery.ConjunctionCriterion crit = (SearchQuery.ConjunctionCriterion) criterion;
            return createConjunctionQuery(crit);
        }
        throw new UnsupportedSearchException();

    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.UnsupportedSearchException

        } else if (criterion instanceof SearchQuery.ConjunctionCriterion) {
            result = matches((SearchQuery.ConjunctionCriterion) criterion, message, recentMessageUids, log);
        } else if (criterion instanceof SearchQuery.ModSeqCriterion) {
            result = matches((SearchQuery.ModSeqCriterion) criterion, message);
        } else {
            throw new UnsupportedSearchException();
        }
        return result;
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.UnsupportedSearchException

            case BODY:
                return bodyContains(value, message, log);
            case FULL:
                return messageContains(value, message, log);
            default:
                throw new UnsupportedSearchException();
            }
        } catch (IOException e) {
            throw new MailboxException("Unable to parse message", e);
        } catch (MimeException e) {
            throw new MailboxException("Unable to parse message", e);
View Full Code Here

Examples of org.apache.james.mailbox.exception.UnsupportedSearchException

        } else if (operator instanceof SearchQuery.ExistsOperator) {
            result = exists(headerName, message);
        } else if (operator instanceof SearchQuery.AddressOperator) {
            result = matchesAddress((SearchQuery.AddressOperator) operator, headerName, message, log);
        } else {
            throw new UnsupportedSearchException();
        }
        return result;
    }
View Full Code Here

Examples of org.apache.james.mailbox.exception.UnsupportedSearchException

                    case BEFORE:
                        return before(isoFieldValue, date, res);
                    case ON:
                        return on(isoFieldValue, date, res);
                    default:
                        throw new UnsupportedSearchException();
                    }
                } catch (ParseException e) {
                    return false;
                }
            }
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.