1   /*
2    * $Id$
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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.transport.cxf.employee;
12  
13  import org.apache.cxf.interceptor.Fault;
14  import org.apache.cxf.message.Message;
15  import org.apache.cxf.phase.AbstractPhaseInterceptor;
16  import org.apache.cxf.phase.Phase;
17  
18  public class AttachmentVerifyInterceptor extends AbstractPhaseInterceptor<Message>
19  {
20      public static boolean HasAttachments;
21      
22      public AttachmentVerifyInterceptor()
23      {
24          super(Phase.PRE_STREAM_ENDING);
25      }
26  
27      public void handleMessage(Message message) throws Fault
28      {
29          HasAttachments = message.getAttachments() != null && message.getAttachments().size() > 0;
30      }
31      
32  
33  }
34  
35