Add an implementation for Services.getServiceInfo method and categorization for services.
[jabaws.git] / webservices / compbio / data / msa / RegistryWS.java
index 3dd89b5..71a2519 100644 (file)
@@ -1,3 +1,20 @@
+/* Copyright (c) 2011 Peter Troshin\r
+ *  \r
+ *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0     \r
+ * \r
+ *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
+ *  Apache License version 2 as published by the Apache Software Foundation\r
+ * \r
+ *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
+ *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
+ *  License for more details.\r
+ * \r
+ *  A copy of the license is in apache_license.txt. It is also available here:\r
+ * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
+ * \r
+ * Any republication or derived work distributed in source code form\r
+ * must include this copyright and license notice.\r
+ */\r
 package compbio.data.msa;\r
 \r
 import java.util.Date;\r
@@ -6,13 +23,80 @@ import java.util.Set;
 import javax.jws.WebService;\r
 \r
 import compbio.ws.client.Services;\r
+import compbio.ws.server.Category;\r
 \r
-@WebService(targetNamespace = "http://msa.data.compbio/01/12/2010/")\r
+/**\r
+ * JABAWS services registry\r
+ * \r
+ * @author pvtroshin\r
+ * @version 1.0 June 2011\r
+ */\r
+@WebService(targetNamespace = JABAService.V2_SERVICE_NAMESPACE)\r
 public interface RegistryWS extends JABAService {\r
+\r
+       /**\r
+        * List of services that are functioning on the server. This function\r
+        * returns the results of testing performed some time ago by\r
+        * {@link #testAllServices} or {@link #testService(Services)} methods. The\r
+        * time of last check can be obtained from\r
+        * {@link #getLastTestedOn(Services)} method\r
+        * \r
+        * @return the Set of Services which are functioning on the server\r
+        * @see #testAllServices()\r
+        */\r
        Set<Services> getSupportedServices();\r
+       /**\r
+        * Number of seconds since the last test. Returns 0 if the service was not\r
+        * tested or tested less then a one second ago.\r
+        * \r
+        * @param service\r
+        * @return when last time tested\r
+        */\r
+       int getLastTested(Services service);\r
+       /**\r
+        * The date and time the service has been verified to work last time\r
+        * \r
+        * @param service\r
+        * @return the Date and time on which the service was last tested\r
+        */\r
        Date getLastTestedOn(Services service);\r
+       /**\r
+        * Test all JABAWS services on the server\r
+        * \r
+        * @return the test log\r
+        */\r
        String testAllServices();\r
+       /**\r
+        * Test a particular service\r
+        * \r
+        * @param service\r
+        * @return the testing log\r
+        */\r
        String testService(Services service);\r
+       /**\r
+        * Check whether a particular web service is working on this server\r
+        * \r
+        * @param service\r
+        * @return true if the service was functioning in time of last testing.\r
+        */\r
        boolean isOperating(Services service);\r
 \r
+       /**\r
+        * Gives the description of the service.\r
+        * \r
+        * @param service\r
+        * @return String, plain text or html formatted piece, but NOT a full html\r
+        *         document\r
+        */\r
+       String getServiceDescription(Services service);\r
+\r
+       /**\r
+        * Gets the list of services per category. ServiceClassifier has the method\r
+        * that returns Map<Category, Set<Services>>\r
+        * \r
+        * @return ServiceClassifier the object to represent relation between\r
+        *         Services and Categories\r
+        */\r
+       Set<Category> getServiceCategories();\r
+\r
 }\r