Clover Coverage Report - ARESTC 0.1.7-SNAPSHOT
Coverage timestamp: Fri Aug 27 2010 19:12:04 CEST
0   138   0   -
0   22   -   0
0     -  
1    
 
  RESTService       Line # 37 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.core.services;
22   
23    import java.net.URL;
24    import java.util.Collection;
25    import java.util.EnumMap;
26    import java.util.Map;
27   
28    import org.apache.commons.configuration.ConfigurationException;
29    import org.apache.commons.httpclient.Credentials;
30   
31    // TODO: Auto-generated Javadoc
32    /**
33    * The Interface RESTService.
34    *
35    * @author georgosn
36    */
 
37    public interface RESTService {
38   
39    /**
40    * Adds the parameter.
41    *
42    * @param key
43    * the key
44    * @param value
45    * the value
46    * @return the object
47    */
48    Object addParameter(final String key, final ServiceParameterTypes value);
49   
50    /**
51    * Gets the admin credentials.
52    *
53    * @return the admin credentials
54    */
55    Credentials getAdminCredentials();
56   
57    /**
58    * Gets the authenticating user.
59    *
60    * @return the authenticating user
61    */
62    String getAuthenticatingUser();
63   
64    /**
65    * Gets the content type.
66    *
67    * @return the content type
68    */
69    String getContentType();
70   
71    /**
72    * Gets the context path.
73    *
74    * @return the context path
75    */
76    String getContextPath();
77   
78    /**
79    * Gets the method.
80    *
81    * @return the method
82    */
83    HTTPMethods getMethod();
84   
85    /**
86    * Gets the name.
87    *
88    * @return the name
89    */
90    String getName();
91   
92    /**
93    * Gets the parameters.
94    *
95    * @return the parameters
96    */
97    EnumMap<ServiceParameterTypes, Collection<String>> getParameters();
98   
99    /**
100    * Gets the returned type.
101    *
102    * @return the returned type
103    */
104    ReturnedTypes getReturnedType();
105   
106    /**
107    * Gets the service url.
108    *
109    * @param params
110    * the params
111    * @return the service url
112    * @throws ConfigurationException
113    * the configuration exception
114    */
115    URL getServiceURL(Map<String, Object> params) throws ConfigurationException;
116   
117    /**
118    * Gets the union of parameters.
119    *
120    * @return the union of parameters
121    */
122    Collection<String> getUnionOfParameters();
123   
124    /**
125    * Gets the uRL parameters.
126    *
127    * @return the uRL parameters
128    */
129    Collection<String> getURLParameters();
130   
131    /**
132    * Checks if is authentication required.
133    *
134    * @return true, if is authentication required
135    */
136    boolean isAuthenticationRequired();
137   
138    }