Add "safe type casting" warnings
[jabaws.git] / webservices / compbio / data / msa / RegistryWS.java
1 /* Copyright (c) 2011 Peter Troshin\r
2  *  \r
3  *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0     \r
4  * \r
5  *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
6  *  Apache License version 2 as published by the Apache Software Foundation\r
7  * \r
8  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
9  *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
10  *  License for more details.\r
11  * \r
12  *  A copy of the license is in apache_license.txt. It is also available here:\r
13  * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
14  * \r
15  * Any republication or derived work distributed in source code form\r
16  * must include this copyright and license notice.\r
17  */\r
18 package compbio.data.msa;\r
19 \r
20 import java.util.Date;\r
21 import java.util.Set;\r
22 \r
23 import javax.jws.WebService;\r
24 \r
25 import compbio.ws.client.Services;\r
26 \r
27 /**\r
28  * JABAWS services registry\r
29  * \r
30  * @author pvtroshin\r
31  * @version 1.0 June 2011\r
32  */\r
33 @WebService(targetNamespace = JABAService.V2_SERVICE_NAMESPACE)\r
34 public interface RegistryWS extends JABAService {\r
35 \r
36         /**\r
37          * List of services that are functioning on the server. This function\r
38          * returns the results of testing performed some time ago by\r
39          * {@link #testAllServices} or {@link #testService(Services)} methods. The\r
40          * time of last check can be obtained from\r
41          * {@link #getLastTestedOn(Services)} method\r
42          * \r
43          * @return the Set of Services which are functioning on the server\r
44          * @see #testAllServices()\r
45          */\r
46         Set<Services> getSupportedServices();\r
47         /**\r
48          * List of services that are functioning on the server. This function\r
49          * returns the results of testing performed some time ago by\r
50          * {@link #testAllServices} or {@link #testService(Services)} methods. The\r
51          * time of last check can be obtained from\r
52          * {@link #getLastTestedOn(Services)} method\r
53          * \r
54          * @return the Set of Services which are functioning on the server\r
55          * @see #testAllServices()\r
56          */\r
57         Set<Services> getNonoperatedServices(); /**\r
58          * Number of seconds since the last test. Returns 0 if the service was not\r
59          * tested or tested less then a one second ago.\r
60          * \r
61          * @param service\r
62          * @return when last time tested\r
63          */\r
64         int getLastTested(Services service);\r
65         /**\r
66          * The date and time the service has been verified to work last time\r
67          * \r
68          * @param service\r
69          * @return the Date and time on which the service was last tested\r
70          */\r
71         Date getLastTestedOn(Services service);\r
72         /**\r
73          * Test all JABAWS services on the server\r
74          * \r
75          * @return the test log\r
76          */\r
77         String testAllServices();\r
78         /**\r
79          * Test a particular service\r
80          * \r
81          * @param service\r
82          * @return the testing log\r
83          */\r
84         String testService(Services service);\r
85         /**\r
86          * Check whether a particular web service is working on this server\r
87          * \r
88          * @param service\r
89          * @return true if the service was functioning in time of last testing.\r
90          */\r
91         boolean isOperating(Services service);\r
92 \r
93         /**\r
94          * Gives the description of the service.\r
95          * \r
96          * @param service\r
97          * @return String, plain text or html formatted piece, but NOT a full html\r
98          *         document\r
99          */\r
100         String getServiceDescription(Services service);\r
101 \r
102         /**\r
103          * Gets the list of services per category. ServiceClassifier has the method\r
104          * that returns Map<Category, Set<Services>>\r
105          * \r
106          * @return ServiceClassifier the object to represent relation between\r
107          *         Services and Categories\r
108          */\r
109         Set<Category> getServiceCategories();\r
110 \r
111 }\r