Clover coverage report -
Coverage timestamp: Sat Jul 7 2007 16:41:13 CEST
file stats: LOC: 86   Methods: 7
NCLOC: 30   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
WebServicePort.java - 0% 0% 0%
coverage
 1    /**
 2    * JTRunner is free software; you can redistribute it and/or modify it under the
 3    * terms of the GNU General Public License as published by the Free Software
 4    * Foundation; either version 2, or (at your option) any later version.
 5    */
 6   
 7    package jtr.config.ws;
 8   
 9    import java.io.Serializable;
 10    import java.util.Collection;
 11    import java.util.HashMap;
 12   
 13    /**
 14    * This class represents a <code>port</code> elements that can be found
 15    * in a <code>jtr.xml</code> configuration file.<br>
 16    * Semantically its content can be assimilated to the one represented by
 17    * a WSDL port element.
 18    *
 19    * @author Francesco Russo (frusso@dev.java.net)
 20    * @version 4.0
 21    * @since 3.0
 22    */
 23    public class WebServicePort implements Serializable {
 24    /**
 25    * Default constructor.
 26    */
 27  0 public WebServicePort() {
 28  0 operations = new HashMap<String,WebServiceOperation>();
 29    }
 30   
 31    /**
 32    * Get the port name.
 33    * @param name
 34    */
 35  0 public void setName(String name) {
 36  0 this.name = name;
 37    }
 38   
 39    /**
 40    * Set the collection of operations available with the current port.
 41    * @param operations
 42    */
 43  0 public void setOperations(Collection<WebServiceOperation> operations) {
 44  0 for(WebServiceOperation op : operations) {
 45  0 this.addOperation(op);
 46    }
 47    }
 48   
 49    /**
 50    * Get the operation name.
 51    * @return String
 52    */
 53  0 public String getName() {
 54  0 return name;
 55    }
 56   
 57    /**
 58    * Get the collection of available operations.
 59    * @return Collection<WebServiceOperation>
 60    */
 61  0 public Collection<WebServiceOperation> getOperations() {
 62  0 return operations.values();
 63    }
 64   
 65    /**
 66    * Add a single operation to the set of configured ones.
 67    * @param op
 68    */
 69  0 public void addOperation(WebServiceOperation op) {
 70  0 operations.put(op.getName(),op);
 71    }
 72   
 73    /**
 74    * Get the operation named <code>name</code>. If no such operation exists
 75    * <code>null</code> is returned.
 76    * @param name
 77    * @return WebServiceOperation
 78    */
 79  0 public WebServiceOperation getOperation(String name) {
 80  0 return operations.get(name);
 81    }
 82   
 83    private String name;
 84   
 85    private HashMap<String,WebServiceOperation> operations;
 86    }