Commit 9e1512c1 authored by Robert Butora's avatar Robert Butora
Browse files

mcutout: makes listname const-string

parent f7c1538d
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -24,12 +24,14 @@ public class UWSMCutout extends UWSServlet {
   protected static final Subsurvey[] subsurveys = Subsurvey.loadSubsurveys(
   protected static final Subsurvey[] subsurveys = Subsurvey.loadSubsurveys(
         settings.fitsPaths.surveysMetadataAbsPathname());
         settings.fitsPaths.surveysMetadataAbsPathname());


	final String MCUTOUT_LIST_NAME = "uws"; // FIXME listname to Settings ?

   /* REQUIRED
   /* REQUIRED
    * Initialize your UWS. At least, you should create one jobs list. */
    * Initialize your UWS. At least, you should create one jobs list. */
   @Override
   @Override
   public void initUWS() throws UWSException
   public void initUWS() throws UWSException
   {
   {
      addJobList(new JobList("uws"));
      addJobList(new JobList(MCUTOUT_LIST_NAME));
      UWSMCutoutUserIdentifier uwsUserIdentifier = new UWSMCutoutUserIdentifier();
      UWSMCutoutUserIdentifier uwsUserIdentifier = new UWSMCutoutUserIdentifier();
      setUserIdentifier(uwsUserIdentifier);
      setUserIdentifier(uwsUserIdentifier);
   }
   }
@@ -42,7 +44,7 @@ public class UWSMCutout extends UWSServlet {
    */
    */
   @Override
   @Override
   public JobThread createJobThread(UWSJob job) throws UWSException{
   public JobThread createJobThread(UWSJob job) throws UWSException{
      if (job.getJobList().getName().equals("uws")) // FIXME listanme to Config-file ?
      if (job.getJobList().getName().equals(MCUTOUT_LIST_NAME))
         return new UWSMCutoutWork(job);
         return new UWSMCutoutWork(job);
      else
      else
         throw new UWSException("Impossible to create a job inside the jobs list \"" + job.getJobList().getName() + "\" !");
         throw new UWSException("Impossible to create a job inside the jobs list \"" + job.getJobList().getName() + "\" !");