X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fparams%2FParamDatastoreI.java;h=8d28ee56f63edf80066b56a2ab0552900b34a893;hb=768a4920722ec46f7c16e35780391e39a76d02ff;hp=217de900f5498f2d13ea1cbbdada480ad6b0a6f8;hpb=85037c7f026acf289a22eaf0bd0d368351b5905e;p=jalview.git diff --git a/src/jalview/ws/params/ParamDatastoreI.java b/src/jalview/ws/params/ParamDatastoreI.java index 217de90..8d28ee5 100644 --- a/src/jalview/ws/params/ParamDatastoreI.java +++ b/src/jalview/ws/params/ParamDatastoreI.java @@ -1,9 +1,29 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.ws.params; import java.io.IOException; import java.util.List; -public interface ParamDatastoreI +public interface ParamDatastoreI { public List getPresets(); @@ -17,19 +37,56 @@ public interface ParamDatastoreI public void deletePreset(String name); /** - * writes or overwrites the record for a modifiable WsParamSetI entry in the datastore. + * writes or overwrites the record for a modifiable WsParamSetI entry with a + * given name in the datastore. + * * @param presetName * @param text * @param jobParams - * may throw an illegal argument RunTimeException if the presetName overwrites an existing, unmodifiable preset. + * may throw an illegal argument RunTimeException if the presetName + * overwrites an existing, unmodifiable preset. */ public void storePreset(String presetName, String text, List jobParams); - public boolean readParamSet(WsParamSetI wsp, java.io.Reader reader) + /** + * update an existing instance with a new name, descriptive text and + * parameters. + * + * @param oldName + * @param presetName + * @param text + * @param jobParams + */ + public void updatePreset(String oldName, String presetName, String text, + List jobParams); + + /** + * factory method - builds a service specific parameter object using the given + * data + * + * @param name + * @param description + * @param applicable + * URLs + * @param parameterfile + * Service specific jalview parameter file (as returned from new + * method) + * @return null or valid WsParamSetI object for this service. + */ + + public WsParamSetI parseServiceParameterFile(String name, + String description, String[] serviceURL, String parameters) throws IOException; - public boolean writeParamSet(WsParamSetI wsp, java.io.Writer writer) + /** + * create the service specific parameter file for this pset object. + * + * @param pset + * @return string representation of the parameters specified by this set. + * @throws IOException + */ + public String generateServiceParameterFile(WsParamSetI pset) throws IOException; }