View Javadoc

1   /*
2    * $Id: AddReceivedNodeService.java 19191 2010-08-25 21:05:23Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  package org.mule.test.integration.routing.outbound;
11  
12  import org.mule.api.service.Service;
13  import org.mule.api.service.ServiceAware;
14  
15  import org.dom4j.Document;
16  import org.dom4j.Element;
17  
18  /**
19   * TODO
20   */
21  public class AddReceivedNodeService implements ServiceAware
22  {
23      private Service service;
24  
25      public void setService(Service service)
26      {
27          this.service = service;
28      }
29  
30      public Document addNodeTo(Document doc)
31      {
32          Element e = doc.getRootElement().addElement("Received");
33          e.setText(service.getName());
34          return doc;
35      }
36  }