Changeset 3931


Ignore:
Timestamp:
Nov 7, 2007, 4:38:15 PM (14 years ago)
Author:
Johan Enell
Message:

had some trouble with the default value of the annotation parameter

Location:
branches/2.4-stable/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4-stable/src/core/net/sf/basedb/core/plugin/AbstractPlugin.java

    r3679 r3931  
    121121    <pre class="code">
    122122// <b>In Plugin.invoke() method:</b>
    123 List&gt;PluginParameter&lt;?&gt;&gt; parameters = getParametersForCommand(request.getCommand());
     123List&lt;PluginParameter&lt;?&gt;&gt; parameters = getParametersForCommand(request.getCommand());
    124124List&lt;Throwable&gt; errors =
    125125   validateRequestParameters(parameters, request);
  • branches/2.4-stable/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java

    r3923 r3931  
    6060import net.sf.basedb.core.SpotExtraValueBatcher;
    6161import net.sf.basedb.core.StringParameterType;
     62import net.sf.basedb.core.StringUtil;
    6263import net.sf.basedb.core.Transformation;
    6364import net.sf.basedb.core.Type;
     
    425426          storeValue(job, request, p);
    426427        }
    427         response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
     428        List<Throwable> errors = validateRequestParameters(getJobParameters(), request);
     429        if (errors == null)
     430          response.setDone("Job configuration complete", Job.ExecutionTime.SHORT);
     431        else
     432          response.setError(errors.size() + " invalid parameter(s) were found in the request", errors);
    428433      }
    429434      else
     
    18611866          List<AnnotationType> annotations = getAnnotationTypes();
    18621867          Enumeration<String, String> enums = new Enumeration<String, String>();
     1868         
     1869          System.err.println("###" + defaultValue);
     1870         
    18631871          for (AnnotationType at : annotations)
    18641872          {
    18651873            enums.add(at.getName(), at.getName());
    18661874          }
    1867           StringParameterType t = new StringParameterType(255, defaultValue, true, 1, Values.getInt(options, 30), 1, enums);
     1875          StringParameterType t = new StringParameterType(255, null, false, 1, Values.getInt(options, 30), 1, enums);
    18681876          parameter = new PluginParameter<String>(name, commonName, "", t);
    18691877          break;
     
    18711879        case ENUMERATION:
    18721880        {
    1873           StringParameterType t = new StringParameterType(255, defaultValue, true, 1, Values.getInt(options, 30), 1, enumOptions);
     1881          StringParameterType t = new StringParameterType(255, defaultValue, false, 1, Values.getInt(options, 30), 1, enumOptions);
    18741882          parameter = new PluginParameter<String>(name, commonName, "", t);
    18751883          break;
Note: See TracChangeset for help on using the changeset viewer.