01: /*
02: * $Id: FromImplFactory.java,v 1.5 2004/11/19 14:28:07 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 From elements from a BPEL document into
17: * <code>FromImpl</code> objects. The creation of those objects is delegated
18: * to the <code>BPELElementFactory</code>.
19: *
20: * @author Pawel Kowalski
21: * @version $Revision: 1.5 $, $Date: 2004/11/19 14:28:07 $
22: */
23: public class FromImplFactory extends AbstractObjectCreationFactory {
24:
25: //**************************************************/
26: // create object
27: //**************************************************/
28:
29: /**
30: * Create a <code>FromImpl</code> instance using delegation to a
31: * <code>BPELElementFactory</code>.
32: *
33: * @param attributes
34: * an <code>Attributes</code> value
35: * @return an <code>FromImpl</code> value
36: * @exception Exception
37: * if an error occurs
38: */
39: public Object createObject(Attributes attributes) throws Exception {
40:
41: String variable = attributes.getValue(VARIABLE);
42: String part = attributes.getValue(PART);
43: String property = attributes.getValue(PROPERTY);
44: String partnerLink = attributes.getValue(PARTNER_LINK);
45: String endpointReference = attributes
46: .getValue(ENDPOINT_REFERENCE);
47: String expression = attributes.getValue(EXPRESSION);
48: String opaque = attributes.getValue(OPAQUE);
49:
50: return getElementFactory().createFrom(variable, part, property,
51: partnerLink, endpointReference, expression, opaque);
52: }
53: }
|