| 
  |||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| ToImplFactory.java | - | 100% | 100% | 100% | 
             | 
  ||||||||||||||
| 1 | 
       /*
 | 
|
| 2 | 
        * $Id: ToImplFactory.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 To elements from a BPEL document into <code>ToImpl</code>
 | 
|
| 17 | 
        * objects. The creation of those objects is delegated to the
 | 
|
| 18 | 
        * <code>BPELElementFactory</code>.
 | 
|
| 19 | 
        * 
 | 
|
| 20 | 
        * @author Pawel Kowalski
 | 
|
| 21 | 
        * @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:09 $
 | 
|
| 22 | 
        */
 | 
|
| 23 | 
      public class ToImplFactory extends AbstractObjectCreationFactory {  | 
|
| 24 | 
       | 
|
| 25 | 
           //**************************************************/
 | 
|
| 26 | 
           // create object
 | 
|
| 27 | 
           //**************************************************/
 | 
|
| 28 | 
       | 
|
| 29 | 
           /**
 | 
|
| 30 | 
            * Create a <code>ToImpl</code> instance using delegation to a
 | 
|
| 31 | 
            * <code>BPELElementFactory</code>.
 | 
|
| 32 | 
            * 
 | 
|
| 33 | 
            * @param attributes
 | 
|
| 34 | 
            *            an <code>Attributes</code> value
 | 
|
| 35 | 
            * @return an <code>ToImpl</code> value
 | 
|
| 36 | 
            * @exception Exception
 | 
|
| 37 | 
            *                if an error occurs
 | 
|
| 38 | 
            */
 | 
|
| 39 | 40 | 
   public Object createObject(Attributes attributes) throws Exception {  | 
| 40 | 
       | 
|
| 41 | 40 | 
   String variable = attributes.getValue(VARIABLE);  | 
| 42 | 40 | 
   String part = attributes.getValue(PART);  | 
| 43 | 40 | 
   String partnerLink = attributes.getValue(PARTNER_LINK);  | 
| 44 | 40 | 
   String property = attributes.getValue(PROPERTY);  | 
| 45 | 
       | 
|
| 46 | 40 | 
            return getElementFactory().createTo(variable, part, property,
 | 
| 47 | 
      partnerLink);  | 
|
| 48 | 
      }  | 
|
| 49 | 
      }  | 
  | 
||||||||||