Clover coverage report - CRISPY - 1.1.1
Coverage timestamp: Mi Nov 15 2006 13:09:46 CET
file stats: LOC: 35   Methods: 1
NCLOC: 14   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
UrlPlusClassNameInvocationStrategy.java 100% 100% 100% 100%
coverage
 1    package net.sf.crispy.strategy;
 2   
 3    import java.util.Map;
 4   
 5    import net.sf.crispy.InvocationStrategy;
 6    import net.sf.crispy.util.Converter;
 7   
 8    /**
 9    * Example:
 10    * <br>
 11    * the url (namespace = InvocationStrategy.URL) = <i>http://localhost:8080/axis/services</i>
 12    * <br>
 13    * invoke of the class (InvocationStrategy.CLASS_NAME): <i>test.crispy.example.service.Calculator</i>
 14    * <br>
 15    * <b>convert result:</b> <i>http://localhost:8080/axis/services/Calculator</i>
 16    *
 17    *
 18    * @author Linke
 19    *
 20    */
 21    public class UrlPlusClassNameInvocationStrategy implements InvocationStrategy {
 22   
 23  65 public Object convert(Map pvPropertyMap) {
 24  65 String lvInvocationString = (String) pvPropertyMap.get(InvocationStrategy.CLASS_NAME);
 25  65 String lvClassName = Converter.getClassWithoutPackage(lvInvocationString, false);
 26    // if namespace exist, than overwrite class name
 27  65 String lvConstNameSpace = (String) pvPropertyMap.get(InvocationStrategy.CONST_NAMESPACE);
 28  1 if (lvConstNameSpace != null) { lvClassName = lvConstNameSpace; }
 29   
 30  65 String lvNameSpace = (String) pvPropertyMap.get(InvocationStrategy.URL);
 31   
 32  65 return lvNameSpace + "/" + lvClassName;
 33    }
 34   
 35    }