Examples of MessageImpl


Examples of org.apache.james.mime4j.message.MessageImpl

        BodyPart att4 = createRandomBinaryAttachment(100);
        multipart.addBodyPart(att4);
        BodyPart att5 = createTextBody("Some other text here...?!", "plain", true);
        multipart.addBodyPart(att5);
       
        MessageImpl message = new MessageImpl();
        message.setMultipart(multipart);
        message.setSubject("Template message");
        message.setDate(new Date());
        message.getHeader().setField(new RawField(LIST_ID, "<list.example.com>"));

        assertSaveMessageWithAttachments(message, 6);
    }
View Full Code Here

Examples of org.apache.lucene.messages.MessageImpl

      protected QueryNode preProcessNode(QueryNode node)
          throws QueryNodeException {

        if (node instanceof WildcardQueryNode || node instanceof FuzzyQueryNode) {

          throw new QueryNodeException(new MessageImpl(
              QueryParserMessages.EMPTY_MESSAGE));

        }

        return node;
View Full Code Here

Examples of org.apache.lucene.messages.MessageImpl

   * type with the fields "currentToken", "expectedTokenSequences", and
   * "tokenImage" set.
   */
  public ParseException(Token currentTokenVal,
      int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
    super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, initialise(
        currentTokenVal, expectedTokenSequencesVal, tokenImageVal)));
    this.currentToken = currentTokenVal;
    this.expectedTokenSequences = expectedTokenSequencesVal;
    this.tokenImage = tokenImageVal;
  }
View Full Code Here

Examples of org.apache.lucene.messages.MessageImpl

  public ParseException(Message message) {
    super(message);
  }

  public ParseException() {
    super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, "Error"));
  }
View Full Code Here

Examples of org.apache.lucene.messages.MessageImpl

      catch (ParseException tme) {
            tme.setQuery(query);
            throw tme;
      }
      catch (Error tme) {
          Message message = new MessageImpl(QueryParserMessages.INVALID_SYNTAX_CANNOT_PARSE, query, tme.getMessage());
          QueryNodeParseException e = new QueryNodeParseException(tme);
            e.setQuery(query);
            e.setNonLocalizedMessage(message);
            throw e;
      }
View Full Code Here

Examples of org.apache.lucene.messages.MessageImpl

          float fms = defaultMinSimilarity;
          try {
            fms = Float.valueOf(fuzzySlop.image.substring(1)).floatValue();
          } catch (Exception ignored) { }
         if(fms < 0.0f || fms > 1.0f){
           {if (true) throw new ParseException(new MessageImpl(QueryParserMessages.INVALID_SYNTAX_FUZZY_LIMITS));}
         }
         q = new FuzzyQueryNode(field, EscapeQuerySyntaxImpl.discardEscapeChar(term.image), fms, term.beginColumn, term.endColumn);
       }
      break;
    case RANGEIN_START:
View Full Code Here

Examples of org.apache.lucene.messages.MessageImpl

      protected QueryNode preProcessNode(QueryNode node)
          throws QueryNodeException {

        if (node instanceof WildcardQueryNode || node instanceof FuzzyQueryNode) {

          throw new QueryNodeException(new MessageImpl(
              QueryParserMessages.EMPTY_MESSAGE));

        }

        return node;
View Full Code Here

Examples of org.apache.lucene.messages.MessageImpl

  private void processNode(QueryNode node, QueryBuilder builder)
      throws QueryNodeException {

    if (builder == null) {

      throw new QueryNodeException(new MessageImpl(
          QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR, node
              .toQueryString(new EscapeQuerySyntaxImpl()), node.getClass()
              .getName()));

    }
View Full Code Here

Examples of org.apache.lucene.queryparser.flexible.messages.MessageImpl

  throws QueryNodeException {
    if (node instanceof TwigQueryNode) {
      final TwigQueryNode twig = (TwigQueryNode) node;
      if (twig.getChild() instanceof WildcardNodeQueryNode &&
          twig.getRoot() instanceof WildcardNodeQueryNode) {
        throw new QueryNodeException(new MessageImpl("Twig with both root and child empty is not allowed."));
      }
    }
    return node;
  }
View Full Code Here

Examples of org.apache.ode.bpel.engine.MessageImpl

    }

    public void testCreateSOAPRequestFail() throws Exception {
        MessageContext msgCtx = new MessageContext();
        MessageImpl odeMsg = new MessageImpl(new MessageDAOImpl(null));
        odeMsg.setMessage(req1bad.getDocumentElement());
        try {
            portmapper.createSoapRequest(msgCtx, odeMsg, portType.getOperation("getObjectId", null, null));
            fail("Should have caused an ex");
        } catch (AxisFault af) {
            ; // expected
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.