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