Clover coverage report - Code Coverage for tapestry release 4.0-beta-2
Coverage timestamp: Sat Jul 9 2005 22:02:17 EDT
file stats: LOC: 88   Methods: 0
NCLOC: 10   Classes: 1
30 day Evaluation License registered to hlship@comcast.net Your 30 day evaluation period has expired. Please visit http://www.cenqua.com to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
ServiceEncoding.java - - - -
coverage
 1    // Copyright 2004, 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.engine;
 16   
 17    /**
 18    * Contains the information needed to encode a request for a service; the servlet path plus and
 19    * query parameters. The service encoding is passed to each
 20    * {@link org.apache.tapestry.engine.ServiceEncoder} , which is allowed to modify the encoding
 21    * (typically, by changing the servlet path and settting query parameters to null). From this
 22    * modified encoding, an {@link org.apache.tapestry.engine.ILink}can be constructed.
 23    * <p>
 24    * Additionally, when a request is dispatched by Tapestry, an SRE is also created and passed to each
 25    * {@link org.apache.tapestry.engine.ServiceEncoder}&nbsp;for decoding. Here, the query parameters
 26    * that may have been nulled out by the encoding are restored.
 27    *
 28    * @author Howard M. Lewis Ship
 29    * @since 4.0
 30    * @see org.apache.tapestry.services.ServiceConstants
 31    */
 32    public interface ServiceEncoding
 33    {
 34   
 35    /**
 36    * Returns the value for the named parameter. If multiple values are stored for the query
 37    * parameter, only the first is returned.
 38    *
 39    * @parameter name the name of the query parameter to access
 40    * @return the value, or null if no such query parameter exists
 41    */
 42   
 43    public String getParameterValue(String name);
 44   
 45    /**
 46    * Returns the value for the named parameter.
 47    *
 48    * @parameter name the name of the query parameter to access
 49    * @return the values, or null if no such query parameter exists
 50    */
 51    public String[] getParameterValues(String name);
 52   
 53    /**
 54    * Updates the servlet path for the encoding.
 55    */
 56   
 57    public void setServletPath(String servletPath);
 58   
 59    /**
 60    * Sets the value for the named query parameter to the provided string.
 61    *
 62    * @param name
 63    * the name of the parameter to set.
 64    * @param value
 65    * the new value, which may be null.
 66    */
 67    public void setParameterValue(String name, String value);
 68   
 69    /**
 70    * Sets the values for a named query parameter.
 71    */
 72   
 73    public void setParameterValues(String name, String[] values);
 74   
 75    /**
 76    * Returns the servlet path for the request.
 77    */
 78   
 79    public String getServletPath();
 80   
 81    /**
 82    * Returns an array of parameter names. The names are returned in alphabetically sorted order.
 83    * This list includes all parameter names, even those for which the stored value is null.
 84    */
 85   
 86    public String[] getParameterNames();
 87   
 88    }