Changeset 4720


Ignore:
Timestamp:
Jan 8, 2009, 11:01:27 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

Merged patch release 2.9.2 to the trunk.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/credits.txt

    r4711 r4720  
    2626USA.
    2727
    28 The current BASE team is (at BASE 2.9.1 release)
     28The current BASE team is (at BASE 2.9.2 release)
    2929
    3030Jari Häkkinen
  • trunk/src/core/net/sf/basedb/core/Directory.java

    r4585 r4720  
    9898    d.setParent(parent);
    9999    d.setAutoCompress(parent.getAutoCompress());
    100     if (parent.getAutoShare())
     100    if (parent.getAutoShare() && parent.isShared())
    101101    {
    102102      ShareableUtil.copyPermissions(dc, parent, d);
  • trunk/src/core/net/sf/basedb/core/File.java

    r4520 r4720  
    9999    file.setName("New file");
    100100    file.uploadCompressed = directory.getAutoCompress();
    101     if (directory.getAutoShare())
     101    if (directory.getAutoShare() && directory.isShared())
    102102    {
    103103      ShareableUtil.copyPermissions(dc, directory, file);
  • trunk/src/core/net/sf/basedb/core/ShareableUtil.java

    r4517 r4720  
    172172  {
    173173    SessionControl sc = dc.getSessionControl();
     174   
     175    BasicItem fromItem = (BasicItem)from;
     176    if (fromItem.isDetached()) dc.reattachItem(fromItem);
     177   
    174178    ItemKey itemKey = from.getItemKey();
    175179    ProjectKey projectKey = from.getProjectKey();
  • trunk/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java

    r4631 r4720  
    19541954      else if (f.isDirectory())
    19551955      {
    1956         Directory newDirectory = d.newSubDirectory();
     1956        Directory newDirectory = Directory.getNew(dc, d);
    19571957        newDirectory.setName(f.getName());
    19581958        dc.saveItem(newDirectory);
  • trunk/src/test/Base1TestPlugin.java

    r4631 r4720  
    2020  along with BASE. If not, see <http://www.gnu.org/licenses/>.
    2121*/
     22import java.io.File;
    2223import java.io.IOException;
    2324import java.io.InputStream;
     
    4849    boolean offsetPositions = false;
    4950    boolean reporterList = false;
     51    boolean createSubdir = false;
    5052    int numSpotSections = 0;
    5153    while (ffp.hasMoreSections())
     
    6062        offsetPositions = Values.getBoolean(ffp.getHeader("offsetPositions"));
    6163        reporterList = Values.getBoolean(ffp.getHeader("reporterList"));
     64        createSubdir = Values.getBoolean(ffp.getHeader("createSubdir"));
    6265        //System.out.println("merge: " + mergeAssays + "; offset: " + offsetPositions);
     66        //System.out.println("createSubdir: " + createSubdir);
    6367      }
    6468      else if ("assays".equals(section.name()) && !reporterList)
     
    135139          System.out.println();
    136140        }
    137       }
    138      
     141      }
    139142    }
    140    
     143    if (createSubdir)
     144    {
     145      File tmpDir = new File(System.getProperty("java.io.tmpdir"));
     146      File subdir = new File(tmpDir, "subdir");
     147      //System.out.println("Creating subdir: " + subdir + "(" + subdir.getAbsolutePath() + ")");
     148      subdir.mkdirs();
     149      File subFile = new File(subdir, "file.txt");
     150      //System.out.println("Creating file: " + subFile + "(" + subFile.getAbsolutePath() + ")");
     151      subFile.createNewFile();
     152    }
    141153  }
    142154 
  • trunk/src/test/TestBase1PluginExecuter.java

    r4605 r4720  
    110110    ok &= TestJob.test_execute(jobId2);
    111111
    112     // Merge assays
     112    // Merge assays +  create subdir
    113113    int jobId3 = test_create_job(pluginConfigurationId2, experimentId, rootBioAssaySetId, directoryId,
    114         new Parameter("mergeAssays", "1"));
     114        new Parameter("mergeAssays", "1"), new Parameter("createSubdir", "1"));
    115115    ok &= TestJob.test_execute(jobId3);
    116116
  • trunk/src/test/data/test.base1plugin.base

    r4266 r4720  
    23233 e offsetPositions Offset positions  30  0 0\tNo\t1\tYes 0
    24244 e reporterList  Create reporter list  30  0 0\tNo\t1\tYes 0
     255 e createSubdir  Create sub-directory  30  0 0\tNo\t1\tYes 0
  • trunk/src/test/testbase1plugin.sh

    r4232 r4720  
    11#!/bin/bash -
     2tmpdir="`pwd`"
    23progdir="`dirname \"$0\"`"
    34cd $progdir
    4 
    55. ./set_classpath.sh
    66
    7 java -Xmx512M -Xms128M -ea -server -cp $CP Base1TestPlugin
     7java -Xmx512M -Xms128M -ea -server -Djava.io.tmpdir=$tmpdir -cp $CP Base1TestPlugin
Note: See TracChangeset for help on using the changeset viewer.