Changeset 7637


Ignore:
Timestamp:
Mar 11, 2019, 11:41:39 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2136: Remove support for spot images

Removed the SpotImageCreator plug-in. The update scripts sets the the corresponding database entry to disabled and deprecated. The schema version need to be increcmented, but this will come later since there are more changes related to this.

Location:
trunk/src
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Update.java

    r7615 r7637  
    423423    </td>
    424424  </tr>
    425 
     425  <tr>
     426    <td>146</td>
     427    <td>
     428      Removed support for spot images:
     429      <ul>
     430      <li>SpotImageCreator plug-in was removed. The entry in the database is marked as disabled.
     431      </ul>
     432     
     433    </td>
     434  </tr>
    426435  </table>
    427436
     
    695704      }
    696705     
     706      if (schemaVersion < 146)
     707      {
     708        if (progress != null) progress.display((int)(progress_current), "--Updating schema version: " + schemaVersion + " -> 146...");
     709        schemaVersion = updateToSchemaVersion146(session, schemaVersion);
     710        progress_current += progress_step;
     711      }
     712   
    697713      sc.logout();
    698714      if (progress != null) progress.display(100, "Database updated successfully.");
     
    21722188 
    21732189  /**
     2190   
     2191    @return The new schema version (=146)
     2192  */
     2193  private static int updateToSchemaVersion146(org.hibernate.Session session, int currentSchemaVersion)
     2194    throws BaseException
     2195  {
     2196    final int schemaVersion = 146;
     2197    org.hibernate.Transaction tx = null;
     2198   
     2199    try
     2200    {
     2201      tx = HibernateUtil.newTransaction(session);
     2202
     2203      org.hibernate.query.Query<?> query = HibernateUtil.createQuery(session,
     2204        "UPDATE PluginDefinitionData " +
     2205        "SET disabled = true, name = CONCAT(name, ' (deprecated)') " +
     2206        "WHERE className='net.sf.basedb.plugins.SpotImageCreator'");
     2207      query.executeUpdate();
     2208     
     2209      // Update the schema version number
     2210//      setSchemaVersionInTransaction(session, schemaVersion);
     2211 
     2212      // Commit the changes
     2213      HibernateUtil.commit(tx);
     2214      log.info("updateToSchemaVersion146: OK");
     2215    }
     2216    catch (RuntimeException ex)
     2217    {
     2218      if (tx != null) HibernateUtil.rollback(tx);
     2219      log.error("updateToSchemaVersion146: FAILED", ex);
     2220      throw ex;
     2221    }
     2222    return schemaVersion;
     2223   
     2224  }
     2225
     2226 
     2227  /**
    21742228    Vefify and update the remaining quantity of all biomaterials.
    21752229    @return The number of biomaterial fixed
  • trunk/src/plugins/core/core-plugins.xml

    r7098 r7637  
    299299  </plugin-definition>
    300300
    301   <plugin-definition id="SpotImageCreator">
    302     <about>
    303       <name>Spot images creator</name>
    304       <description>
    305         Converts a full-size scanned image into smaller preview jpg images for each individual spot.
    306       </description>
    307     </about>
    308     <plugin-class>net.sf.basedb.plugins.SpotImageCreator</plugin-class>
    309     <settings>
    310       <property name="everyone-use">1</property>
    311     </settings>
    312   </plugin-definition>
    313 
    314301  <plugin-definition id="ZipFileUnpacker">
    315302    <about>
Note: See TracChangeset for help on using the changeset viewer.