Clover Coverage Report - ARESTC 0.1.1-SNAPSHOT
Coverage timestamp: Sat Jul 24 2010 18:26:04 CEST
0   167   0   -
0   33   -   0
0     -  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  RESTService       Line # 38 0 - 0 0 - -1.0
 
No Tests
 
1    /*
2    *
3    * (C)opyright 2010, Nikolaos Georgosopoulos
4    *
5    * This file is part of ARESTC.
6   
7    ARESTC is free software: you can redistribute it and/or modify
8    it under the terms of the Lesser General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11   
12    ARESTC is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15    GNU General Public License for more details.
16   
17    You should have received a copy of the Lesser General Public License
18    along with ARESTC. If not, see <http://www.gnu.org/licenses/>.
19   
20    */
21    package net.sf.arestc.configuration.services;
22   
23    import java.net.URL;
24    import java.util.Iterator;
25    import java.util.Map;
26    import java.util.Map.Entry;
27   
28    import net.sf.arestc.configuration.HTTPMethods;
29   
30    import org.apache.commons.configuration.ConfigurationException;
31    import org.apache.commons.httpclient.UsernamePasswordCredentials;
32   
33    /**
34    * The Interface RESTService.
35    *
36    * @author georgosn
37    */
 
38    public interface RESTService {
39   
40    /**
41    * Adds the parameter.
42    *
43    * @param key
44    * the key
45    * @param value
46    * the value
47    * @return the object
48    */
49    Object addParameter(final String key, final Object value);
50   
51    UsernamePasswordCredentials getAdminCredentials();
52   
53    /**
54    * Gets the authenticating user.
55    *
56    * @return the authenticating user
57    */
58    String getAuthenticatingUser();
59   
60    Iterator<Entry<String, Object>> getBobyParameters();
61   
62    String getContentType();
63   
64    /**
65    * Gets the context path.
66    *
67    * @return the context path
68    */
69    String getContextPath();
70   
71    /**
72    * Gets the method.
73    *
74    * @return the method
75    */
76    HTTPMethods getMethod();
77   
78    /**
79    * Gets the name.
80    *
81    * @return the name
82    */
83    String getName();
84   
85    /**
86    * Gets the parameters.
87    *
88    * @return the parameters
89    */
90    Map<String, Object> getParameters();
91   
92    Iterator<Map.Entry<String, Object>> getQueryParameters();
93   
94    ReturnedTypes getReturnedType();
95   
96    /**
97    * Gets the service url.
98    *
99    * @param params
100    * the params
101    * @return the service url
102    */
103    URL getServiceURL(Map<String, Object> params) throws ConfigurationException;
104   
105    Iterator<Map.Entry<String, Object>> getURLParameters();
106   
107    /**
108    * Checks if is authentication required.
109    *
110    * @return true, if is authentication required
111    */
112    boolean isAuthenticationRequired();
113   
114    void setAdminCredentials(final UsernamePasswordCredentials adminCredentials);
115   
116    /**
117    * Sets the authenticating user.
118    *
119    * @param authenticatingUser
120    * the new authenticating user
121    */
122    void setAuthenticatingUser(String authenticatingUser);
123   
124    /**
125    * Sets the authentication required.
126    *
127    * @param authenticationRequired
128    * the new authentication required
129    */
130    void setAuthenticationRequired(final boolean authenticationRequired);
131   
132    void setContentType(String contentType);
133   
134    /**
135    * Sets the context path.
136    *
137    * @param contextPath
138    * the new context path
139    */
140    void setContextPath(final String contextPath);
141   
142    /**
143    * Sets the method.
144    *
145    * @param method
146    * the new method
147    */
148    void setMethod(final HTTPMethods method);
149   
150    /**
151    * Sets the name.
152    *
153    * @param name
154    * the new name
155    */
156    void setName(final String name);
157   
158    /**
159    * Sets the parameters.
160    *
161    * @param parameters
162    * the parameters
163    */
164    void setParameters(final Map<String, Object> parameters);
165   
166    void setReturnedType(ReturnedTypes type);
167    }