JWS-47 override custom/preset analize methods so the input can be validated appropria...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 2 Aug 2012 11:53:01 +0000 (12:53 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 2 Aug 2012 13:55:00 +0000 (14:55 +0100)
webservices/compbio/ws/server/AAConWS.java

index 7f8b2de..8dce707 100644 (file)
@@ -33,7 +33,10 @@ import compbio.engine.client.ConfiguredExecutable;
 import compbio.metadata.ChunkHolder;\r
 import compbio.metadata.JobSubmissionException;\r
 import compbio.metadata.LimitExceededException;\r
+import compbio.metadata.Option;\r
+import compbio.metadata.Preset;\r
 import compbio.metadata.UnsupportedRuntimeException;\r
+import compbio.metadata.WrongParameterException;\r
 import compbio.runner.conservation.AACon;\r
 \r
 @WebService(endpointInterface = "compbio.data.msa.SequenceAnnotation", targetNamespace = JABAService.V2_SERVICE_NAMESPACE, serviceName = "AAConWS")\r
@@ -70,6 +73,24 @@ public class AAConWS extends SequenceAnnotationService<AACon>
        }\r
 \r
        @Override\r
+       public String customAnalize(List<FastaSequence> sequences,\r
+                       List<Option<AACon>> options) throws UnsupportedRuntimeException,\r
+                       LimitExceededException, JobSubmissionException,\r
+                       WrongParameterException {\r
+               WSUtil.validateAAConInput(sequences);\r
+               return super.customAnalize(sequences, options);\r
+       }\r
+\r
+       @Override\r
+       public String presetAnalize(List<FastaSequence> sequences,\r
+                       Preset<AACon> preset) throws UnsupportedRuntimeException,\r
+                       LimitExceededException, JobSubmissionException,\r
+                       WrongParameterException {\r
+               WSUtil.validateAAConInput(sequences);\r
+               return super.presetAnalize(sequences, preset);\r
+       }\r
+\r
+       @Override\r
        public ChunkHolder pullExecStatistics(String jobId, long position) {\r
                WSUtil.validateJobId(jobId);\r
                String file = Configurator.getWorkDirectory(jobId) + File.separator\r