Package org.mule.example.bookstore

Examples of org.mule.example.bookstore.Order


    }
   
    @Override
    protected Object doTransform(Object src, String outputEncoding) throws TransformerException
    {
        Order order = (Order) src;
        Book book = order.getBook();
       
        String body =  "Thank you for placing your order for " +
                       book.getTitle() + " with the Mule-powered On-line Bookstore. " +
                       "Your order will be shipped  to " +
                       order.getAddress() + " by the next business day.";
       
        String email = order.getEmail();
        RequestContext.getEventContext().getMessage().setOutboundProperty(MailProperties.TO_ADDRESSES_PROPERTY,
                                                                          email);
        logger.info("Sending e-mail notification to " + email);
        return body;
    }
View Full Code Here


    }

    @Override
    public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException
    {
        Order order = (Order) message.getPayload();
        Book book = order.getBook();

        String body =  "Thank you for placing your order for " +
                       book.getTitle() + " with the Mule-powered On-line Bookstore. " +
                       "Your order will be shipped  to " +
                       order.getAddress() + " by the next business day.";

        String email = order.getEmail();
        message.setOutboundProperty(MailProperties.TO_ADDRESSES_PROPERTY, email);

        logger.info("Sending e-mail notification to " + email);
        return body;
    }
View Full Code Here

TOP

Related Classes of org.mule.example.bookstore.Order

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.