Coverage Report - org.mule.examples.loanbroker.transformers.LoanQuoteRequestToCreditProfileArgs
 
Classes in this File Line Coverage Branch Coverage Complexity
LoanQuoteRequestToCreditProfileArgs
0%
0/8
0%
0/1
1
 
 1  
 /*
 2  
  * $Id: LoanQuoteRequestToCreditProfileArgs.java 7976 2007-08-21 14:26:13Z dirk.olmes $
 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.examples.loanbroker.transformers;
 12  
 
 13  
 import org.mule.examples.loanbroker.messages.LoanBrokerQuoteRequest;
 14  
 import org.mule.transformers.AbstractTransformer;
 15  
 import org.mule.umo.transformer.TransformerException;
 16  
 
 17  
 /**
 18  
  * Extracts the customer information from the request into an array of arguments used
 19  
  * to invoke the Credit Agency Session bean
 20  
  */
 21  
 public class LoanQuoteRequestToCreditProfileArgs extends AbstractTransformer
 22  
 {
 23  
 
 24  
     public LoanQuoteRequestToCreditProfileArgs()
 25  0
     {
 26  0
         registerSourceType(LoanBrokerQuoteRequest.class);
 27  0
     }
 28  
 
 29  
     public Object doTransform(Object src, String encoding) throws TransformerException
 30  
     {
 31  0
         LoanBrokerQuoteRequest request = (LoanBrokerQuoteRequest)src;
 32  0
         Object[] args = new Object[2];
 33  0
         args[0] = request.getCustomerRequest().getCustomer().getName();
 34  0
         args[1] = new Integer(request.getCustomerRequest().getCustomer().getSsn());
 35  0
         return args;
 36  
     }
 37  
 
 38  
 }