View Javadoc

1   /*
2    * $Id: AddReceivedNodeService.java 20321 2010-11-24 15:21:24Z dfeist $
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  
11  package org.mule.test.integration.routing.outbound;
12  
13  import org.mule.api.service.Service;
14  import org.mule.api.service.ServiceAware;
15  
16  import org.dom4j.Document;
17  import org.dom4j.Element;
18  
19  /**
20   * TODO
21   */
22  public class AddReceivedNodeService implements ServiceAware
23  {
24      private Service service;
25  
26      public void setService(Service service)
27      {
28          this.service = service;
29      }
30  
31      public Document addNodeTo(Document doc)
32      {
33          Element e = doc.getRootElement().addElement("Received");
34          e.setText(service.getName());
35          return doc;
36      }
37  }