View Javadoc

1   /*
2    * $Id: ReplyImplFactory.java,v 1.1 2004/12/15 14:18:09 patforna Exp $
3    *
4    * Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
5    * Berne University of Applied Sciences
6    * School of Engineering and Information Technology
7    * All rights reserved.
8    */
9   package bexee.model.xmltobpel;
10  
11  import org.xml.sax.Attributes;
12  
13  /***
14   * This class is used by the <a
15   * href="http://jakarta.apache.org/commons/digester/">Digester </a> for the
16   * transformation of Reply activities from a BPEL document into
17   * <code>ReplyImpl</code> objects. The creation of those objects is delegated
18   * to the <code>BPELElementFactory</code>.
19   * 
20   * @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:09 $
21   * @author Patric Fornasier
22   * @author Pawel Kowalski
23   */
24  public class ReplyImplFactory extends AbstractObjectCreationFactory {
25  
26      /***
27       * Prepare Reply activity values and delegate object creation to the
28       * <code>BPELElementFactory</code>.
29       */
30      public Object createObject(Attributes attributes) throws Exception {
31  
32          String partnerLink = attributes.getValue(PARTNER_LINK);
33          String portType = attributes.getValue(PORT_TYPE);
34          String operation = attributes.getValue(OPERATION);
35          String variable = attributes.getValue(VARIABLE);
36          String faultName = attributes.getValue(FAULT_NAME);
37  
38          return getElementFactory().createReply(
39                  getStandardAttributes(attributes), partnerLink, portType,
40                  operation, variable, faultName);
41      }
42  
43  }