Changeset 7786


Ignore:
Timestamp:
Mar 2, 2020, 9:10:33 AM (21 months ago)
Author:
Nicklas Nordborg
Message:

Merged patch release 3.15.3 to the trunk.

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/list/ListColumnAction.java

    r6875 r7786  
    2222package net.sf.basedb.clients.web.extensions.list;
    2323
    24 import net.sf.basedb.clients.web.extensions.UnsafeScriptable;
    2524import net.sf.basedb.core.DbControl;
    2625import net.sf.basedb.core.Type;
     
    4241  @base.modified $Date$
    4342*/
    44 @UnsafeScriptable
    4543public interface ListColumnAction<I, V>
    4644  extends Action
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/menu/MenuItemAction.java

    r6652 r7786  
    2222package net.sf.basedb.clients.web.extensions.menu;
    2323
    24 import net.sf.basedb.clients.web.extensions.UnsafeScriptable;
    2524import net.sf.basedb.util.extensions.Action;
    2625
     
    4544  @base.modified $Date$
    4645*/
    47 @UnsafeScriptable
    4846public interface MenuItemAction
    4947  extends Action
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/section/SectionAction.java

    r6407 r7786  
    2222package net.sf.basedb.clients.web.extensions.section;
    2323
    24 import net.sf.basedb.clients.web.extensions.UnsafeScriptable;
    2524import net.sf.basedb.util.extensions.Action;
    2625
     
    3231  @base.modified $Date$
    3332*/
    34 @UnsafeScriptable
    3533public interface SectionAction
    3634  extends Action
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/tabcontrol/TabAction.java

    r6653 r7786  
    2222package net.sf.basedb.clients.web.extensions.tabcontrol;
    2323
    24 import net.sf.basedb.clients.web.extensions.UnsafeScriptable;
    2524import net.sf.basedb.core.Help;
    2625import net.sf.basedb.util.extensions.Action;
     
    3332  @base.modified $Date$
    3433*/
    35 @UnsafeScriptable
    3634public interface TabAction
    3735  extends Action
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ButtonAction.java

    r6654 r7786  
    2222package net.sf.basedb.clients.web.extensions.toolbar;
    2323
    24 import net.sf.basedb.clients.web.extensions.UnsafeScriptable;
    2524import net.sf.basedb.util.extensions.Action;
    2625
     
    3231  @base.modified $Date:2008-03-20 12:15:25 +0100 (Thu, 20 Mar 2008) $
    3332 */
    34 @UnsafeScriptable
    3533public interface ButtonAction
    3634  extends Action
  • trunk/src/core/net/sf/basedb/core/ParameterType.java

    r6987 r7786  
    326326  public boolean isEnumeration()
    327327  {
    328     return (enumeration != null && enumeration.size() > 0) || (items != null && items.size() > 0);
     328    return (enumeration != null) || (items != null);
    329329  }
    330330   
  • trunk/src/core/net/sf/basedb/util/timer/ThreadTimerTask.java

    r6684 r7786  
    4343{
    4444
     45  private static final org.slf4j.Logger log =
     46    org.slf4j.LoggerFactory.getLogger(ThreadTimerTask.class);
     47
    4548  private final TimerTask task;
    4649  private final boolean allowMultiple;
     
    6972  public final synchronized void run()
    7073  {
    71     Thread t = null;
    72     if (allowMultiple)
     74    try
    7375    {
    74       // We just create another thread
    75       t = new Thread(task);
    76     }
    77     else if (!isExecuting)
    78     {
    79       // Create a new thread that also manages the isExecuting flag
    80       isExecuting = true;
    81       t = new Thread(
    82         new Runnable()
    83         {
    84           @Override
    85           public void run()
     76      Thread t = null;
     77      if (allowMultiple)
     78      {
     79        // We just create another thread
     80        t = new Thread(task);
     81      }
     82      else if (!isExecuting)
     83      {
     84        // Create a new thread that also manages the isExecuting flag
     85        isExecuting = true;
     86        t = new Thread(
     87          new Runnable()
    8688          {
    87             try
     89            @Override
     90            public void run()
    8891            {
    89               task.run();
    90             }
    91             finally
    92             {
    93               isExecuting = false;
     92              try
     93              {
     94                task.run();
     95              }
     96              finally
     97              {
     98                isExecuting = false;
     99              }
    94100            }
    95101          }
    96         }
    97       );
     102        );
     103      }
     104      else
     105      {
     106        // Do not allow multiple thread to execute the task
     107      }
     108      // Start the thread
     109      if (t != null) t.start();
    98110    }
    99     else
     111    catch (Throwable t)
    100112    {
    101       // Do not allow multiple thread to execute the task
     113      log.error("Failed to start task: " + task, t);
    102114    }
    103     // Start the thread
    104     if (t != null) t.start();
    105115  }
    106116  @Override
  • trunk/www/common/plugin/configure.jsp

    r7679 r7786  
    8080<%!
    8181List<?> getParameterValues(PluginParameter<?> pp, DbControl dc, javax.servlet.http.HttpServletRequest request,
    82   PluginConfigurationRequest pcRequest, ItemContext currentContext)
     82  PluginConfigurationRequest pcRequest, ItemContext currentContext, Job job)
    8383{
    8484  ParameterType<?> pType = pp.getParameterType();
     
    106106    Object charset = currentContext.getObject("last-file-charset");
    107107    if (charset != null) values = Collections.singletonList(charset);
     108  }
     109 
     110  // Special handling for "dryRun" parameter which is typically not stored as a job proerty
     111  if ((values == null || values.size() == 0) && Parameters.DRY_RUN_PARAMETER.equals(pp.getName()))
     112  {
     113    if (job != null && job.isDryRun())
     114    {
     115      values = Collections.singletonList(true);
     116    }
    108117  }
    109118 
     
    272281        json.put("enumeration", pType.isEnumeration() ? 1 : 0);
    273282        json.put("multiplicity", pType.getMultiplicity());
    274         List<?> values = getParameterValues(pp, dc, request, pcRequest, currentContext);
     283        List<?> values = getParameterValues(pp, dc, request, pcRequest, currentContext, job);
    275284        json.put("values", convertToJson(values, dc, pType, dateFormatter, dateTimeFormatter));
    276285      }
  • trunk/www/my_base/messages/index.jsp

    r7604 r7786  
    6060<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
    6161<%!
    62   private static final ItemContext defaultContext = Base.createDefaultContext("timeSent", "all");
     62  private static final ItemContext defaultContext = Base.createDefaultContext("timeSent", "name,from,timeSent,read,description");
    6363  private static final Item itemType = Item.MESSAGE;
    6464%>
  • trunk/www/my_base/messages/list_messages.jsp

    r7604 r7786  
    168168        exportable="true"
    169169        formatter="<%=dateTimeFormatter%>"
     170      />
     171      <tbl:columndef
     172        id="read"
     173        property="read"
     174        datatype="boolean"
     175        title="Has been read"
     176        sortable="true"
     177        filterable="true"
     178        exportable="true"
    170179      />
    171180      <tbl:columndef
     
    391400                <tbl:cell column="from"><%=HTML.encodeTags(item.getFrom())%></tbl:cell>
    392401                <tbl:cell column="timeSent" value="<%=item.getTimeSent()%>" />
     402                <tbl:cell column="read" value="<%=item.isRead()%>" />
    393403                <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
    394404                <tbl:cell column="job"><base:propertyvalue item="<%=item%>" property="job" enableEditLink="<%=editLink%>" enablePropertyLink="<%=mode.hasPropertyLink()%>"/></tbl:cell>
  • trunk/www/views/derivedbioassays/view_bioassay.jsp

    r7604 r7786  
    713713                <tbl:row>
    714714                  <tbl:cell column="name"><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell>
    715                   <tbl:cell column="platform"><base:propertyvalue item="<%=item%>" property="platform" /></tbl:cell>
     715                  <tbl:cell column="platform">
     716                    <base:propertyvalue item="<%=item%>" property="platform" /> /
     717                    <%=item.getRawDataType().toString() %>
     718                  </tbl:cell>
    716719                  <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
    717720                </tbl:row>
Note: See TracChangeset for help on using the changeset viewer.