01: /*
02: * $Id: PartnerLinkImplFactory.java,v 1.6 2004/11/22 08:46:49 kowap Exp $
03: *
04: * Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
05: * Berne University of Applied Sciences
06: * School of Engineering and Information Technology
07: * All rights reserved.
08: */
09: 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 PartnerLink elements from a BPEL document into
17: * <code>PartnerLinkImpl</code> objects. The creation of those objects is
18: * delegated to the <code>BPELElementFactory</code>.
19: *
20: * @author Pawel Kowalski
21: * @version $Revision: 1.6 $, $Date: 2004/11/22 08:46:49 $
22: */
23: public class PartnerLinkImplFactory extends
24: AbstractObjectCreationFactory {
25:
26: //**************************************************/
27: // create object
28: //**************************************************/
29:
30: /**
31: * Create a <code>PartnerLinkImpl</code> instance using delegation to a
32: * <code>BPELElementFactory</code>.
33: *
34: * @param attributes
35: * an <code>Attributes</code> value
36: * @return an <code>PartnerLinkImpl</code> value
37: * @exception Exception
38: * if an error occurs
39: */
40: public Object createObject(Attributes attributes) throws Exception {
41:
42: String partnerLinkName = attributes.getValue(NAME);
43: String partnerLinkType = attributes.getValue(PARTNER_LINK_TYPE);
44: String myRole = attributes.getValue(MY_ROLE);
45: String partnerRole = attributes.getValue(PARTNER_ROLE);
46:
47: return getElementFactory().createPartnerLink(partnerLinkName,
48: partnerLinkType, myRole, partnerRole);
49: }
50:
51: }
|