Change the way to deal with Limits to simplify wrapper writing and enable couping...
[jabaws.git] / webservices / compbio / ws / server / GlobPlotWS.java
index cf266b0..a77dfa2 100644 (file)
@@ -47,6 +47,9 @@ public class GlobPlotWS implements SequenceAnnotation<GlobPlot> {
        private static final PresetManager<GlobPlot> globPlotPresets = Util\r
                        .getPresets(GlobPlot.class);\r
 \r
+       private static final LimitsManager<GlobPlot> limitMan = compbio.runner.Util\r
+                       .getLimits(new GlobPlot().getType());\r
+\r
        ConfiguredExecutable<GlobPlot> init(List<FastaSequence> sequences)\r
                        throws JobSubmissionException {\r
                GlobPlot globPlot = new GlobPlot();\r
@@ -68,12 +71,12 @@ public class GlobPlotWS implements SequenceAnnotation<GlobPlot> {
 \r
        @Override\r
        public Limit<GlobPlot> getLimit(String presetName) {\r
-               return new GlobPlot().getLimit(presetName);\r
+               return limitMan.getLimitByName(presetName);\r
        }\r
 \r
        @Override\r
        public LimitsManager<GlobPlot> getLimits() {\r
-               return new GlobPlot().getLimits();\r
+               return limitMan;\r
        }\r
 \r
        @Override\r