Package org.mule.example.bookstore

Examples of org.mule.example.bookstore.Book


   
    @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,
View Full Code Here


        if (StringUtils.isBlank(price))
        {
            throw new TransformerException(BookstoreAdminMessages.missingPrice(), this);
        }

        return new Book(author, title, Double.parseDouble(price));
    }
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);
View Full Code Here

        if (StringUtils.isBlank(price))
        {
            throw new TransformerException(BookstoreAdminMessages.missingPrice(), this);
        }

        return new Book(author, title, Double.parseDouble(price));
    }
View Full Code Here

TOP

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

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.