source: trunk/www/views/rawbioassays/index.jsp @ 3524

Last change on this file since 3524 was 3524, checked in by Nicklas Nordborg, 16 years ago

References #583: Send message at job completion only if user has selected it

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 21.1 KB
Line 
1<%-- $Id: index.jsp 3524 2007-06-20 13:01:51Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) Authors contributing to this file.
4
5  This file is part of BASE - BioArray Software Environment.
6  Available at http://base.thep.lu.se/
7
8  BASE is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License
10  as published by the Free Software Foundation; either version 2
11  of the License, or (at your option) any later version.
12
13  BASE is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  GNU General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place - Suite 330,
21  Boston, MA  02111-1307, USA.
22  ------------------------------------------------------------------
23
24  @author Nicklas
25  @version 2.0
26--%>
27<%@ page session="false"
28  import="net.sf.basedb.core.Application"
29  import="net.sf.basedb.core.SessionControl"
30  import="net.sf.basedb.core.DbControl"
31  import="net.sf.basedb.core.Item"
32  import="net.sf.basedb.core.Include"
33  import="net.sf.basedb.core.RawBioAssay"
34  import="net.sf.basedb.core.Affymetrix"
35  import="net.sf.basedb.core.Scan"
36  import="net.sf.basedb.core.Protocol"
37  import="net.sf.basedb.core.Software"
38  import="net.sf.basedb.core.ArrayDesign"
39  import="net.sf.basedb.core.File"
40  import="net.sf.basedb.core.FileType"
41  import="net.sf.basedb.core.RawDataType"
42  import="net.sf.basedb.core.RawDataTypes"
43  import="net.sf.basedb.core.User"
44  import="net.sf.basedb.core.Path"
45  import="net.sf.basedb.core.ItemQuery"
46  import="net.sf.basedb.core.ItemResultIterator"
47  import="net.sf.basedb.core.Permission"
48  import="net.sf.basedb.core.ItemContext"
49  import="net.sf.basedb.core.MultiPermissions"
50  import="net.sf.basedb.core.PermissionDeniedException"
51  import="net.sf.basedb.core.ItemAlreadyExistsException"
52  import="net.sf.basedb.core.PluginDefinition"
53  import="net.sf.basedb.core.Job"
54  import="net.sf.basedb.core.ProgressReporter"
55  import="net.sf.basedb.core.IntegerParameterType"
56  import="net.sf.basedb.core.FloatParameterType"
57  import="net.sf.basedb.core.StringParameterType"
58  import="net.sf.basedb.core.FileParameterType"
59  import="net.sf.basedb.core.ItemParameterType"
60  import="net.sf.basedb.core.BooleanParameterType"
61  import="net.sf.basedb.util.RemovableUtil"
62  import="net.sf.basedb.util.ShareableUtil"
63  import="net.sf.basedb.util.OwnableUtil"
64  import="net.sf.basedb.clients.web.Base"
65  import="net.sf.basedb.clients.web.WebException"
66  import="net.sf.basedb.util.Values"
67  import="net.sf.basedb.clients.web.util.HTML"
68  import="java.util.Enumeration"
69  import="java.util.Set"
70  import="java.util.HashSet"
71  import="java.util.List"
72  import="java.util.ArrayList"
73  import="java.util.Arrays"
74  import="java.util.Collections"
75%>
76<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
77<%!
78  private static final ItemContext defaultContext = Base.createDefaultContext("name", "name,rawDataType,spots,description");
79  private static final Item itemType = Item.RAWBIOASSAY;
80 
81  private static class UpdateArrayDesign
82    implements Runnable
83  {
84    private final int jobId;
85    private final int rawBioAssayId;
86    private final int arrayDesignId;
87    private final SessionControl sc;
88   
89    private UpdateArrayDesign(Job job, RawBioAssay rba, ArrayDesign design)
90    {
91      this.jobId = job.getId();
92      this.rawBioAssayId = rba.getId();
93      this.arrayDesignId = design.getId();
94      this.sc = job.getSessionControl();
95    }
96   
97    public void run()
98    {
99      DbControl dc = sc.newDbControl();
100      try
101      {
102        Job j = Job.getById(dc, jobId);
103        j.start("Initialising...", Application.getHostName());
104        ProgressReporter progress = j.getProgressReporter(null);
105        dc.commit();
106        dc = sc.newDbControl();
107        RawBioAssay rba = RawBioAssay.getById(dc, rawBioAssayId);
108        ArrayDesign design = ArrayDesign.getById(dc, arrayDesignId);
109        try
110        {
111          rba.updateArrayDesign(design, progress);
112          progress.display(99, "Committing changes to database...");
113          dc.commit();
114          dc = sc.newDbControl();
115          j = Job.getById(dc, jobId);
116          j.doneOk("Array design updated successfully");
117          j.setRemoved(true);
118          dc.commit();
119        }
120        catch (Throwable t)
121        {
122          dc = sc.newDbControl();
123          j = Job.getById(dc, jobId);
124          j.doneError(t.getMessage(), Arrays.asList(t));
125          j.setRemoved(true);
126          dc.commit();
127        }
128      }
129      finally
130      {
131        if (dc != null) dc.close();
132      }
133    }
134  }
135%>
136<%
137final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
138final String ID = sc.getId();
139final String cmd = request.getParameter("cmd");
140final String root = request.getContextPath()+"/";
141final String mode = request.getParameter("mode");
142final String callback = request.getParameter("callback");
143final String itemId = request.getParameter("item_id");
144final String listPage = "list_rawbioassays.jsp?ID="+ID
145  +(mode == null ? "" : "&mode="+mode)
146  +(callback == null ? "" : "&callback="+callback)
147  +(itemId == null ? "" : "&item_id="+itemId);
148final String viewPage = "view_rawbioassay.jsp?ID="+ID;
149final String editPage = "edit_rawbioassay.jsp?ID="+ID;
150
151String forward = null;
152String redirect = null;
153String message = null;
154DbControl dc = null;
155
156try
157{
158  if (cmd == null || "List".equals(cmd))
159  {
160    // Display the list page without updatinging the current context
161    Base.getAndSetCurrentContext(sc, itemType, null, defaultContext, true);
162    redirect = listPage;
163  }
164  else if ("UpdateContext".equals(cmd))
165  {
166    // Display the list page after updating the current context from the request parameters
167    Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
168    redirect = listPage;
169  }
170  else if ("LoadContext".equals(cmd))
171  {
172    // Display the list page after loading a saved context
173    int contextId = Values.getInt(request.getParameter("context"));
174    Base.loadContext(sc, contextId, defaultContext);
175    redirect = listPage;
176  }
177
178  else if ("ViewItem".equals(cmd))
179  {
180    // Display the view page for a single item
181    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
182    forward = viewPage;
183  }
184  else if ("EditItem".equals(cmd))
185  {
186    // Display the edit page for a single item (should be opened in a popup)
187    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
188    redirect = editPage;
189  }
190  else if ("EditSpotImages".equals(cmd))
191  {
192    // Display the spot images edit page for a single item (should be opened in a popup)
193    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
194    redirect = "edit_spotimages.jsp?ID="+ID;
195  }
196  else if ("NewItem".equals(cmd))
197  {
198    // Display the edit page for a new item (should be opened in a popup)
199    if (!sc.hasPermission(Permission.CREATE, itemType))
200    {
201      throw new PermissionDeniedException(Permission.CREATE, itemType.toString());
202    }
203    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
204    cc.setId(0);
205    forward = editPage;
206  }
207  else if ("UpdateItem".equals(cmd))
208  {
209    // Update the properties on an item (will close the popup)
210    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
211    final int maxRecent = Base.getMaxRecent(sc);
212    dc = sc.newDbControl();
213    RawBioAssay rba = (RawBioAssay)cc.getObject("item");
214    RawDataType rdt = RawDataTypes.getRawDataType(Values.getStringOrNull(request.getParameter("rawdatatype")));
215    if (rdt != null) cc.setRecent("RawDataType", rdt.getId(), maxRecent);
216
217    if (rba == null)
218    {
219      rba = RawBioAssay.getNew(dc, rdt);
220      message = "Raw bioassay created";
221      dc.saveItem(rba);
222    }
223    else
224    {
225      if (rdt != null) rba.setRawDataType(rdt);
226      dc.reattachItem(rba);
227      message = "Raw bioassay updated";
228    }
229    rba.setName(Values.getStringOrNull(request.getParameter("name")));
230    rba.setDescription(Values.getStringOrNull(request.getParameter("description")));
231    int protocolId = Values.getInt(request.getParameter("protocol_id"), -1);
232    if (protocolId >= 0)  // < 0 = denied or unchanged
233    {
234      Protocol pt = protocolId == 0 ? null : Protocol.getById(dc, protocolId);
235      rba.setProtocol(pt);
236      if (pt != null) cc.setRecent(pt, maxRecent);
237    }
238    int softwareId = Values.getInt(request.getParameter("software_id"), -1);
239    if (softwareId >= 0) // < 0 = denied or unchanged
240    {
241      Software sw = softwareId == 0 ? null : Software.getById(dc, softwareId);
242      rba.setSoftware(sw);
243      if (sw != null) cc.setRecent(sw, maxRecent);
244    }
245    int scanId = Values.getInt(request.getParameter("scan_id"), -1);
246    if (scanId >= 0) // < 0 = denied or unchanged
247    {
248      Scan scan = scanId == 0 ? null : Scan.getById(dc, scanId);
249      rba.setScan(scan);
250      if (scan != null) cc.setRecent(scan, maxRecent);
251    }
252    Job job = null;
253    ArrayDesign ad = null;
254    int arrayDesignId = Values.getInt(request.getParameter("arraydesign_id"), -1);
255    if (arrayDesignId >= 0) // < 0 = denied or unchanged
256    {
257      ad = arrayDesignId == 0 ? null : ArrayDesign.getById(dc, arrayDesignId);
258      if (rba.getSpots() > 0)
259      {
260        if (rba.getRawDataType().isStoredInDb() && ad != null && ad.hasFeatures())
261        {
262          // Create job and assign it to another thread
263          job = Job.getNew(dc, null, null);
264          job.setName("Validating array design on " + rba.getName());
265          job.setPrepared(Application.getHostName());
266          job.setSendMessage(Values.getBoolean(sc.getUserClientSetting("plugins.sendmessage"), false));
267          dc.saveItem(job);
268        }
269        else
270        {
271          rba.updateArrayDesign(ad, null);
272        }
273      }
274      else
275      {
276        rba.setArrayDesign(ad);
277      }
278      if (ad != null) cc.setRecent(ad, maxRecent);
279    }
280    rdt = rba.getRawDataType();
281    if (rdt.isAffymetrix())
282    {
283      int celFileId = Values.getInt(request.getParameter("celfile_id"), -1);
284      if (celFileId >= 0) // < 0 = denied or unchanged
285      {
286        File celFile = celFileId == 0 ? null : File.getById(dc, celFileId);
287        Affymetrix.setCelFile(rba, celFile);
288      }
289    }
290
291    // Annotations tab
292    Base.updateAnnotations(dc, rba, rba, request);
293    dc.commit();
294    cc.removeObject("item");
295    if (job != null) 
296    {
297      redirect = "../jobs/index.jsp?ID="+ID+"&cmd=ViewItem&item_id="+job.getId();
298      Thread updateThread = new Thread(new UpdateArrayDesign(job, rba, ad));
299      updateThread.setPriority(Thread.currentThread().getPriority() - 1);
300      updateThread.start();
301    }
302  }
303  else if ("DeleteItem".equals(cmd))
304  {
305    // Delete a single item and then return to the view page
306    dc = sc.newDbControl();
307    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
308    RemovableUtil.setRemoved(dc, itemType, Collections.singleton(cc.getId()), true);
309    dc.commit();
310    redirect = viewPage;
311  }
312  else if ("DeleteItems".equals(cmd))
313  {
314    // Delete all selected items on the list page
315    dc = sc.newDbControl();
316    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
317    int numTotal = cc.getSelected().size();
318    int numRemoved = RemovableUtil.setRemoved(dc, itemType, cc.getSelected(), true);
319    dc.commit();
320    if (numTotal != numRemoved)
321    {
322      message = (numRemoved == 0 ? "No" : "Only "+numRemoved+" of "+numTotal) + " items could be deleted, because you have no DELETE permission";
323    }
324    redirect = listPage+(message != null ? "&popmessage="+HTML.urlEncode(message) : "");
325  }
326  else if ("RestoreItem".equals(cmd))
327  {
328    // Restore a single item and then return to the view page
329    dc = sc.newDbControl();
330    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
331    RemovableUtil.setRemoved(dc, itemType, Collections.singleton(cc.getId()), false);
332    dc.commit();
333    redirect = viewPage;
334  }
335  else if ("RestoreItems".equals(cmd))
336  {
337    // Restore all selected items on the list page
338    dc = sc.newDbControl();
339    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
340    int numTotal = cc.getSelected().size();
341    int numRemoved = RemovableUtil.setRemoved(dc, itemType, cc.getSelected(), false);
342    dc.commit();
343    if (numTotal != numRemoved)
344    {
345      message = (numRemoved == 0 ? "No" : "Only "+numRemoved+" of "+numTotal) + " items could be restored, because you have no WRITE permission";
346    }
347    redirect = listPage+(message != null ? "&popmessage="+HTML.urlEncode(message) : "");
348  }
349  else if ("ShareItem".equals(cmd))
350  {
351    // Display a popup window for sharing a single item
352    dc = sc.newDbControl();
353    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
354    MultiPermissions permissions = ShareableUtil.getMultiPermissions(dc, itemType, Collections.singleton(cc.getId()));
355    dc.close();
356    cc.setObject("MultiPermissions", permissions);
357    redirect = "../../common/share/share.jsp?ID="+ID+"&item_type="+itemType.name();
358  }
359  else if ("ShareItems".equals(cmd))
360  {
361    // Display a popup window for sharing all selected items on the list page
362    dc = sc.newDbControl();
363    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
364    MultiPermissions permissions = ShareableUtil.getMultiPermissions(dc, itemType, cc.getSelected());
365    dc.close();
366    cc.setObject("MultiPermissions", permissions);
367    redirect = "../../common/share/share.jsp?ID="+ID+"&item_type="+itemType.name();
368  }
369  else if ("TakeOwnershipOfItem".equals(cmd))
370  {
371    // Take ownership a single item and then return to the view page
372    dc = sc.newDbControl();
373    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
374    OwnableUtil.setOwner(dc, itemType, Collections.singleton(cc.getId()), null);
375    dc.commit();
376    redirect = viewPage;
377  }
378  else if ("TakeOwnershipOfItems".equals(cmd))
379  {
380    // Take ownership all selected items on the list page
381    dc = sc.newDbControl();
382    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
383    int numTotal = cc.getSelected().size();
384    int numOwned = OwnableUtil.setOwner(dc, itemType, cc.getSelected(), null);
385    dc.commit();
386    if (numTotal != numOwned)
387    {
388      message = (numOwned == 0 ? "No" : "Only "+numOwned+" of "+numTotal) + " items could be taken, because you have no SET_OWNER permission";
389    }
390    redirect = listPage+(message != null ? "&popmessage="+HTML.urlEncode(message) : "");
391  }
392  else if ("ExportItems".equals(cmd))
393  {
394    // Run an export plugin in a list context
395    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
396    final ItemQuery<RawBioAssay> query = RawBioAssay.getQuery();
397    cc.configureQuery(query, true);
398    cc.setQuery(query);
399    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Export+raw+bioassays";
400  }
401  else if ("ExportItem".equals(cmd))
402  {
403    // Run an export plugin in single-item context
404    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
405    redirect = "../../common/export/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&title=Export+raw+bioassay";
406  }
407  else if ("ImportItems".equals(cmd))
408  {
409    // Run an import plugin in a list context
410    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
411    final ItemQuery<RawBioAssay> query = RawBioAssay.getQuery();
412    cc.configureQuery(query, true);
413    cc.setQuery(query);
414    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&title=Import+raw+bioassays";
415  }
416  else if ("ImportItem".equals(cmd))
417  {
418    // Run an import plugin in single-item context
419    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
420    // Set file type filter
421    ItemContext fileContext = sc.getCurrentContext(Item.FILE);
422    fileContext.setPropertyFilter(FileType.getPropertyFilter(FileType.RAW_DATA));
423    redirect = "../../common/import/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&title=Import+raw+bioassay";
424  }
425  else if ("RunListPlugin".equals(cmd))
426  {
427    // Run another plugin in a list context
428    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
429    final ItemQuery<RawBioAssay> query = RawBioAssay.getQuery();
430    cc.configureQuery(query, true);
431    cc.setQuery(query);
432    redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=LIST&main_type=OTHER&title=Run+plugin";
433  }
434  else if ("RunPlugin".equals(cmd))
435  {
436    // Run another plugin in single-item context
437    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
438    redirect = "../../common/plugin/index.jsp?ID="+ID+"&cmd=SelectPlugin&item_type="+itemType.name()+"&context_type=ITEM&main_type=OTHER&title=Run+plugin";
439  }
440  else if ("CreateSpotImages".equals(cmd))
441  {
442    dc = sc.newDbControl();
443    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext);
444    RawBioAssay rba = RawBioAssay.getById(dc, cc.getId());
445   
446    int redFileId = Values.getInt(request.getParameter("redfile_id"));
447    File red = redFileId == 0 ? null : File.getById(dc, redFileId);
448    int greenFileId = Values.getInt(request.getParameter("greenfile_id"));
449    File green = greenFileId == 0 ? null : File.getById(dc, greenFileId);
450    int blueFileId = Values.getInt(request.getParameter("bluefile_id"));
451    File blue = blueFileId == 0 ? null : File.getById(dc, blueFileId);
452
453    String path = Values.getStringOrNull(request.getParameter("path"));
454    if (path.startsWith("~/"))
455    {
456      User user = User.getById(dc, sc.getLoggedInUserId());
457      path = "~"+user.getLogin()+path.substring(1);
458    }
459    Path p = new Path(path, Path.Type.FILE);
460    File saveAs = File.getByPath(dc, p, true);
461    if (saveAs.isInDatabase() && !Values.getBoolean(request.getParameter("overwrite")))
462    {
463      throw new ItemAlreadyExistsException("File[path="+path+"]");
464    }
465   
466    IntegerParameterType integerParameter = new IntegerParameterType();
467    FloatParameterType floatParameter = new FloatParameterType();
468    FileParameterType fileParameter = new FileParameterType();
469    ItemParameterType<RawBioAssay> itemParameter = new ItemParameterType(RawBioAssay.class, null);
470    StringParameterType stringParameter = new StringParameterType();
471    BooleanParameterType booleanParameter = new BooleanParameterType();
472   
473    PluginDefinition plugin = PluginDefinition.getByClassName(dc, "net.sf.basedb.plugins.SpotImageCreator");
474    Job job = Job.getNew(dc, plugin, null);
475    job.setName("Create spot images for raw bioassay: " + rba.getName());
476    job.setParameterValue("rawBioAssay", "Raw bioassay", 
477      "The raw bioassay to create spot images for", itemParameter, rba);
478    job.setParameterValue("xScale", "X scale factor", 
479      "The raw data X value will be divided by this value to get the pixel coordinate", 
480      integerParameter, Values.getInt(request.getParameter("x_scale")));
481    job.setParameterValue("yScale", "Y scale factor", 
482      "The raw data Y value will be divided by this value to get the pixel coordinate", 
483      integerParameter, Values.getInt(request.getParameter("y_scale")));
484    job.setParameterValue("xOffset", "X offset value",
485      "The offset is subtracted from the raw data X value",
486      integerParameter, Values.getInt(request.getParameter("x_offset")));
487    job.setParameterValue("yOffset", "Y offset value",
488      "The offset is subtracted from the raw data Y value",
489      integerParameter, Values.getInt(request.getParameter("y_offset")));
490    job.setParameterValue("spotsize", "Spot size", "The size of each spot in pixels",
491      integerParameter, Values.getInt(request.getParameter("spotsize")));
492    job.setParameterValue("gamma", "Gamma", "Gamma correction for display",
493      floatParameter, Values.getFloat(request.getParameter("gamma")));
494    job.setParameterValue("quality", "Quality", 
495      "The quality is a number between 0.0 and 1.0, with 1.0 indicating highest quality.", 
496      floatParameter, Values.getFloat(request.getParameter("quality")));
497    job.setParameterValue("redFile", "Red image", 
498      "The file containing the image to use for the red part", fileParameter, red);
499    job.setParameterValue("greenFile", "Green image", 
500      "The file containing the image to use for the green part", fileParameter, green);
501    job.setParameterValue("blueFile", "Blue image",
502      "The file containing the image to use for the red part", fileParameter, blue);
503    job.setParameterValue("path", "Save as", 
504      "The file name where the spot images should be saved", stringParameter, path);
505    job.setParameterValue("overwrite", "Overwrite", 
506      "If an existing file should be overwritten or not", booleanParameter, Values.getBoolean(request.getParameter("overwrite")));
507   
508    dc.saveItem(job);
509    dc.commit();
510
511    redirect = "../jobs/index.jsp?ID="+ID+"&cmd=ViewItem&item_id="+job.getId();
512  }
513  else
514  {
515    throw new WebException("popup", "Invalid command", "The command {1} is not recognised as a valid command.", cmd);
516  }
517
518
519  /*
520  else if ("ImportRawData".equals(cmd))
521  {
522    RawBioAssay rba = (RawBioAssay)sc.getSessionSetting(itemType.name()+".item");
523    ItemContext context = sc.getCurrentContext(itemType);
524    context.setId(rba.getId());
525    redirect = "../../common/import/configure.jsp?ID="+ID+"&item_type="+itemType.name()+"&context_type=ITEM&title=Import+raw+data+for+"+HTML.urlEncode(rba.getName());
526
527  }
528  */
529}
530finally
531{
532  if (dc != null) dc.close();
533}
534
535if (forward != null)
536{
537  pageContext.forward(forward);
538}
539else if (redirect != null)
540{
541  response.sendRedirect(redirect);
542}
543else if (message == null)
544{
545  response.sendRedirect(root + "common/close_popup.jsp?refresh_opener=1&wait=0");
546}
547else
548{
549  response.sendRedirect(root + "common/close_popup.jsp?refresh_opener=1&message="+HTML.urlEncode(message));
550}
551%>
552
Note: See TracBrowser for help on using the repository browser.