Move Category into data.msa package from ws.server to get it into min jabaws package.
[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          * Number of seconds since the last test. Returns 0 if the service was not\r
49          * tested or tested less then a one second ago.\r
50          * \r
51          * @param service\r
52          * @return when last time tested\r
53          */\r
54         int getLastTested(Services service);\r
55         /**\r
56          * The date and time the service has been verified to work last time\r
57          * \r
58          * @param service\r
59          * @return the Date and time on which the service was last tested\r
60          */\r
61         Date getLastTestedOn(Services service);\r
62         /**\r
63          * Test all JABAWS services on the server\r
64          * \r
65          * @return the test log\r
66          */\r
67         String testAllServices();\r
68         /**\r
69          * Test a particular service\r
70          * \r
71          * @param service\r
72          * @return the testing log\r
73          */\r
74         String testService(Services service);\r
75         /**\r
76          * Check whether a particular web service is working on this server\r
77          * \r
78          * @param service\r
79          * @return true if the service was functioning in time of last testing.\r
80          */\r
81         boolean isOperating(Services service);\r
82 \r
83         /**\r
84          * Gives the description of the service.\r
85          * \r
86          * @param service\r
87          * @return String, plain text or html formatted piece, but NOT a full html\r
88          *         document\r
89          */\r
90         String getServiceDescription(Services service);\r
91 \r
92         /**\r
93          * Gets the list of services per category. ServiceClassifier has the method\r
94          * that returns Map<Category, Set<Services>>\r
95          * \r
96          * @return ServiceClassifier the object to represent relation between\r
97          *         Services and Categories\r
98          */\r
99         Set<Category> getServiceCategories();\r
100 \r
101 }\r