Changeset 7605


Ignore:
Timestamp:
Feb 26, 2019, 11:10:15 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2151: Pre-compile all JSP pages before releases

Getting rid of a lot of unchecked warnings. Most of them are solved by changed the API in several BASE core clases to use implict casting of return types instead of explicit (this moved the 'unchecked' warning to the API method from the caller). Example:

// Before
ItemContext cc = ...
Hardware hardware = (Hardware)cc.getObject("item");

// After
Hardware hardware = cc.getObject("item");

In most cases both the old and new version of the code will work, but if the returned object is using a "type" parameter it will not compile:

// This will not compile!
Set<AnnotatedItem> items = (Set<AnnotatedItem>)cc.getObject("AnnotatedItems");

// But this will!
Set<AnnotatedItem> items = cc.getObject("AnnotatedItems");

Note that existing compiled code will still work, but that some changes may be needed when compiling agains BASE 3.15. The issues should be easy to solve (eg. remove an explict cast).

Extensions that uses JSP files that works in BASE 3.14 may stop working in BASE 3.15 since the compilation of the JSP files happens on the BASE server as they are accessed.

Another issues is that there are still a lot of unchecked warnings related to the JSON library. This build on regular Map and List API:s but has not specified generic type parameters so there is no way to get rid of those warnings without fixing the JSON library source code. The latest released version is from 2012 so it is not likely that this should happen unless we do it ourselves (the warnings are really annoying so maybe we should!).

Location:
trunk
Files:
226 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/ExtensionsControl.java

    r7233 r7605  
    406406    @see Registry#useExtensions(net.sf.basedb.util.extensions.ClientContext, net.sf.basedb.util.extensions.ExtensionsFilter, String...)
    407407  */
    408   public static ExtensionsInvoker<?> useExtensions(JspContext context, String...extensionPoints)
     408  public static <A extends Action> ExtensionsInvoker<A> useExtensions(JspContext context, String...extensionPoints)
    409409  {
    410410    return registry.useExtensions(context, settings, extensionPoints);
    411411  }
    412412 
    413   public static ExtensionsInvoker<?> useExtensions(JspContext context,
     413  public static <A extends Action> ExtensionsInvoker<A> useExtensions(JspContext context,
    414414    ExtensionsFilter filter, String...extensionPoints)
    415415  {
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/list/ListColumnUtil.java

    r7604 r7605  
    102102    @return An invoker instance
    103103  */
    104   @SuppressWarnings("unchecked")
    105104  public static <I> ExtensionsInvoker<ListColumnAction<I, ?>> useExtensions(JspContext jspContext)
    106105  {
     
    131130    }
    132131    ep[index++] = EP_PREFIX + itemType.name().toLowerCase();
    133     return (ExtensionsInvoker<ListColumnAction<I, ?>>)ExtensionsControl.useExtensions(jspContext, ep);
     132    return ExtensionsControl.useExtensions(jspContext, ep);
    134133  }
    135134 
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ToolbarUtil.java

    r7440 r7605  
    141141    @return An invoker instance
    142142  */
    143   @SuppressWarnings("unchecked")
    144143  public static ExtensionsInvoker<ButtonAction> useExtensions(JspContext jspContext)
    145144  {
     
    171170    }
    172171    ep[index++] = EP_PREFIX[type] + itemType.name().toLowerCase();
    173     return (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext, ep);
     172    return ExtensionsControl.useExtensions(jspContext, ep);
    174173  }
    175174 
  • trunk/src/clients/web/net/sf/basedb/clients/web/formatter/FormatterFactory.java

    r6875 r7605  
    239239    @return A formatter or null if no suitable formatter could be found
    240240  */
    241   public static Formatter<?> getTypeFormatter(SessionControl sc, Type type)
    242   {
     241  @SuppressWarnings({ "unchecked", "rawtypes" })
     242  public static <T> Formatter<T> getTypeFormatter(SessionControl sc, Type type)
     243  {
     244    Formatter f = null;
    243245    if (type == Type.FLOAT)
    244246    {
    245       return getNumberFormatter(sc);
     247      f = getNumberFormatter(sc);
    246248    }
    247249    else if (type == Type.DOUBLE)
    248250    {
    249       return getDoubleFormatter(sc);
     251      f = getDoubleFormatter(sc);
    250252    }
    251253    else if (type == Type.STRING || type == Type.TEXT)
    252254    {
    253       return getStringFormatter(sc);
     255      f = getStringFormatter(sc);
    254256    }
    255257    else if (type == Type.INT)
    256258    {
    257       return getIntFormatter(sc);
     259      f = getIntFormatter(sc);
    258260    }
    259261    else if (type == Type.LONG)
    260262    {
    261       return getLongFormatter(sc);
     263      f = getLongFormatter(sc);
    262264    }
    263265    else if (type == Type.DATE)
    264266    {
    265       return getDateFormatter(sc);
     267      f = getDateFormatter(sc);
    266268    }
    267269    else if (type == Type.TIMESTAMP)
    268270    {
    269       return getDateTimeFormatter(sc);
     271      f = getDateTimeFormatter(sc);
    270272    }
    271273    else if (type == Type.BOOLEAN)
    272274    {
    273       return getBooleanFormatter(sc);
    274     }
    275     return null;
     275      f = getBooleanFormatter(sc);
     276    }
     277    return f;
    276278  }
    277279 
     
    288290    @see ExtendedPropertyFormatter
    289291  */
    290   public static Formatter<?> getExtendedPropertyFormatter(SessionControl sc, ExtendedProperty ep)
     292  public static <T> Formatter<T> getExtendedPropertyFormatter(SessionControl sc, ExtendedProperty ep)
    291293  {
    292294    return new ExtendedPropertyFormatter<>(ep, getTypeFormatter(sc, ep.getType()));
     
    333335    @since 2.9
    334336  */
    335   public static Formatter<?> getAnnotationFormatter(SessionControl sc, Annotation a, Unit unit)
    336   {
    337     Formatter<?> f = getTypeFormatter(sc, a.getValueType());
     337  public static <T> Formatter<T> getAnnotationFormatter(SessionControl sc, Annotation a, Unit unit)
     338  {
     339    Formatter<T> f = getTypeFormatter(sc, a.getValueType());
    338340    return a.getUnitFormatter(f, unit);
    339341  }
     
    353355    @since 2.16
    354356  */
    355   @SuppressWarnings("unchecked")
    356   public static Formatter<?> getFormulaFormatter(SessionControl sc, Formula formula)
    357   {
    358     Formatter<?> f = null;
     357  @SuppressWarnings({ "unchecked", "rawtypes" })
     358  public static <T> Formatter<T> getFormulaFormatter(SessionControl sc, Formula formula)
     359  {
     360    Formatter f = null;
    359361    Type valueType = formula.getValueType();
    360362    if (valueType != null)
     
    368370    else
    369371    {
    370       f = new ToStringFormatter<Object>();
     372      f = new ToStringFormatter<T>();
    371373    }
    372374    return f;
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/SimpleExport.java

    r7560 r7605  
    220220  }
    221221 
    222   @Override
    223   @SuppressWarnings({ "unchecked", "rawtypes" })
     222  @SuppressWarnings("rawtypes")
     223  @Override
    224224  protected void performExport(ExportOutputStream out, ProgressReporter progress)
    225225    throws IOException
     
    228228   
    229229    // Input parameters for the export
    230     Item itemType = Item.valueOf((String)job.getValue("itemType"));
    231     String subContext = Values.getString((String)job.getValue("subcontext"), "");
    232     String whichItems = (String)job.getValue(WHICH_ITEMS);
    233     String format = (String)job.getValue(FORMAT);
     230    Item itemType = Item.valueOf(job.getValue("itemType"));
     231    String subContext = Values.getString(job.getValue("subcontext"), "");
     232    String whichItems = job.getValue(WHICH_ITEMS);
     233    String format = job.getValue(FORMAT);
    234234    String collectionSeparator = Values.getStringOrNull((String)job.getValue(COLLECTION_SEPARATOR));
    235235    boolean sameUnits = !Boolean.FALSE.equals(job.getValue(SAME_UNITS));
    236     List<String> columns = (List<String>)job.getValues(WHICH_PROPERTIES);
    237     String columnPrefix = (String)job.getValue(COLUMN_PREFIX);
     236    List<String> columns = job.getValues(WHICH_PROPERTIES);
     237    String columnPrefix = job.getValue(COLUMN_PREFIX);
    238238    ItemContext cc = sc.getCurrentContext(itemType, subContext);
    239239   
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Page.java

    r7409 r7605  
    421421  }
    422422
    423   @SuppressWarnings("unchecked")
    424423  @Override
    425424  public int doStartTag()
     
    433432        skinContext = ExtensionsControl.createContext(sc, pageContext);
    434433        skinContext.setAttribute("page-type", getTypeCode());
    435         ExtensionsInvoker<SkinAction> invoker = (ExtensionsInvoker<SkinAction>)ExtensionsControl.useExtensions(skinContext, "net.sf.basedb.clients.web.global-skin");
     434        ExtensionsInvoker<SkinAction> invoker = ExtensionsControl.useExtensions(skinContext, "net.sf.basedb.clients.web.global-skin");
    436435        ActionIterator<SkinAction> it = invoker.iterate();
    437436        skinActions = new ArrayList<SkinAction>();
  • trunk/src/core/net/sf/basedb/core/BioMaterialEvent.java

    r7308 r7605  
    937937    @return An {@link ItemQuery} object
    938938  */
    939   public ItemQuery<? extends BioMaterial> getSources()
    940   {
    941     ItemQuery<? extends BioMaterial> query = null;
     939  @SuppressWarnings({ "rawtypes", "unchecked" })
     940  public <T extends BioMaterial> ItemQuery<T> getSources()
     941  {
     942    ItemQuery query = null;
    942943    MeasuredBioMaterialData bioMaterialData = getData().getBioMaterial();
    943944    Item parentType = null;
  • trunk/src/core/net/sf/basedb/core/DataFileType.java

    r7381 r7605  
    628628    @since 3.0
    629629  */
    630   @SuppressWarnings("unchecked")
    631630  public boolean hasActiveValidator(DbControl dc)
    632631  {
     
    634633    Registry registry = manager.getRegistry();
    635634    ClientContext context = new ClientContext(dc, this);
    636     ExtensionsInvoker<ValidationAction> invoker =
    637           (ExtensionsInvoker<ValidationAction>)registry.useExtensions(context, manager.getSettings(), "net.sf.basedb.core.filehandler.validator");
     635    ExtensionsInvoker<ValidationAction> invoker = registry.useExtensions(context, manager.getSettings(), "net.sf.basedb.core.filehandler.validator");
    638636    return invoker.getNumExtensions() > 0;
    639637  }
  • trunk/src/core/net/sf/basedb/core/DbControl.java

    r7595 r7605  
    159159    Create a new object.
    160160  */
    161   @SuppressWarnings("unchecked")
    162161  DbControl(SessionControl sc)
    163162    throws BaseException
     
    168167    ExtensionsManager xtManager = Application.getExtensionsManager();
    169168    ClientContext context = new ClientContext(sc);
    170     ExtensionsInvoker<LogManagerFactory> invoker = (ExtensionsInvoker<LogManagerFactory>)xtManager.getRegistry().useExtensions(
     169    ExtensionsInvoker<LogManagerFactory> invoker = xtManager.getRegistry().useExtensions(
    171170      context, xtManager.getSettings(), "net.sf.basedb.core.log-manager");   
    172171    if (invoker.getNumExtensions() > 0)
     
    574573    @throws BaseException If there is another error
    575574  */
    576   @SuppressWarnings("deprecation")
    577575  private void updateDiskUsage(BasicItem item)
    578576    throws QuotaException, BaseException
  • trunk/src/core/net/sf/basedb/core/FileSet.java

    r7381 r7605  
    801801  }
    802802 
    803  
    804   @SuppressWarnings("unchecked")
    805803  private ExtensionsInvoker<ValidationAction> getInvoker(DbControl dc)
    806804  {
     
    811809    Registry registry = xtManager.getRegistry();
    812810    Settings settings = xtManager.getSettings();
    813     ExtensionsInvoker<ValidationAction> invoker =
    814       (ExtensionsInvoker<ValidationAction>)registry.useExtensions(context, settings, "net.sf.basedb.core.filehandler.validator");
     811    ExtensionsInvoker<ValidationAction> invoker = registry.useExtensions(context, settings, "net.sf.basedb.core.filehandler.validator");
    815812    return invoker;
    816813  }
  • trunk/src/core/net/sf/basedb/core/ItemContext.java

    r7558 r7605  
    896896
    897897 
    898   public Object getPropertyObject(String property)
    899   {
    900     Object value = null;
     898  public <T> T getPropertyObject(String property)
     899  {
     900    T value = null;
    901901    PropertyFilter filter = getPropertyFilter(property);
    902902    if (filter != null)
     
    11221122    @return A list with the items
    11231123  */
    1124   public List<? extends BasicItem> getRecent(DbControl dc, Item itemType)
     1124  public <T extends BasicItem> List<T> getRecent(DbControl dc, Item itemType)
    11251125  {
    11261126    return loadRecent(dc, itemType, itemType.name());
     
    11401140    @since 3.0
    11411141  */
    1142   public List<? extends BasicItem> getRecent(DbControl dc, Item itemType, ItemSubtype subtype)
     1142  public <T extends BasicItem> List<T> getRecent(DbControl dc, Item itemType, ItemSubtype subtype)
    11431143  {
    11441144    if (subtype == null)
     
    11651165    @since 2.5
    11661166  */
    1167   public List<? extends BasicItem> getRecent(DbControl dc, Item itemType, String subList)
     1167  public <T extends BasicItem> List<T> getRecent(DbControl dc, Item itemType, String subList)
    11681168  {
    11691169    return loadRecent(dc, itemType, itemType.name() + "." + subList);
    11701170  }
    11711171 
    1172   private List<? extends BasicItem> loadRecent(DbControl dc, Item itemType, String key)
     1172  @SuppressWarnings("unchecked")
     1173  private <T extends BasicItem> List<T> loadRecent(DbControl dc, Item itemType, String key)
    11731174  {
    11741175    List<String> recentIds = getRecent(key);
    1175     List<BasicItem> recent = new ArrayList<BasicItem>(recentIds.size());
     1176    List<T> recent = new ArrayList<>(recentIds.size());
    11761177    for (String id : recentIds)
    11771178    {
    11781179      try
    11791180      {
    1180         recent.add(itemType.getById(dc, Integer.parseInt(id)));
     1181        recent.add((T)itemType.getById(dc, Integer.parseInt(id)));
    11811182      }
    11821183      catch (Throwable t)
     
    13701371    @see #setObject(String, Object)
    13711372  */
    1372   public Object getObject(String name)
    1373   {
    1374     return objects == null ? null : objects.get(name);
     1373  @SuppressWarnings("unchecked")
     1374  public <T> T getObject(String name)
     1375  {
     1376    return objects == null ? null : (T)objects.get(name);
    13751377  }
    13761378 
     
    13821384    @see #getObject(String)
    13831385  */
    1384   public Object setObject(String name, Object value)
     1386  @SuppressWarnings("unchecked")
     1387  public <T> T setObject(String name, Object value)
    13851388  {
    13861389    if (objects == null) objects = new HashMap<String, Object>();
    1387     return objects.put(name, value);
     1390    return (T)objects.put(name, value);
    13881391  }
    13891392 
     
    13931396    @return The old value or null if no old value existed.
    13941397  */
    1395   public Object removeObject(String name)
    1396   {
    1397     return objects == null ? null : objects.remove(name);
     1398  @SuppressWarnings("unchecked")
     1399  public <T> T removeObject(String name)
     1400  {
     1401    return objects == null ? null : (T)objects.remove(name);
    13981402  }
    13991403 
     
    14221426  }
    14231427
    1424   public Query getQuery()
    1425   {
    1426     return query;
     1428  @SuppressWarnings("unchecked")
     1429  public <T extends Query> T getQuery()
     1430  {
     1431    return (T)query;
    14271432  }
    14281433 
  • trunk/src/core/net/sf/basedb/core/Job.java

    r7513 r7605  
    16131613    @throws BaseException If there is another error
    16141614  */
    1615   public Object getParameterValue(String name)
     1615  public <T> T getParameterValue(String name)
    16161616    throws PermissionDeniedException, BaseException
    16171617  {
    1618     List<?> values = getParameterValues(name);
     1618    List<T> values = getParameterValues(name);
    16191619    return values == null || values.size() == 0 ? null : values.get(0);
    16201620  }
     
    16291629    @throws BaseException If there is another error
    16301630  */
    1631   public List<?> getParameterValues(String name)
     1631  @SuppressWarnings("unchecked")
     1632  public <T> List<T> getParameterValues(String name)
    16321633    throws PermissionDeniedException, BaseException
    16331634  {
    16341635    ParameterValueData<?> parameterValue = getData().getParameters().get(name);
    16351636    if (parameterValue == null) return null;
    1636     return Collections.unmodifiableList(Values.getItemValues(getDbControl(), parameterValue.getValues()));
     1637    return Collections.unmodifiableList((List<T>)Values.getItemValues(getDbControl(), parameterValue.getValues()));
    16371638  }
    16381639 
  • trunk/src/core/net/sf/basedb/core/ParameterValuesImpl.java

    r6875 r7605  
    147147  }
    148148 
    149   @Override
    150   public Object getValue(String name)
     149  @SuppressWarnings("unchecked")
     150  @Override
     151  public <T> T getValue(String name)
    151152    throws PermissionDeniedException, BaseException
    152153  {
    153     List<?> values = parameters.get(name);
     154    List<T> values = (List<T>)parameters.get(name);
    154155    if (values != null && values.size() >= 1)
    155156    {
     
    162163  }
    163164   
    164   @Override
    165   public List<?> getValues(String name)
     165  @SuppressWarnings("unchecked")
     166  @Override
     167  public <T> List<T> getValues(String name)
    166168    throws PermissionDeniedException, BaseException
    167169  {
    168     return parameters.get(name);
     170    return (List<T>)parameters.get(name);
    169171  }
    170172 
  • trunk/src/core/net/sf/basedb/core/PhysicalBioAssay.java

    r7381 r7605  
    311311    @since 3.2
    312312  */
    313   @SuppressWarnings("unchecked")
    314313  public Set<Annotatable> getAnnotatableParents(int position, Collection<Extract> extracts)
    315314    throws BaseException
     
    322321    BioMaterialEventData eventData = event.getData();
    323322   
    324     ItemQuery<Extract> query = (ItemQuery<Extract>)event.getSources();
     323    ItemQuery<Extract> query = event.getSources();
    325324    query.include(Include.ALL);
    326325    if (position > 0)
     
    450449    @return An {@link ItemQuery} object
    451450  */
    452   @SuppressWarnings("unchecked")
    453451  public ItemQuery<Extract> getExtracts(int position)
    454452  {
    455     ItemQuery<Extract> query = (ItemQuery<Extract>)getCreationEvent().getSources();
     453    ItemQuery<Extract> query = getCreationEvent().getSources();
    456454    if (position > 0)
    457455    {
  • trunk/src/core/net/sf/basedb/core/PluginRequest.java

    r7360 r7605  
    346346    }
    347347   
    348     @Override
    349     public Object getParameterValue(String name)
    350     {
    351       Object value = null;
    352       List<?> values = requestParameters.get(name);
     348    @SuppressWarnings("unchecked")
     349    @Override
     350    public <T> T getParameterValue(String name)
     351    {
     352      T value = null;
     353      List<T> values = (List<T>)requestParameters.get(name);
    353354      if (values != null && values.size() != 0)
    354355      {
     
    358359    }
    359360 
    360     @Override
    361     public List<?> getParameterValues(String name)
    362     {
    363       return requestParameters.get(name);
     361    @SuppressWarnings("unchecked")
     362    @Override
     363    public <T> List<T> getParameterValues(String name)
     364    {
     365      return (List<T>)requestParameters.get(name);
    364366    }
    365367   
  • trunk/src/core/net/sf/basedb/core/Project.java

    r7381 r7605  
    850850    @since 3.0
    851851  */
    852   public List<? extends BasicItem> findDefaultItems(DbControl dc, Item itemType, boolean strict)
     852  @SuppressWarnings("unchecked")
     853  public <T extends BasicItem> List<T> findDefaultItems(DbControl dc, Item itemType, boolean strict)
    853854  {
    854855    if (itemType == null) throw new InvalidUseOfNullException("itemType");
    855856    List<BasicData> defaultData = findAllDefaultData(itemType, null, strict);
    856     List<BasicItem> defaultItems = new ArrayList<BasicItem>(defaultData.size());
     857    List<T> defaultItems = new ArrayList<>(defaultData.size());
    857858    for (BasicData data : defaultData)
    858859    {
    859       defaultItems.add(dc.getItem(BasicItem.class, data));
     860      defaultItems.add((T)dc.getItem(BasicItem.class, data));
    860861    }
    861862    return defaultItems;
     
    875876    @since 3.0
    876877  */
    877   public List<? extends BasicItem> findDefaultItems(DbControl dc, ItemSubtype subtype, boolean strict)
     878  @SuppressWarnings("unchecked")
     879  public <T extends BasicItem> List<T> findDefaultItems(DbControl dc, ItemSubtype subtype, boolean strict)
    878880  {
    879881    if (subtype == null) throw new InvalidUseOfNullException("subtype");
    880882    List<BasicData> defaultData = findAllDefaultData(subtype.getMainItemType(), subtype.getData(), strict);
    881     List<BasicItem> defaultItems = new ArrayList<BasicItem>(defaultData.size());
     883    List<T> defaultItems = new ArrayList<T>(defaultData.size());
    882884    for (BasicData data : defaultData)
    883885    {
    884       defaultItems.add(dc.getItem(BasicItem.class, data));
     886      defaultItems.add((T)dc.getItem(BasicItem.class, data));
    885887    }
    886888    return defaultItems;
     
    903905    @since 3.0
    904906  */
    905   public List<? extends BasicItem> findDefaultItemsOfRelatedSubtype(DbControl dc, ItemSubtype subtype, Item relatedType)
     907  public <T extends BasicItem> List<T> findDefaultItemsOfRelatedSubtype(DbControl dc, ItemSubtype subtype, Item relatedType)
    906908  {
    907909    ItemSubtype related = subtype == null ? null : subtype.getRelatedSubtype(relatedType);
     
    936938    @since 3.0
    937939  */
    938   public List<BasicItem> getDefaultItems(DbControl dc, Item itemType)
     940  @SuppressWarnings("unchecked")
     941  public <T extends BasicItem> List<T> getDefaultItems(DbControl dc, Item itemType)
    939942  {
    940943    ItemParameterValueData defaultItems = getData().getDefaultItems();
    941944    if (defaultItems == null) return Collections.emptyList();
    942945   
    943     List<BasicItem> items = new ArrayList<BasicItem>();
     946    List<T> items = new ArrayList<>();
    944947    Iterator<BasicData> it = defaultItems.getValues().iterator();
    945948    Class<?> dataClass = itemType == null ? null : itemType.getDataClass();
     
    951954        try
    952955        {
    953           items.add(dc.getItem(BasicItem.class, data));
     956          items.add((T)dc.getItem(BasicItem.class, data));
    954957        }
    955958        catch (PermissionDeniedException ex)
  • trunk/src/core/net/sf/basedb/core/PropertyFilter.java

    r7558 r7605  
    332332    @throws InvalidDataException If the string value can't be parsed
    333333  */
    334   public Object getValueAsObject()
     334  public <T> T getValueAsObject()
    335335  {
    336336    return getValueAsObject(value, unit, false);
     
    361361  }
    362362 
    363   private Object getValueAsObject(String value, Unit unit, boolean asDouble)
     363  @SuppressWarnings("unchecked")
     364  private <T> T getValueAsObject(String value, Unit unit, boolean asDouble)
    364365  {
    365366    Object oValue = null;
     
    388389      oValue = valueType.parseString(value);
    389390    }
    390     return oValue;
     391    return (T)oValue;
    391392  }
    392393
  • trunk/src/core/net/sf/basedb/core/SessionControl.java

    r7551 r7605  
    698698    Verify the user with external authentication.
    699699  */
    700   @SuppressWarnings("unchecked")
    701700  private AuthenticatedUser verifyUserExternal(org.hibernate.Session session, LoginRequest loginRequest, List<AuthenticationManager> authManagers)
    702701  {
     
    705704    ExtensionsManager xtManager = Application.getExtensionsManager();
    706705    Registry registry = xtManager.getRegistry();
    707     ExtensionsInvoker<AuthenticationManager> invoker = (ExtensionsInvoker<AuthenticationManager>)registry.useExtensions(context, xtManager.getSettings(), "net.sf.basedb.core.authentication-manager");
     706    ExtensionsInvoker<AuthenticationManager> invoker = registry.useExtensions(context, xtManager.getSettings(), "net.sf.basedb.core.authentication-manager");
    708707   
    709708    AuthenticatedUser authUser = null;
     
    24132412      no setting is found
    24142413  */
    2415   public Object getSessionSetting(String name)
    2416   {
    2417     return loginInfo == null ? null : loginInfo.sessionSettings.get(name);
     2414  @SuppressWarnings("unchecked")
     2415  public <T> T getSessionSetting(String name)
     2416  {
     2417    return loginInfo == null ? null : (T)loginInfo.sessionSettings.get(name);
    24182418  }
    24192419
     
    24262426    @return The old value of the setting, or null if it did not exist
    24272427  */
    2428   public Object setSessionSetting(String name, Object value)
     2428  @SuppressWarnings("unchecked")
     2429  public <T> T setSessionSetting(String name, Object value)
    24292430  {
    24302431    if (loginInfo == null || loginInfo.sessionSettings == null) return null;
    24312432    if (value == null)
    24322433    {
    2433       return loginInfo.sessionSettings.remove(name);
     2434      return (T)loginInfo.sessionSettings.remove(name);
    24342435    }
    24352436    else
    24362437    {
    2437       return loginInfo.sessionSettings.put(name, value);
     2438      return (T)loginInfo.sessionSettings.put(name, value);
    24382439    }
    24392440  }
  • trunk/src/core/net/sf/basedb/core/plugin/AbstractAnalysisPlugin.java

    r6127 r7605  
    451451      @since 2.4
    452452   */
    453   @SuppressWarnings("unchecked")
    454453  protected List<BioAssay> getSourceBioAssays(DbControl dc)
    455454  {
    456     List<BioAssay> bioAssaySubset = (List<BioAssay>)job.getValues(SOURCE_BIOASSAYS);
     455    List<BioAssay> bioAssaySubset = job.getValues(SOURCE_BIOASSAYS);
    457456    if (bioAssaySubset != null)
    458457    {
  • trunk/src/core/net/sf/basedb/core/plugin/NamespaceParameterValuesWrapper.java

    r5319 r7605  
    9696
    9797  @Override
    98   public Object getValue(String name)
     98  public <T> T getValue(String name)
    9999    throws PermissionDeniedException, BaseException
    100100  {
    101     Object value = parent.getValue(namespace + "." + name);
     101    T value = parent.getValue(namespace + "." + name);
    102102    if (value == null) value = parent.getValue(name);
    103103    return value;
     
    105105 
    106106  @Override
    107   public List<?> getValues(String name)
     107  public <T> List<T> getValues(String name)
    108108    throws PermissionDeniedException, BaseException
    109109  {
    110     List<?> values = parent.getValues(namespace + "." + name);
     110    List<T> values = parent.getValues(namespace + "." + name);
    111111    if (values == null) values = parent.getValues(name);
    112112    return values;
  • trunk/src/core/net/sf/basedb/core/plugin/NamespaceRequestWrapper.java

    r7321 r7605  
    8181
    8282  @Override
    83   public Object getParameterValue(String name)
     83  public <T> T getParameterValue(String name)
    8484    throws ParameterException
    8585  {
    86     Object value = parent.getParameterValue(namespace + "." + name);
     86    T value = parent.getParameterValue(namespace + "." + name);
    8787    if (value == null) value = parent.getParameterValue(name);
    8888    return value;
     
    9090
    9191  @Override
    92   public List<?> getParameterValues(String name)
     92  public <T> List<T> getParameterValues(String name)
    9393  {
    94     List<?> values = parent.getParameterValues(namespace + "." + name);
     94    List<T> values = parent.getParameterValues(namespace + "." + name);
    9595    if (values == null) values = parent.getParameterValues(name);
    9696    return values;
  • trunk/src/core/net/sf/basedb/core/plugin/ParameterValues.java

    r4889 r7605  
    8181    @throws BaseException If there is another error
    8282  */
    83   public Object getValue(String name)
     83  public <T> T getValue(String name)
    8484    throws PermissionDeniedException, BaseException;
    8585 
     
    9292    @throws BaseException If there is another error
    9393  */
    94   public List<?> getValues(String name)
     94  public <T> List<T> getValues(String name)
    9595    throws PermissionDeniedException, BaseException;
    9696 
  • trunk/src/core/net/sf/basedb/core/plugin/ParameterValuesWrapper.java

    r6127 r7605  
    122122  */
    123123  @Override
    124   public Object getValue(String name)
     124  public <T> T getValue(String name)
    125125    throws PermissionDeniedException, BaseException
    126126  {
    127     Object value = null;
     127    T value = null;
    128128    if (request != null) value = request.getParameterValue(name);
    129129    if (value == null && job != null) value = job.getValue(name);
     
    139139  */
    140140  @Override
    141   public List<?> getValues(String name)
     141  public <T> List<T> getValues(String name)
    142142    throws PermissionDeniedException, BaseException
    143143  {
    144     List<?> values = null;
     144    List<T> values = null;
    145145    if (request != null) values = request.getParameterValues(name);
    146146    if (values == null && job != null) values = job.getValues(name);
  • trunk/src/core/net/sf/basedb/core/plugin/Request.java

    r7321 r7605  
    9898      is given
    9999  */
    100   public List<?> getParameterValues(String name);
     100  public <T> List<T> getParameterValues(String name);
    101101 
    102102  /**
     
    108108    @throws ParameterException If getting the value fails.
    109109  */
    110   public Object getParameterValue(String name)
     110  public <T> T getParameterValue(String name)
    111111    throws ParameterException;
    112112 
  • trunk/src/core/net/sf/basedb/core/signal/ExtensionSignalTransporter.java

    r6444 r7605  
    5656    -------------------------------------------
    5757  */
    58   @SuppressWarnings("unchecked")
    5958  @Override
    6059  public void send(Signal signal)
     
    6968    context.setAttribute("signal-uri", getSignalURI());
    7069    context.setAttribute("signal", signal);
    71     ExtensionsInvoker<SignalHandler> invoker = (ExtensionsInvoker<SignalHandler>)registry.useExtensions(context, filter, extensionPointId);
     70    ExtensionsInvoker<SignalHandler> invoker = registry.useExtensions(context, filter, extensionPointId);
    7271   
    7372    // Send the signal
  • trunk/src/core/net/sf/basedb/util/extensions/Registry.java

    r7275 r7605  
    674674  */
    675675  @SuppressWarnings({ "unchecked", "rawtypes" })
    676   public ExtensionsInvoker<?> useExtensions(ClientContext clientContext, ExtensionsFilter filter,
     676  public <A extends Action> ExtensionsInvoker<A> useExtensions(ClientContext clientContext, ExtensionsFilter filter,
    677677    String... extensionPointIds)
    678678  {
    679679    if (filter == null) filter = DEFAULT_FILTER;
    680680
    681     List<ExtensionContext<Action>> contexts = new LinkedList<ExtensionContext<Action>>();
     681    List<ExtensionContext<A>> contexts = new LinkedList<ExtensionContext<A>>();
    682682    for (String id : extensionPointIds)
    683683    {
     
    722722
    723723        // Create invokation context for the extension
    724         ExtensionContext<Action> context =
    725           new ExtensionContext<Action>(mainContext, ext);
     724        ExtensionContext<A> context =
     725          new ExtensionContext(mainContext, ext);
    726726       
    727727        // Check with the action factory as well
     
    745745    // Sort the extensions
    746746    filter.sort(contexts);
    747     return new ExtensionsInvoker<Action>(contexts);
     747    return new ExtensionsInvoker<A>(contexts);
    748748  }
    749749 
  • trunk/src/core/net/sf/basedb/util/overview/OverviewUtil.java

    r7527 r7605  
    199199    @since 3.2
    200200  */
    201   @SuppressWarnings("unchecked")
    202201  public static Map<String, List<ValidationRuleAction>> getAllRules(DbControl dc, GenericOverview overview)
    203202  {
     
    207206    Registry registry = Application.getExtensionsManager().getRegistry();
    208207    Settings settings = Application.getExtensionsManager().getSettings();
    209     ExtensionsInvoker<ValidationRuleAction> invoker =
    210       (ExtensionsInvoker<ValidationRuleAction>)registry.useExtensions(new ClientContext(dc, overview), settings, "net.sf.basedb.util.overview.validationrule");
     208    ExtensionsInvoker<ValidationRuleAction> invoker = registry.useExtensions(new ClientContext(dc, overview), settings, "net.sf.basedb.util.overview.validationrule");
    211209   
    212210    List<ValidationRuleAction> xtRules = IteratorUtils.toList(invoker.iterator());
  • trunk/src/core/net/sf/basedb/util/overview/loader/ExtensionChildNodeLoader.java

    r6088 r7605  
    112112    @return TRUE if new nodes were added to the parent node, FALSE if not
    113113  */
    114   @SuppressWarnings("unchecked")
    115114  @Override
    116115  public boolean loadChildNodes(DbControl dc, OverviewContext context, Node node)
     
    127126    Settings settings = Application.getExtensionsManager().getSettings();
    128127    ExtensionsInvoker<ChildNodeLoaderAction> invoker =
    129       (ExtensionsInvoker<ChildNodeLoaderAction>)registry.useExtensions(clientContext, settings, "net.sf.basedb.util.overview.loader");
     128      registry.useExtensions(clientContext, settings, "net.sf.basedb.util.overview.loader");
    130129   
    131130    for (ChildNodeLoaderAction a : invoker)
  • trunk/src/core/net/sf/basedb/util/overview/loader/ExtractLoader.java

    r7301 r7605  
    258258    are the source extracts that was pooled to create the given product.
    259259  */
    260   @SuppressWarnings("unchecked")
    261260  private Node createPooledReverseNode(Extract product, DbControl dc, OverviewContext context, Node parentNode)
    262261  {
    263262    NodeFactory<Extract> nf = getNodeFactory(dc, context);
    264263    Node folderNode = null;
    265     ItemQuery<Extract> query = (ItemQuery<Extract>)context.initQuery(
     264    ItemQuery<Extract> query = context.initQuery(
    266265        product.getCreationEvent().getSources(), "name");
    267266   
  • trunk/src/core/net/sf/basedb/util/overview/loader/SampleLoader.java

    r7004 r7605  
    221221    Eg. the child nodes are the source sample(s) that was used to create the given product.
    222222  */
    223   @SuppressWarnings("unchecked")
    224223  private Node createPooledReverseNode(Sample product, DbControl dc, OverviewContext context, Node parentNode)
    225224  {
    226225    NodeFactory<Sample> nf = getNodeFactory(dc, context);
    227226    Node folderNode = null;
    228     ItemQuery<Sample> query = (ItemQuery<Sample>)context.initQuery(product.getCreationEvent().getSources(), "name");
     227    ItemQuery<Sample> query = context.initQuery(product.getCreationEvent().getSources(), "name");
    229228    Iterator<Sample> it = query.iterate(dc);
    230229    int numSamples = 0;
  • trunk/src/core/net/sf/basedb/util/overview/validator/ExtensionNodeValidator.java

    r7527 r7605  
    179179  }
    180180
    181   @SuppressWarnings("unchecked")
    182181  private Iterable<NodeValidatorAction<I>> getValidators(DbControl dc)
    183182  {
     
    190189      Registry registry = Application.getExtensionsManager().getRegistry();
    191190      Settings settings = Application.getExtensionsManager().getSettings();
    192       ExtensionsInvoker<NodeValidatorAction<I>> invoker = (ExtensionsInvoker<NodeValidatorAction<I>>)registry.useExtensions(clientContext, settings, "net.sf.basedb.util.overview.validator");
     191      ExtensionsInvoker<NodeValidatorAction<I>> invoker = registry.useExtensions(clientContext, settings, "net.sf.basedb.util.overview.validator");
    193192     
    194193      xtValidators = IteratorUtils.toList(invoker.iterator());
  • trunk/src/core/net/sf/basedb/util/overview/validator/ExtractValidator.java

    r6959 r7605  
    397397      if (child.getParentType() == Item.EXTRACT)
    398398      {
    399         ItemQuery<Extract> query = (ItemQuery<Extract>)child.getCreationEvent().getSources();
     399        ItemQuery<Extract> query = child.getCreationEvent().getSources();
    400400        query.include(Include.ALL);
    401401        SourceItemTransformer transformer = new ExtractToParentExtractTransformer(true);
  • trunk/src/core/net/sf/basedb/util/uri/ConnectionManagerUtil.java

    r7527 r7605  
    204204    Get an invoker for using the connection manager factory extensions.
    205205  */
    206   @SuppressWarnings("unchecked")
    207206  private static ExtensionsInvoker<ConnectionManagerFactory> getInvoker(ClientContext context, ExtensionsFilter filter)
    208207  {
     
    210209    if (filter == null) filter = manager.getSettings();
    211210    Registry registry = manager.getRegistry();
    212     return (ExtensionsInvoker<ConnectionManagerFactory>)registry.useExtensions(context, filter, EXTENSION_POINT_ID);
     211    return registry.useExtensions(context, filter, EXTENSION_POINT_ID);
    213212  }
    214213 
  • trunk/src/plugins/core/net/sf/basedb/plugins/AnnotationFlatFileImporter.java

    r7594 r7605  
    393393  }
    394394 
    395   @SuppressWarnings("unchecked")
    396395  @Override
    397396  public String isInContext(GuiContext context, Object item)
    398397  {
    399     List<String> itemTypes = (List<String>)configuration.getValues("itemTypes");
     398    List<String> itemTypes = configuration.getValues("itemTypes");
    400399    Item itemType = context.getItem();
    401400
     
    755754    // Include options
    756755    Set<Include> includes = EnumSet.noneOf(Include.class);
    757     if (Boolean.TRUE.equals((Boolean)job.getValue("includeMine"))) includes.add(Include.MINE);
    758     if (Boolean.TRUE.equals((Boolean)job.getValue("includeShared"))) includes.add(Include.SHARED);
    759     if (Boolean.TRUE.equals((Boolean)job.getValue("includeInProject"))) includes.add(Include.IN_PROJECT);
    760     if (Boolean.TRUE.equals((Boolean)job.getValue("includeOthers"))) includes.add(Include.OTHERS);
     756    if (Boolean.TRUE.equals(job.getValue("includeMine"))) includes.add(Include.MINE);
     757    if (Boolean.TRUE.equals(job.getValue("includeShared"))) includes.add(Include.SHARED);
     758    if (Boolean.TRUE.equals(job.getValue("includeInProject"))) includes.add(Include.IN_PROJECT);
     759    if (Boolean.TRUE.equals(job.getValue("includeOthers"))) includes.add(Include.OTHERS);
    761760   
    762761    itemQuery = idMethod.prepareQuery(dc, createQuery(itemType, itemList));
  • trunk/src/plugins/core/net/sf/basedb/plugins/BaseFileExporterPlugin.java

    r5610 r7605  
    305305
    306306  @Override
    307   @SuppressWarnings("unchecked")
    308307  protected void performExport(ExportOutputStream out, ProgressReporter progress)
    309308    throws IOException
     
    312311
    313312    // Get job configuration parameters
    314     BioAssaySet source = (BioAssaySet)job.getValue("source");
     313    BioAssaySet source = job.getValue("source");
    315314    source = BioAssaySet.getById(dc, source.getId());
    316315    boolean attachToBioAssaySet = Boolean.TRUE.equals(job.getValue("attachToBioAssaySet"));
    317     String characterSet = (String)job.getValue(Parameters.CHARSET_PARAMETER);
     316    String characterSet = job.getValue(Parameters.CHARSET_PARAMETER);
    318317    if (characterSet == null) characterSet = Config.getCharset();
    319     String format = (String)job.getValue("fileformat");
    320     List<String> reporterFields = (List<String>)job.getValues("reporterFields");
    321     List<String> spotFields = (List<String>)job.getValues("spotFields");
     318    String format = job.getValue("fileformat");
     319    List<String> reporterFields = job.getValues("reporterFields");
     320    List<String> spotFields = job.getValues("spotFields");
    322321    if (reporterFields == null) reporterFields = Collections.emptyList();
    323322    if (spotFields == null) spotFields = Collections.emptyList();
  • trunk/src/plugins/core/net/sf/basedb/plugins/BfsExporterPlugin.java

    r6875 r7605  
    309309      }
    310310 
    311       String format = (String)job.getValue(PARAMETER_FILEFORMAT);
    312       String filenameGen = (String)job.getValue(PARAMETER_FILENAMEGENERATOR);
    313       List<String> reporterFields = (List<String>)job.getValues("reporterFields");
    314       List<String> spotFields = (List<String>)job.getValues("spotFields");
    315       List<String> assayFields = (List<String>)job.getValues("assayFields");
     311      String format = job.getValue(PARAMETER_FILEFORMAT);
     312      String filenameGen = job.getValue(PARAMETER_FILENAMEGENERATOR);
     313      List<String> reporterFields = job.getValues("reporterFields");
     314      List<String> spotFields = job.getValues("spotFields");
     315      List<String> assayFields = job.getValues("assayFields");
    316316      if (reporterFields == null) reporterFields = Collections.emptyList();
    317317      if (spotFields == null) spotFields = Collections.emptyList();
  • trunk/src/plugins/core/net/sf/basedb/plugins/IlluminaRawDataImporter.java

    r6127 r7605  
    424424  }
    425425 
    426   @SuppressWarnings("unchecked")
    427426  @Override
    428427  protected void begin(FlatFileParser ffp)
     
    434433    this.numberFormat = ffp.getDefaultNumberFormat();
    435434    this.headerLines = new LinkedList<Line>();
    436     this.experiment = (Experiment)job.getValue("experiment");
    437     this.bioAssays = (List<DerivedBioAssay>)job.getValues("bioAssays");
    438     this.design = (ArrayDesign)job.getValue("arrayDesign");
    439     this.protocol = (Protocol)job.getValue("protocol");
    440     this.software = (Software)job.getValue("software");
     435    this.experiment = job.getValue("experiment");
     436    this.bioAssays = job.getValues("bioAssays");
     437    this.design = job.getValue("arrayDesign");
     438    this.protocol = job.getValue("protocol");
     439    this.software = job.getValue("software");
    441440   
    442441    // Feature identification
    443442    try
    444443    {
    445       String fiTemp = (String)job.getValue("featureIdentification");
     444      String fiTemp = job.getValue("featureIdentification");
    446445      fiMethod = FeatureIdentificationMethod.valueOf(fiTemp);
    447446    }
     
    464463    else
    465464    {
    466       String method = (String)job.getValue("featureMismatchError");
     465      String method = job.getValue("featureMismatchError");
    467466      this.useSmartFeatureMismatchHandling = "smart".equals(method);
    468467      if (method != null)
  • trunk/src/plugins/core/net/sf/basedb/plugins/IntensityCalculatorPlugin.java

    r6127 r7605  
    164164
    165165  @Override
    166   @SuppressWarnings("unchecked")
    167166  public void run(Request request, Response response, ProgressReporter progress)
    168167  {
     
    175174    {
    176175      // name parameter
    177       String name = (String)job.getValue("name");
     176      String name = job.getValue("name");
    178177      if (name == null) name = "New root bioassay set";
    179178 
    180179      // experiment parameter
    181       Experiment experiment = (Experiment)job.getValue("experiment");
     180      Experiment experiment = job.getValue("experiment");
    182181      if (experiment == null)
    183182      {
     
    189188 
    190189      // rawBioAssays parameter
    191       List<RawBioAssay> sources = (List<RawBioAssay>)job.getValues("rawBioAssays");
     190      List<RawBioAssay> sources = job.getValues("rawBioAssays");
    192191      if (sources == null || sources.size() == 0)
    193192      {
     
    200199
    201200      // Formula parameter
    202       Formula formula = (Formula)job.getValue("formula");
     201      Formula formula = job.getValue("formula");
    203202      formula = Formula.getById(dc, formula.getId());
    204203 
     
    333332  */
    334333  @Override
    335   @SuppressWarnings("unchecked")
    336334  public void configure(GuiContext context, Request request, Response response)
    337335  {
     
    360358              "' is not stored in the database.");
    361359          }
    362           List<RawBioAssay> rawBioAssays = (List<RawBioAssay>)request.getParameterValues("rawBioAssays");
     360          List<RawBioAssay> rawBioAssays = request.getParameterValues("rawBioAssays");
    363361          for (RawBioAssay rba : rawBioAssays)
    364362          {
  • trunk/src/plugins/core/net/sf/basedb/plugins/ManualDerivedBioAssayCreator.java

    r6127 r7605  
    9797  }
    9898
    99   @SuppressWarnings("unchecked")
    10099  @Override
    101100  public void run(Request request, Response response, ProgressReporter progress)
     
    109108      DerivedBioAssay source = getSourceDerivedBioAssay(dc);
    110109      Job currentJob = getCurrentJob(dc);
    111       String childName = (String)job.getValue(CHILD_NAME);
    112       String childDescription = (String)job.getValue(CHILD_DESCRIPTION);
    113       ItemSubtype childSubtype = (ItemSubtype)configuration.getValue("childSubtype");
     110      String childName = job.getValue(CHILD_NAME);
     111      String childDescription = job.getValue(CHILD_DESCRIPTION);
     112      ItemSubtype childSubtype = configuration.getValue("childSubtype");
    114113      boolean copyAnnotations = Boolean.TRUE.equals(job.getValue(COPY_ANNOTATIONS));
    115       List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");
     114      List<DataFileType> fileTypes = configuration.getValues("fileTypes");
    116115      boolean allowMoreFiles = Boolean.TRUE.equals(configuration.getValue("allowMoreFiles"));
    117116     
     
    136135        for (DataFileType ft : fileTypes)
    137136        {
    138           List<File> files = (List<File>)job.getValues("file." + ft.getExternalId());
     137          List<File> files = job.getValues("file." + ft.getExternalId());
    139138          if (files != null && files.size() > 0)
    140139          {
     
    149148      if (allowMoreFiles)
    150149      {
    151         List<File> moreFiles = (List<File>)job.getValues("morefiles");
     150        List<File> moreFiles = job.getValues("morefiles");
    152151        if (moreFiles != null)
    153152        {
     
    186185    Adds check of the item subtype.
    187186   */
    188   @SuppressWarnings("unchecked")
    189187  @Override
    190188  public String isInContext(GuiContext context, Object item)
     
    194192    {
    195193      DerivedBioAssay dba = (DerivedBioAssay)item;
    196       List<ItemSubtype> subtypes = (List<ItemSubtype>)configuration.getValues("subtypes");
     194      List<ItemSubtype> subtypes = configuration.getValues("subtypes");
    197195      if (subtypes != null && subtypes.size() > 0)
    198196      {
     
    209207  }
    210208
    211   @SuppressWarnings("unchecked")
    212209  @Override
    213210  public void configure(GuiContext context, Request request, Response response)
     
    247244     
    248245      // Files
    249       List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");
     246      List<DataFileType> fileTypes = configuration.getValues("fileTypes");
    250247      if (fileTypes != null)
    251248      {
     
    258255
    259256      // Parameters
    260       List<PluginParameter<?>> tp = getToolParameters((List<String>)configuration.getValues("parameters"));
     257      List<PluginParameter<?>> tp = getToolParameters(configuration.getValues("parameters"));
    261258      if (tp != null)
    262259      {
     
    313310  // ----------------------------------------------
    314311
    315   @SuppressWarnings("unchecked")
    316312  private RequestInformation getConfigureJobParameters(GuiContext context)
    317313  {
     
    325321      PluginConfiguration config = getCurrentConfiguration(dc);
    326322      boolean allowMoreFiles = Boolean.TRUE.equals(configuration.getValue("allowMoreFiles"));
    327       List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");
     323      List<DataFileType> fileTypes = configuration.getValues("fileTypes");
    328324      boolean configIsAnnotated = config.isAnnotated();
    329325      DerivedBioAssay source = getCurrentDerivedBioAssay(dc);
     
    347343      // Parameters section
    348344      List<PluginParameter<?>> toolParameters =
    349         getToolParameters((List<String>)configuration.getValues("parameters"));
     345        getToolParameters(configuration.getValues("parameters"));
    350346      if (toolParameters != null && toolParameters.size() > 0)
    351347      {
  • trunk/src/plugins/core/net/sf/basedb/plugins/ManualTransformCreator.java

    r6127 r7605  
    105105  }
    106106
    107   @SuppressWarnings("unchecked")
    108107  @Override
    109108  public void run(Request request, Response response, ProgressReporter progress)
     
    117116      BioAssaySet source = getSourceBioAssaySet(dc);
    118117      Job currentJob = getCurrentJob(dc);
    119       String transformationName = (String)job.getValue(TRANSFORMATION_NAME);
    120       String childName = (String)job.getValue(CHILD_NAME);
     118      String transformationName = job.getValue(TRANSFORMATION_NAME);
     119      String childName = job.getValue(CHILD_NAME);
    121120      String childDescription = (String)job.getValue(CHILD_DESCRIPTION);
    122121      boolean copyAnnotations = Boolean.TRUE.equals(job.getValue(COPY_ANNOTATIONS));
     
    124123      boolean importSpotData = "import".equals(job.getValue("spotData"));
    125124      boolean useBase1ColumnNames = "base1".equals(job.getValue("columnNames"));
    126       List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");
     125      List<DataFileType> fileTypes = configuration.getValues("fileTypes");
    127126      boolean allowMoreFiles = Boolean.TRUE.equals(configuration.getValue("allowMoreFiles"));
    128127     
     
    192191        for (DataFileType ft : fileTypes)
    193192        {
    194           List<File> files = (List<File>)job.getValues("file." + ft.getExternalId());
     193          List<File> files = job.getValues("file." + ft.getExternalId());
    195194          if (files != null && files.size() > 0)
    196195          {
     
    205204      if (allowMoreFiles)
    206205      {
    207         List<File> moreFiles = (List<File>)job.getValues("morefiles");
     206        List<File> moreFiles = job.getValues("morefiles");
    208207        if (moreFiles != null)
    209208        {
     
    233232    -------------------------------------------
    234233  */
    235   @SuppressWarnings("unchecked")
    236234  @Override
    237235  public void configure(GuiContext context, Request request, Response response)
     
    272270     
    273271      // Files
    274       List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");
     272      List<DataFileType> fileTypes = configuration.getValues("fileTypes");
    275273      if (fileTypes != null)
    276274      {
     
    283281
    284282      // Parameters
    285       List<PluginParameter<?>> tp = getToolParameters((List<String>)configuration.getValues("parameters"));
     283      List<PluginParameter<?>> tp = getToolParameters(configuration.getValues("parameters"));
    286284      if (tp != null)
    287285      {
     
    353351  // ----------------------------------------------
    354352
    355   @SuppressWarnings("unchecked")
    356353  private RequestInformation getConfigureJobParameters(GuiContext context)
    357354  {
     
    365362      PluginConfiguration config = getCurrentConfiguration(dc);
    366363      boolean allowMoreFiles = Boolean.TRUE.equals(configuration.getValue("allowMoreFiles"));
    367       List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");
     364      List<DataFileType> fileTypes = configuration.getValues("fileTypes");
    368365      boolean configIsAnnotated = config.isAnnotated();
    369366      BioAssaySet source = getCurrentBioAssaySet(dc);
     
    438435      // Parameters section
    439436      List<PluginParameter<?>> toolParameters =
    440         getToolParameters((List<String>)configuration.getValues("parameters"));
     437        getToolParameters(configuration.getValues("parameters"));
    441438      if (toolParameters != null && toolParameters.size() > 0)
    442439      {
  • trunk/src/plugins/core/net/sf/basedb/plugins/PackedFileExporter.java

    r7517 r7605  
    347347 
    348348  @Override
    349   @SuppressWarnings("unchecked")
    350349  protected void performExport(ExportOutputStream out, ProgressReporter progress)
    351350    throws IOException
     
    356355    Directory rootDir = (Directory)job.getValue("root");
    357356    rootDir = Directory.getById(dc, rootDir.getId());
    358     List<Integer> files = (List<Integer>)job.getValues("files");       
    359     List<Integer> directories = (List<Integer>)job.getValues("directories");
     357    List<Integer> files = job.getValues("files");       
     358    List<Integer> directories = job.getValues("directories");
    360359    boolean removeItems = Boolean.TRUE.equals(job.getValue("removeItems"));
    361360    FilePacker packer = getPacker();
  • trunk/src/plugins/core/net/sf/basedb/plugins/PluginConfigurationExporter.java

    r6473 r7605  
    227227  }
    228228  @Override
    229   @SuppressWarnings("unchecked")
    230229  protected void performExport(ExportOutputStream out, ProgressReporter progress)
    231230    throws IOException
     
    233232    if (signalHandler != null) signalHandler.setWorkerThread(null);
    234233    numExported = 0;
    235     List<Integer> selectedItems = (List<Integer>)job.getValues("items");
     234    List<Integer> selectedItems = job.getValues("items");
    236235    numSelected = selectedItems != null ? selectedItems.size() : 0;
    237236    if (numSelected > 0)
  • trunk/src/plugins/core/net/sf/basedb/plugins/ReporterMapFlatFileImporter.java

    r6127 r7605  
    314314  */
    315315  @Override
    316   @SuppressWarnings("unchecked")
    317316  public String isInContext(GuiContext context, Object item)
    318317  {
     
    339338      else
    340339      {
    341         List<String> platforms = (List<String>)configuration.getValues("platforms");
     340        List<String> platforms = configuration.getValues("platforms");
    342341        if (platforms != null && platforms.size() > 0)
    343342        {
  • trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/AbstractItemImporter.java

    r7599 r7605  
    667667    Setup column mapping. Creates DbControl and query to find items.
    668668  */
    669   @SuppressWarnings("unchecked")
    670669  @Override
    671670  protected void beginData()
     
    678677    // Mapper to get name or external ID
    679678    this.idMapper = getMapper(ffp, idMapping, null, null);
    680     this.permissionTemplateMapper = getMapper(ffp, (String)job.getValue("permissionTemplateColumnMapping"), null, null);
    681     this.subtypeMapper = getMapper(ffp, (String)job.getValue("subtypeColumnMapping"), null, null);
     679    this.permissionTemplateMapper = getMapper(ffp, job.getValue("permissionTemplateColumnMapping"), null, null);
     680    this.subtypeMapper = getMapper(ffp, job.getValue("subtypeColumnMapping"), null, null);
    682681    createColumnMappers(ffp, cropStrings);
    683682   
    684683    // Include options
    685684    Set<Include> includes = EnumSet.noneOf(Include.class);
    686     if (Boolean.TRUE.equals((Boolean)job.getValue("includeMine"))) includes.add(Include.MINE);
    687     if (Boolean.TRUE.equals((Boolean)job.getValue("includeShared"))) includes.add(Include.SHARED);
    688     if (Boolean.TRUE.equals((Boolean)job.getValue("includeInProject"))) includes.add(Include.IN_PROJECT);
    689     if (Boolean.TRUE.equals((Boolean)job.getValue("includeOthers"))) includes.add(Include.OTHERS);
     685    if (Boolean.TRUE.equals(job.getValue("includeMine"))) includes.add(Include.MINE);
     686    if (Boolean.TRUE.equals(job.getValue("includeShared"))) includes.add(Include.SHARED);
     687    if (Boolean.TRUE.equals(job.getValue("includeInProject"))) includes.add(Include.IN_PROJECT);
     688    if (Boolean.TRUE.equals(job.getValue("includeOthers"))) includes.add(Include.OTHERS);
    690689    itemQuery = idMethod.prepareQuery(dc, addMembersMode ? createItemQuery() : createItemQuery(itemList));
    691690    itemQuery.setIncludes(includes);
    692691   
    693     List<ItemSubtype> subtypes = (List<ItemSubtype>)job.getValues("itemSubtypes");
     692    List<ItemSubtype> subtypes = job.getValues("itemSubtypes");
    694693    if (subtypes != null && subtypes.size() > 0)
    695694    {
  • trunk/src/plugins/core/net/sf/basedb/plugins/executor/ExternalProgramExecutor.java

    r7329 r7605  
    12531253    }
    12541254
    1255     @Override
    1256     public Object getParameterValue(String name)
     1255    @SuppressWarnings("unchecked")
     1256    @Override
     1257    public <T> T getParameterValue(String name)
    12571258      throws ParameterException
    12581259    {
    12591260      if (parameters.containsKey(name))
    12601261      {
    1261         return parameters.get(name);
     1262        return (T)parameters.get(name);
    12621263      }
    12631264      return parent.getParameterValue(name);
     
    12651266
    12661267    @Override
    1267     public List<?> getParameterValues(String name)
     1268    public <T> List<T> getParameterValues(String name)
    12681269    {
    12691270      return parent.getParameterValues(name);
  • trunk/src/plugins/core/net/sf/basedb/plugins/gtf/DefaultConfigurationValues.java

    r6459 r7605  
    8282  }
    8383
     84  @SuppressWarnings("unchecked")
    8485  @Override
    85   public Object getValue(String name)
     86  public <T> T getValue(String name)
    8687    throws PermissionDeniedException, BaseException
    8788  {
    88     Object value = configuration == null ? null : configuration.getValue(name);
     89    T value = configuration == null ? null : configuration.getValue(name);
    8990    if (value == null)
    9091    {
     
    110111        defaultValues.put("featureIdColumnMapping", "\\<transcript_id>\\@\\<seqname>\\");
    111112      }
    112       value = defaultValues.get(name);
     113      value = (T)defaultValues.get(name);
    113114    }
    114115    return value;
     
    116117
    117118  @Override
    118   public List<?> getValues(String name)
     119  public <T> List<T> getValues(String name)
    119120    throws PermissionDeniedException, BaseException
    120121  {
  • trunk/src/test/TestExtensions.java

    r7190 r7605  
    200200  }
    201201 
    202   @SuppressWarnings("unchecked")
    203202  static void test_render_default(Registry registry, String extensionPoint)
    204203  {
     
    206205    {
    207206      ClientContext clientContext = new ClientContext(TestUtil.getSessionControl());
    208       ExtensionsInvoker<ActionButton> manager =
    209         (ExtensionsInvoker<ActionButton>)registry.useExtensions(clientContext, null, extensionPoint);
     207      ExtensionsInvoker<ActionButton> manager = registry.useExtensions(clientContext, null, extensionPoint);
    210208     
    211209      manager.renderDefault();
  • trunk/www/admin/annotationtypecategories/index.jsp

    r7604 r7605  
    162162    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    163163    dc = sc.newDbControl();
    164     AnnotationTypeCategory annotationTypeCategory = (AnnotationTypeCategory)cc.getObject("item");
     164    AnnotationTypeCategory annotationTypeCategory = cc.getObject("item");
    165165    if (annotationTypeCategory == null)
    166166    {
  • trunk/www/admin/annotationtypes/index.jsp

    r7604 r7605  
    183183    final int maxRecent = Base.getMaxRecent(sc);
    184184    dc = sc.newDbControl();
    185     AnnotationType annotationType = (AnnotationType)cc.getObject("item");
     185    AnnotationType annotationType = cc.getObject("item");
    186186    if (annotationType == null)
    187187    {
  • trunk/www/admin/annotationtypes/list_annotationtypes.jsp

    r7604 r7605  
    634634                  /></tbl:cell>
    635635                <tbl:cell column="isEnumeration"><%=item.isEnumeration() ?
    636                   HTML.encodeTags(Values.getString((List)item.getValues(), ", ", true, (Formatter)FormatterFactory.getTypeFormatter(sc, item.getValueType()) )) :
     636                  HTML.encodeTags(Values.getString(item.getValues(), ", ", true, FormatterFactory.getTypeFormatter(sc, item.getValueType()) )) :
    637637                  "<i>- no -</i>"%></tbl:cell>
    638638                <tbl:cell column="requiredForMiame"><%=item.isRequiredForMiame() ? "yes" : "no"%></tbl:cell>
  • trunk/www/admin/annotationtypes/view_annotationtype.jsp

    r7604 r7605  
    275275        <th>Enumeration</th>
    276276        <td><%=annotationType.isEnumeration() ?
    277           HTML.encodeTags(Values.getString((List)annotationType.getValues(), ", ", true,
    278             (Formatter)FormatterFactory.getTypeFormatter(sc, annotationType.getValueType()))) : "no"%></td>
     277          HTML.encodeTags(Values.getString(annotationType.getValues(), ", ", true,
     278            FormatterFactory.getTypeFormatter(sc, annotationType.getValueType()))) : "no"%></td>
    279279      </tr>
    280280      <tr>
  • trunk/www/admin/clients/help/index.jsp

    r7604 r7605  
    129129    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    130130    dc = sc.newDbControl();
    131     Help help = (Help)cc.getObject("item");
     131    Help help = cc.getObject("item");
    132132    String externalId = Values.getStringOrNull(request.getParameter("external_id"));
    133133    if (help == null)
  • trunk/www/admin/clients/index.jsp

    r7604 r7605  
    136136    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    137137    dc = sc.newDbControl();
    138     Client client = (Client)cc.getObject("item");
     138    Client client = cc.getObject("item");
    139139    if (client == null)
    140140    {
  • trunk/www/admin/datafiletypes/index.jsp

    r7604 r7605  
    136136    final int maxRecent = Base.getMaxRecent(sc);
    137137    dc = sc.newDbControl();
    138     DataFileType fileType = (DataFileType)cc.getObject("item");
     138    DataFileType fileType = cc.getObject("item");
    139139    if (fileType == null)
    140140    {
  • trunk/www/admin/diskusage/details/view_details.jsp

    r7604 r7605  
    111111  boolean writePermission = false;
    112112  final boolean hasDiskUsagePermission = sc.hasPermission(Permission.READ, Item.DISKUSAGE);
    113   DiskUsageStatistics statistics = (DiskUsageStatistics)sc.getSessionSetting("diskUsageStatistics");
     113  DiskUsageStatistics statistics = sc.getSessionSetting("diskUsageStatistics");
    114114  String returnCmd = null;
    115115  if (statistics == null)
  • trunk/www/admin/diskusage/list_groups.jsp

    r7604 r7605  
    9090try
    9191{
    92   DiskUsageStatistics du = (DiskUsageStatistics)sc.getSessionSetting("diskUsageStatistics");
     92  DiskUsageStatistics du = sc.getSessionSetting("diskUsageStatistics");
    9393  if (du == null)
    9494  {
  • trunk/www/admin/diskusage/list_users.jsp

    r7604 r7605  
    9393try
    9494{
    95   DiskUsageStatistics du = (DiskUsageStatistics)sc.getSessionSetting("diskUsageStatistics");
     95  DiskUsageStatistics du = sc.getSessionSetting("diskUsageStatistics");
    9696  if (du == null)
    9797  {
  • trunk/www/admin/diskusage/overview.jsp

    r7595 r7605  
    6161try
    6262{
    63   DiskUsageStatistics du = (DiskUsageStatistics)sc.getSessionSetting("diskUsageStatistics");
     63  DiskUsageStatistics du = sc.getSessionSetting("diskUsageStatistics");
    6464  if (du == null)
    6565  {
  • trunk/www/admin/extensions/tree.jsp

    r7604 r7605  
    4444  import="java.util.Iterator"
    4545  import="java.util.Collections"
     46  import="java.util.Comparator"
    4647  import="org.json.simple.JSONArray"
    4748  import="org.json.simple.JSONObject"
     
    165166  return jsonJoust;
    166167}
     168@SuppressWarnings({"rawtypes", "unchecked"})
     169void sort(List list, Comparator cmp)
     170{
     171  Collections.sort(list, cmp);
     172}
    167173%>
    168174<%
     
    194200  ExtensionsControl ec = ExtensionsControl.get(dc);
    195201  List<ExtensionPoint<?>> extensionPoints = ec.getExtensionPoints();
    196   Collections.sort(extensionPoints, Registry.EXTENSIONPOINT_COMPARATOR);
     202  sort(extensionPoints, Registry.EXTENSIONPOINT_COMPARATOR);
    197203  for (ExtensionPoint<?> ep : extensionPoints)
    198204  {
     
    222228    @SuppressWarnings("rawtypes")
    223229    List<ExtensionPoint> eps = ef.getObjectsOfClass(ExtensionPoint.class);
    224     Collections.sort((List)eps, Registry.EXTENSIONPOINT_COMPARATOR);
     230    sort(eps, Registry.EXTENSIONPOINT_COMPARATOR);
    225231    for (ExtensionPoint<?> ep : eps)
    226232    {
     
    230236    @SuppressWarnings("rawtypes")
    231237    List<Extension> exts = ef.getObjectsOfClass(Extension.class);
    232     Collections.sort((List)exts, Registry.EXTENSION_COMPARATOR);
     238    sort(exts, Registry.EXTENSION_COMPARATOR);
    233239    String currentGroupId = null;
    234240    JSONObject jsonGroup = null;
     
    255261    }
    256262    List<PluginInfo> plugins = ef.getObjectsOfClass(PluginInfo.class);
    257     Collections.sort(plugins, PluginInfo.NAME_COMPARATOR);
     263    sort(plugins, PluginInfo.NAME_COMPARATOR);
    258264    for (PluginInfo info : plugins)
    259265    {
  • trunk/www/admin/extravaluetypes/index.jsp

    r7604 r7605  
    135135    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    136136    dc = sc.newDbControl();
    137     ExtraValueType extraValueType = (ExtraValueType)cc.getObject("item");
     137    ExtraValueType extraValueType = cc.getObject("item");
    138138    String externalId = Values.getStringOrNull(request.getParameter("external_id"));
    139139    if (extraValueType == null)
  • trunk/www/admin/groups/index.jsp

    r7604 r7605  
    168168    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    169169    dc = sc.newDbControl();
    170     Group group = (Group)cc.getObject("item");
     170    Group group = cc.getObject("item");
    171171    if (group == null)
    172172    {
  • trunk/www/admin/hardware/index.jsp

    r7604 r7605  
    139139    final int maxRecent = Base.getMaxRecent(sc);
    140140    dc = sc.newDbControl();
    141     Hardware hardware = (Hardware)cc.getObject("item");
     141    Hardware hardware = cc.getObject("item");
    142142    if (hardware == null)
    143143    {
  • trunk/www/admin/hardware/list_hardware.jsp

    r7604 r7605  
    223223        AnnotationType at = loader.getAnnotationType();
    224224        Enumeration<String, String> annotationEnum = null;
    225         @SuppressWarnings("rawtypes")
    226         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     225        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    227226        if (at.isEnumeration())
    228227        {
  • trunk/www/admin/itemsubtypes/index.jsp

    r7604 r7605  
    159159    final int maxRecent = Base.getMaxRecent(sc);
    160160    dc = sc.newDbControl();
    161     ItemSubtype subtype = (ItemSubtype)cc.getObject("item");
     161    ItemSubtype subtype = cc.getObject("item");
    162162    if (subtype == null)
    163163    {
  • trunk/www/admin/jobagents/index.jsp

    r7604 r7605  
    138138    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    139139    dc = sc.newDbControl();
    140     JobAgent agent = (JobAgent)cc.getObject("item");
     140    JobAgent agent = cc.getObject("item");
    141141    if (agent == null)
    142142    {
  • trunk/www/admin/mimetypes/index.jsp

    r7604 r7605  
    135135    final int maxRecent = Base.getMaxRecent(sc);
    136136    dc = sc.newDbControl();
    137     MimeType mimeType = (MimeType)cc.getObject("item");
     137    MimeType mimeType = cc.getObject("item");
    138138    if (mimeType == null)
    139139    {
  • trunk/www/admin/news/edit_news.jsp

    r7604 r7605  
    6969    title = "Create news";
    7070    cc.removeObject("item");
    71     startDate = (Date)cc.getPropertyObject("startDate");
    72     newsDate = (Date)cc.getPropertyObject("newsDate");
     71    startDate = cc.getPropertyObject("startDate");
     72    newsDate = cc.getPropertyObject("newsDate");
    7373  }
    7474  else
     
    169169            <input class="text" type="text" name="end_date" style="width: 15em;" id="end_date"
    170170            value="<%=dateFormatter.format(news == null ?
    171                 (Date)cc.getPropertyObject("endDate") : news.getEndDate())%>"
     171                cc.getPropertyObject("endDate") : news.getEndDate())%>"
    172172            maxlength="20" title="Enter date in format: <%=htmlDateFormat%>">
    173173          </td>
  • trunk/www/admin/news/index.jsp

    r7604 r7605  
    140140    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    141141    dc = sc.newDbControl();
    142     News news = (News)cc.getObject("item");
     142    News news = cc.getObject("item");
    143143    Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
    144144    Date startDate = dateFormatter.parseString(Values.getStringOrNull(request.getParameter("start_date")));
  • trunk/www/admin/platforms/index.jsp

    r7604 r7605  
    159159    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    160160    dc = sc.newDbControl();
    161     Platform platform = (Platform)cc.getObject("item");
     161    Platform platform = cc.getObject("item");
    162162    if (platform == null)
    163163    {
  • trunk/www/admin/platforms/variants/index.jsp

    r7604 r7605  
    138138    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    139139    dc = sc.newDbControl();
    140     PlatformVariant variant = (PlatformVariant)cc.getObject("item");
     140    PlatformVariant variant = cc.getObject("item");
    141141    Platform platform = null;
    142142    if (variant == null)
  • trunk/www/admin/pluginconfigurations/edit_configuration.jsp

    r7604 r7605  
    7373 
    7474  // Load recently used items
    75   List<PluginDefinition> recentPlugins = (List<PluginDefinition>)cc.getRecent(dc, Item.PLUGINDEFINITION);
     75  List<PluginDefinition> recentPlugins = cc.getRecent(dc, Item.PLUGINDEFINITION);
    7676
    7777  if (itemId == 0 && cloneId == 0)
  • trunk/www/admin/pluginconfigurations/index.jsp

    r7604 r7605  
    141141    final int maxRecent = Base.getMaxRecent(sc);
    142142    dc = sc.newDbControl();
    143     PluginConfiguration configuration = (PluginConfiguration)cc.getObject("item");
     143    PluginConfiguration configuration = cc.getObject("item");
    144144    boolean configure = Values.getBoolean(request.getParameter("configure"));
    145145    if (configuration == null)
  • trunk/www/admin/plugindefinitions/index.jsp

    r7604 r7605  
    187187    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    188188    dc = sc.newDbControl();
    189     PluginDefinition plugin = (PluginDefinition)cc.getObject("item");
     189    PluginDefinition plugin = cc.getObject("item");
    190190    String className = Values.getStringOrNull(request.getParameter("className"));
    191191    String jarFile = Values.getStringOrNull(request.getParameter("jarFile"));
  • trunk/www/admin/plugintypes/index.jsp

    r7604 r7605  
    156156    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    157157    dc = sc.newDbControl();
    158     PluginType pluginType = (PluginType)cc.getObject("item");
     158    PluginType pluginType = cc.getObject("item");
    159159    String interfaceName = Values.getStringOrNull(request.getParameter("interfaceName"));
    160160    String jarFile = Values.getStringOrNull(request.getParameter("jarFile"));
  • trunk/www/admin/protocols/edit_protocol.jsp

    r7604 r7605  
    7878
    7979  // Load recently used items
    80   List<File> recentFiles = (List<File>)cc.getRecent(dc, Item.FILE);
     80  List<File> recentFiles = cc.getRecent(dc, Item.FILE);
    8181
    8282  if (itemId == 0)
  • trunk/www/admin/protocols/index.jsp

    r7604 r7605  
    141141    final int maxRecent = Base.getMaxRecent(sc);
    142142    dc = sc.newDbControl();
    143     Protocol protocol = (Protocol)cc.getObject("item");
     143    Protocol protocol = cc.getObject("item");
    144144    if (protocol == null)
    145145    {
  • trunk/www/admin/protocols/list_protocol.jsp

    r7604 r7605  
    233233        AnnotationType at = loader.getAnnotationType();
    234234        Enumeration<String, String> annotationEnum = null;
    235         @SuppressWarnings("rawtypes")
    236         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     235        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    237236        if (at.isEnumeration())
    238237        {
  • trunk/www/admin/quantities/index.jsp

    r7604 r7605  
    155155    final int maxRecent = Base.getMaxRecent(sc);
    156156    dc = sc.newDbControl();
    157     Quantity quantity = (Quantity)cc.getObject("item");
     157    Quantity quantity = cc.getObject("item");
    158158    if (quantity == null)
    159159    {
  • trunk/www/admin/quantities/units/index.jsp

    r7604 r7605  
    124124    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    125125    dc = sc.newDbControl();
    126     Unit unit = (Unit)cc.getObject("item");
     126    Unit unit = cc.getObject("item");
    127127    String[] symbols = Values.getString(request.getParameter("symbols")).split("[\n\r]+");
    128128    String displaySymbol = symbols.length == 0 ? null : symbols[0];
  • trunk/www/admin/quota/index.jsp

    r7604 r7605  
    136136    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    137137    dc = sc.newDbControl();
    138     Quota quota = (Quota)cc.getObject("item");
     138    Quota quota = cc.getObject("item");
    139139    if (quota == null)
    140140    {
  • trunk/www/admin/quotatypes/index.jsp

    r7604 r7605  
    122122    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    123123    dc = sc.newDbControl();
    124     QuotaType quotaType = (QuotaType)cc.getObject("item");
     124    QuotaType quotaType = cc.getObject("item");
    125125    dc.reattachItem(quotaType, false);
    126126    message = "Quota type updated";
  • trunk/www/admin/reporterclonetemplates/index.jsp

    r7604 r7605  
    135135    final int maxRecent = Base.getMaxRecent(sc);
    136136    dc = sc.newDbControl();
    137     ReporterCloneTemplate template = (ReporterCloneTemplate)cc.getObject("item");
     137    ReporterCloneTemplate template = cc.getObject("item");
    138138    if (template == null)
    139139    {
  • trunk/www/admin/reportertypes/index.jsp

    r7604 r7605  
    133133    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    134134    dc = sc.newDbControl();
    135     ReporterType reporterType = (ReporterType)cc.getObject("item");
     135    ReporterType reporterType = cc.getObject("item");
    136136    if (reporterType == null)
    137137    {
  • trunk/www/admin/roles/index.jsp

    r7604 r7605  
    159159    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    160160    dc = sc.newDbControl();
    161     Role role = (Role)cc.getObject("item");
     161    Role role = cc.getObject("item");
    162162    if (role == null)
    163163    {
  • trunk/www/admin/services/services.jsp

    r7604 r7605  
    2828
    2929JspContext jspContext = ExtensionsControl.createContext(dc, pageContext);
    30 ExtensionsInvoker<ServiceControllerAction> invoker =
    31   (ExtensionsInvoker<ServiceControllerAction>)ExtensionsControl.useExtensions(jspContext,
     30ExtensionsInvoker<ServiceControllerAction> invoker = ExtensionsControl.useExtensions(jspContext,
    3231  (ExtensionsFilter)null, Services.EXTENSION_POINT_ID);
    3332ExtensionsControl ec = ExtensionsControl.get(dc);
     
    3736
    3837ExtensionsInvoker<ServiceControllerAction> actionsInvoker =
    39   (ExtensionsInvoker<ServiceControllerAction>)ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.services.list.actions");
     38  ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.services.list.actions");
    4039try
    4140{
  • trunk/www/admin/software/index.jsp

    r7604 r7605  
    139139    final int maxRecent = Base.getMaxRecent(sc);
    140140    dc = sc.newDbControl();
    141     Software software = (Software)cc.getObject("item");
     141    Software software = cc.getObject("item");
    142142    if (software == null)
    143143    {
  • trunk/www/admin/software/list_software.jsp

    r7604 r7605  
    223223        AnnotationType at = loader.getAnnotationType();
    224224        Enumeration<String, String> annotationEnum = null;
    225         @SuppressWarnings("rawtypes")
    226         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     225        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    227226        if (at.isEnumeration())
    228227        {
  • trunk/www/admin/users/edit_user.jsp

    r7604 r7605  
    447447            <input class="text" type="text" name="expiration_date" id="expiration_date" style="width: 15em;"
    448448              value="<%=HTML.encodeTags(dateFormatter.format(
    449                   user == null ? (Date)cc.getPropertyObject("expirationDate") : user.getExpirationDate())
     449                  user == null ? cc.getPropertyObject("expirationDate") : user.getExpirationDate())
    450450                )%>"
    451451              maxlength="20" title="Enter date in format: <%=htmlDateFormat%>">
  • trunk/www/admin/users/index.jsp

    r7604 r7605  
    191191    boolean externalIdHasChanged = false;
    192192
    193     User user = (User)cc.getObject("item");
     193    User user = cc.getObject("item");
    194194    if (user == null)
    195195    {
  • trunk/www/admin/users/view_user.jsp

    r7604 r7605  
    326326            {
    327327              String name = ep.getName();
    328               @SuppressWarnings("rawtypes")
    329               Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
     328              Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
    330329              String value = f.format(user.getExtended(name));
    331330              %>
  • trunk/www/biomaterials/bioplateeventtypes/index.jsp

    r7604 r7605  
    138138    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    139139    dc = sc.newDbControl();
    140     BioPlateEventType eventType = (BioPlateEventType)cc.getObject("item");
     140    BioPlateEventType eventType = cc.getObject("item");
    141141    if (eventType == null)
    142142    {
  • trunk/www/biomaterials/bioplates/edit_bioplate.jsp

    r7604 r7605  
    121121      currentFreezer = Hardware.getById(dc, freezerId);
    122122    }
    123     eventDate = (Date)cc.getPropertyObject("eventDate");
     123    eventDate = cc.getPropertyObject("eventDate");
    124124  }
    125125  else
     
    164164    Project activeProject = Project.getById(dc, activeProjectId);
    165165    if (currentStorageType == null) currentStorageType = ItemSubtype.getById(dc, SystemItems.getId(Hardware.FREEZER));
    166     defaultFreezers = (List<Hardware>)activeProject.findDefaultItems(dc, currentStorageType, false);
     166    defaultFreezers = activeProject.findDefaultItems(dc, currentStorageType, false);
    167167  }
    168168 
    169169  // Load recently used items
    170   List<Hardware> recentFreezers = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE, currentStorageType);
    171   List<PlateGeometry> recentPlateGeometry = (List<PlateGeometry>)cc.getRecent(dc, Item.PLATEGEOMETRY);
    172   List<BioPlateType> recentBioPlateType = (List<BioPlateType>)cc.getRecent(dc, Item.BIOPLATETYPE);
     170  List<Hardware> recentFreezers = cc.getRecent(dc, Item.HARDWARE, currentStorageType);
     171  List<PlateGeometry> recentPlateGeometry = cc.getRecent(dc, Item.PLATEGEOMETRY);
     172  List<BioPlateType> recentBioPlateType = cc.getRecent(dc, Item.BIOPLATETYPE);
    173173 
    174174  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
  • trunk/www/biomaterials/bioplates/events/edit_event.jsp

    r7604 r7605  
    8282 
    8383  // Load recently used items
    84   List<Hardware> recentHardware = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE);
    85   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL);
    86   List<Kit> recentKits = (List<Kit>)cc.getRecent(dc, Item.KIT);
     84  List<Hardware> recentHardware = cc.getRecent(dc, Item.HARDWARE);
     85  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL);
     86  List<Kit> recentKits = cc.getRecent(dc, Item.KIT);
    8787 
    8888  cc.setObject("item", event);
  • trunk/www/biomaterials/bioplates/events/index.jsp

    r7604 r7605  
    136136    final int maxRecent = Base.getMaxRecent(sc);
    137137    dc = sc.newDbControl();
    138     BioPlateEvent event = (BioPlateEvent)cc.getObject("item");
     138    BioPlateEvent event = cc.getObject("item");
    139139    dc.reattachItem(event, false);
    140140    message = "Event updated";
  • trunk/www/biomaterials/bioplates/index.jsp

    r7604 r7605  
    139139    dc = sc.newDbControl();
    140140    final int maxRecent = Base.getMaxRecent(sc);
    141     BioPlate bioPlate = (BioPlate)cc.getObject("item");
     141    BioPlate bioPlate = cc.getObject("item");
    142142    if (bioPlate == null)
    143143    {
  • trunk/www/biomaterials/bioplates/list_bioplates.jsp

    r7604 r7605  
    351351      {
    352352        AnnotationType at = loader.getAnnotationType();
    353         @SuppressWarnings("rawtypes")
    354         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     353        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    355354        Enumeration<String, String> annotationEnum = null;
    356355        if (at.isEnumeration())
  • trunk/www/biomaterials/bioplates/wells/index.jsp

    r7604 r7605  
    134134
    135135    dc = sc.newDbControl();
    136     BioWell biowell = (BioWell)cc.getObject("item");
     136    BioWell biowell = cc.getObject("item");
    137137    dc.reattachItem(biowell, false);
    138138
  • trunk/www/biomaterials/bioplates/wells/list_biowells.jsp

    r7604 r7605  
    376376        AnnotationType at = loader.getAnnotationType();
    377377        Enumeration<String, String> annotationEnum = null;
    378         @SuppressWarnings("rawtypes")
    379         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     378        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    380379        if (at.isEnumeration())
    381380        {
  • trunk/www/biomaterials/bioplatetypes/index.jsp

    r7604 r7605  
    141141    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    142142    dc = sc.newDbControl();
    143     BioPlateType plateType = (BioPlateType)cc.getObject("item");
     143    BioPlateType plateType = cc.getObject("item");
    144144    if (plateType == null)
    145145    {
  • trunk/www/biomaterials/biosources/index.jsp

    r7604 r7605  
    160160    final int maxRecent = Base.getMaxRecent(sc);
    161161    dc = sc.newDbControl();
    162     BioSource bioSource = (BioSource)cc.getObject("item");
     162    BioSource bioSource = cc.getObject("item");
    163163    if (bioSource == null)
    164164    {
  • trunk/www/biomaterials/biosources/list_biosources.jsp

    r7604 r7605  
    251251        AnnotationType at = loader.getAnnotationType();
    252252        Enumeration<String, String> annotationEnum = null;
    253         @SuppressWarnings("rawtypes")
    254         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     253        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    255254        if (at.isEnumeration())
    256255        {
  • trunk/www/biomaterials/events/edit_event.jsp

    r7604 r7605  
    7777 
    7878  // Load recently used items
    79   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL);
    80   List<Kit> recentKits = (List<Kit>)cc.getRecent(dc, Item.KIT);
     79  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL);
     80  List<Kit> recentKits = cc.getRecent(dc, Item.KIT);
    8181 
    8282  if (itemId == 0)
     
    8484    title = "Create event";
    8585    cc.removeObject("item");
    86     eventDate = (Date)cc.getPropertyObject("eventDate");
     86    eventDate = cc.getPropertyObject("eventDate");
    8787    if (cc.getPropertyFilter("protocol.name") != null)
    8888    {
  • trunk/www/biomaterials/events/index.jsp

    r7604 r7605  
    134134    final int maxRecent = Base.getMaxRecent(sc);
    135135    dc = sc.newDbControl();
    136     BioMaterialEvent event = (BioMaterialEvent)cc.getObject("item");
     136    BioMaterialEvent event = cc.getObject("item");
    137137    if (event == null)
    138138    {
  • trunk/www/biomaterials/extracts/edit_extract.jsp

    r7604 r7605  
    179179      {
    180180        // Find most recently used related subtype
    181         List<ItemSubtype> recentSubtypes = (List<ItemSubtype>)cc.getRecent(dc, Item.ITEMSUBTYPE);
     181        List<ItemSubtype> recentSubtypes = cc.getRecent(dc, Item.ITEMSUBTYPE);
    182182        currentSubtype = ListUtil.findFirstCommon(recentSubtypes, relatedToParent, relatedToParent.get(0));
    183183      }
     
    189189      }
    190190    }
    191     eventDate = (Date)cc.getPropertyObject("creationEvent.eventDate");   
     191    eventDate = cc.getPropertyObject("creationEvent.eventDate");   
    192192  }
    193193  else
     
    273273    if (parentType == Item.EXTRACT)
    274274    {
    275       extractsQuery = (ItemQuery<Extract>)creationEvent.getSources();
     275      extractsQuery = creationEvent.getSources();
    276276    }
    277277  }
     
    285285    ItemSubtype protocolSubtype = currentSubtype == null ? null : currentSubtype.getRelatedSubtype(Item.PROTOCOL);
    286286    if (protocolSubtype == null) protocolSubtype = ItemSubtype.getById(dc, SystemItems.getId(Protocol.EXTRACTION));
    287     defaultProtocols = (List<Protocol>)activeProject.findDefaultItems(dc, protocolSubtype, false);
     287    defaultProtocols = activeProject.findDefaultItems(dc, protocolSubtype, false);
    288288  }
    289289
    290290  // Load recently used items
    291   List<Kit> recentKits = (List<Kit>)cc.getRecent(dc, Item.KIT, currentSubtype);
    292   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL, currentSubtype);
    293   List<Sample> recentSamples = (List<Sample>)cc.getRecent(dc, Item.SAMPLE);
    294   List<BioPlate> recentBioPlates = (List<BioPlate>)cc.getRecent(dc, Item.BIOPLATE, currentSubtype);
    295   List<Tag> recentTags = (List<Tag>)cc.getRecent(dc, Item.TAG, currentSubtype);
     291  List<Kit> recentKits = cc.getRecent(dc, Item.KIT, currentSubtype);
     292  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL, currentSubtype);
     293  List<Sample> recentSamples = cc.getRecent(dc, Item.SAMPLE);
     294  List<BioPlate> recentBioPlates = cc.getRecent(dc, Item.BIOPLATE, currentSubtype);
     295  List<Tag> recentTags = cc.getRecent(dc, Item.TAG, currentSubtype);
    296296 
    297297  // Query to retrieve item types
  • trunk/www/biomaterials/extracts/index.jsp

    r7604 r7605  
    231231    final int maxRecent = Base.getMaxRecent(sc);
    232232    dc = sc.newDbControl();
    233     Extract extract = (Extract)cc.getObject("item");
     233    Extract extract = cc.getObject("item");
    234234    if (extract == null)
    235235    {
  • trunk/www/biomaterials/extracts/list_extracts.jsp

    r7604 r7605  
    485485        AnnotationType at = loader.getAnnotationType();
    486486        Enumeration<String, String> annotationEnum = null;
    487         @SuppressWarnings("rawtypes")
    488         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     487        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    489488        if (at.isEnumeration())
    490489        {
     
    519518        AnnotationType at = loader.getAnnotationType();
    520519        Enumeration<String, String> annotationEnum = null;
    521         @SuppressWarnings("rawtypes")
    522         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     520        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    523521        if (at.isEnumeration())
    524522        {
  • trunk/www/biomaterials/kits/edit_kit.jsp

    r7604 r7605  
    8686    }
    8787    cc.removeObject("item");
    88     expirationDate = (Date)cc.getPropertyObject("expirationDate");
     88    expirationDate = cc.getPropertyObject("expirationDate");
    8989    inactive = Values.getBoolean(cc.getPropertyValue("inactive"));
    9090  }
  • trunk/www/biomaterials/kits/index.jsp

    r7604 r7605  
    141141    final int maxRecent = Base.getMaxRecent(sc);
    142142    dc = sc.newDbControl();
    143     Kit kit = (Kit)cc.getObject("item");
     143    Kit kit = cc.getObject("item");
    144144    if (kit == null)
    145145    {
  • trunk/www/biomaterials/kits/list_kits.jsp

    r7604 r7605  
    232232        AnnotationType at = loader.getAnnotationType();
    233233        Enumeration<String, String> annotationEnum = null;
    234         @SuppressWarnings("rawtypes")
    235         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     234        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    236235        if (at.isEnumeration())
    237236        {
  • trunk/www/biomaterials/samples/edit_sample.jsp

    r7604 r7605  
    170170      {
    171171        // Find most recently used related subtype
    172         List<ItemSubtype> recentSubtypes = (List<ItemSubtype>)cc.getRecent(dc, Item.ITEMSUBTYPE);
     172        List<ItemSubtype> recentSubtypes = cc.getRecent(dc, Item.ITEMSUBTYPE);
    173173        currentSubtype = ListUtil.findFirstCommon(recentSubtypes, relatedToParent, relatedToParent.get(0));
    174174      }
     
    180180      }
    181181    }
    182     eventDate = (Date)cc.getPropertyObject("creationEvent.eventDate");
     182    eventDate = cc.getPropertyObject("creationEvent.eventDate");
    183183  }
    184184  else
     
    252252    if (parentType == Item.SAMPLE)
    253253    {
    254       samplesQuery = (ItemQuery<Sample>)creationEvent.getSources();
     254      samplesQuery = creationEvent.getSources();
    255255    }
    256256  }
     
    264264    ItemSubtype protocolSubtype = currentSubtype == null ? null : currentSubtype.getRelatedSubtype(Item.PROTOCOL);
    265265    if (protocolSubtype == null) protocolSubtype = ItemSubtype.getById(dc, SystemItems.getId(Protocol.SAMPLING));
    266     defaultProtocols = (List<Protocol>)activeProject.findDefaultItems(dc, protocolSubtype, false);
     266    defaultProtocols = activeProject.findDefaultItems(dc, protocolSubtype, false);
    267267  }
    268268 
    269269  // Load recently used items
    270   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL, currentSubtype);
    271   List<Kit> recentKits = (List<Kit>)cc.getRecent(dc, Item.KIT, currentSubtype);
    272   List<BioSource> recentBioSources = (List<BioSource>)cc.getRecent(dc, Item.BIOSOURCE);
    273   List<BioPlate> recentBioPlates = (List<BioPlate>)cc.getRecent(dc, Item.BIOPLATE, currentSubtype);
     270  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL, currentSubtype);
     271  List<Kit> recentKits = cc.getRecent(dc, Item.KIT, currentSubtype);
     272  List<BioSource> recentBioSources = cc.getRecent(dc, Item.BIOSOURCE);
     273  List<BioPlate> recentBioPlates = cc.getRecent(dc, Item.BIOPLATE, currentSubtype);
    274274 
    275275  // Query to retrieve item types
  • trunk/www/biomaterials/samples/index.jsp

    r7604 r7605  
    206206    final int maxRecent = Base.getMaxRecent(sc);
    207207    dc = sc.newDbControl();
    208     Sample sample = (Sample)cc.getObject("item");
     208    Sample sample = cc.getObject("item");
    209209    if (sample == null)
    210210    {
  • trunk/www/biomaterials/samples/list_samples.jsp

    r7604 r7605  
    435435        AnnotationType at = loader.getAnnotationType();
    436436        Enumeration<String, String> annotationEnum = null;
    437         @SuppressWarnings("rawtypes")
    438         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     437        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    439438        if (at.isEnumeration())
    440439        {
  • trunk/www/biomaterials/tags/index.jsp

    r7604 r7605  
    139139    final int maxRecent = Base.getMaxRecent(sc);
    140140    dc = sc.newDbControl();
    141     Tag tag = (Tag)cc.getObject("item");
     141    Tag tag = cc.getObject("item");
    142142    if (tag == null)
    143143    {
  • trunk/www/biomaterials/tags/list_tags.jsp

    r7604 r7605  
    223223        AnnotationType at = loader.getAnnotationType();
    224224        Enumeration<String, String> annotationEnum = null;
    225         @SuppressWarnings("rawtypes")
    226         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     225        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    227226        if (at.isEnumeration())
    228227        {
  • trunk/www/biomaterials/wizards/create_child_bioplate_step1.jsp

    r6997 r7605  
    7474 
    7575  // Load recently used items
    76   List<Hardware> recentHardware = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE, sourceBioMaterialType.name());
    77   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL, sourceBioMaterialType.name());
    78   List<Kit> recentKits = (List<Kit>)cc.getRecent(dc, Item.KIT, sourceBioMaterialType.name());
    79   List<PlateGeometry> recentGeometry = (List<PlateGeometry>)cc.getRecent(dc, Item.PLATEGEOMETRY, sourceBioMaterialType.name());
    80   List<BioPlateType> recentPlateTypes = (List<BioPlateType>)cc.getRecent(dc, Item.BIOPLATETYPE, sourceBioMaterialType.name());
    81   List<Hardware> recentFreezers = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE, "freezer");
     76  List<Hardware> recentHardware = cc.getRecent(dc, Item.HARDWARE, sourceBioMaterialType.name());
     77  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL, sourceBioMaterialType.name());
     78  List<Kit> recentKits = cc.getRecent(dc, Item.KIT, sourceBioMaterialType.name());
     79  List<PlateGeometry> recentGeometry = cc.getRecent(dc, Item.PLATEGEOMETRY, sourceBioMaterialType.name());
     80  List<BioPlateType> recentPlateTypes = cc.getRecent(dc, Item.BIOPLATETYPE, sourceBioMaterialType.name());
     81  List<Hardware> recentFreezers = cc.getRecent(dc, Item.HARDWARE, "freezer");
    8282 
    8383  // Load subtypes
  • trunk/www/biomaterials/wizards/move_biomaterial.jsp

    r6997 r7605  
    6464 
    6565  // Load recently used items
    66   List<Hardware> recentHardware = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE);
    67   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL);
    68   List<Kit> recentKits = (List<Kit>)cc.getRecent(dc, Item.KIT);
     66  List<Hardware> recentHardware = cc.getRecent(dc, Item.HARDWARE);
     67  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL);
     68  List<Kit> recentKits = cc.getRecent(dc, Item.KIT);
    6969 
    7070  Item itemType = null;
  • trunk/www/biomaterials/wizards/place_on_plate.jsp

    r6997 r7605  
    6060{
    6161  // Load recently used items
    62   List<Hardware> recentHardware = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE);
    63   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL);
    64   List<Kit> recentKits = (List<Kit>)cc.getRecent(dc, Item.KIT);
     62  List<Hardware> recentHardware = cc.getRecent(dc, Item.HARDWARE);
     63  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL);
     64  List<Kit> recentKits = cc.getRecent(dc, Item.KIT);
    6565 
    66   ItemQuery<MeasuredBioMaterial> query = (ItemQuery<MeasuredBioMaterial>)cc.getQuery();
     66  ItemQuery<MeasuredBioMaterial> query = cc.getQuery();
    6767  List<MeasuredBioMaterial> bioMaterial = Collections.emptyList();
    6868  ItemSubtype commonSubtype = null;
  • trunk/www/common/annotations/batch_inherit.jsp

    r6926 r7605  
    5151try
    5252{
    53   Set<AnnotatedItem> items = (Set<AnnotatedItem>)cc.getObject("AnnotatedItems");
    54   Set<AnnotationType> annotationTypes = (Set<AnnotationType>)cc.getObject("AnnotationTypes");
     53  Set<AnnotatedItem> items = cc.getObject("AnnotatedItems");
     54  Set<AnnotationType> annotationTypes = cc.getObject("AnnotationTypes");
    5555  cc.removeObject("AnnotationTypes");
    5656  JSONArray jsonAnnotationTypes = new JSONArray();
  • trunk/www/common/annotations/index.jsp

    r7209 r7605  
    8686    oldDc = sc.newDbControl();
    8787    ItemContext cc = sc.getCurrentContext(itemType);
    88     Annotatable oldItem = (Annotatable)cc.getObject("item");
     88    Annotatable oldItem = cc.getObject("item");
    8989    Annotatable newItem = (Annotatable)itemType.getById(newDc, itemId);
    9090    oldDc.reattachItem((BasicItem)oldItem, false);
     
    103103    newDc = sc.newDbControl();
    104104
    105     Set<AnnotatedItem> items = (Set<AnnotatedItem>)cc.getObject("AnnotatedItems");
     105    Set<AnnotatedItem> items = cc.getObject("AnnotatedItems");
    106106    cc.removeObject("AnnotatedItems");
    107107   
  • trunk/www/common/annotations/inherit.jsp

    r7604 r7605  
    134134    for (Annotation a : annotations)
    135135    {
    136       @SuppressWarnings("rawtypes")
    137       Formatter formatter = FormatterFactory.getAnnotationFormatter(sc, a, null);
     136      Formatter<Object> formatter = FormatterFactory.getAnnotationFormatter(sc, a, null);
    138137      boolean inherited = inheritedAnnotations != null && inheritedAnnotations.contains(a);
    139138      if (inherited) continue;
  • trunk/www/common/annotations/list_annotations.jsp

    r7604 r7605  
    293293              List<?> values = null;
    294294              List<?> defaultValues = null;
    295               @SuppressWarnings("rawtypes")
    296               Formatter formatter = null;
     295              Formatter<Object> formatter = null;
    297296              boolean projectSpecific = false;
    298297              if (a != null)
     
    439438                boolean annotatePermission = writePermission & at.hasPermission(Permission.USE);
    440439                AnnotationSnapshot a = existing != null ? existing.get(at) : null;
    441                 @SuppressWarnings("rawtypes")
    442                 Formatter formatter = null;
     440                Formatter<Object> formatter = null;
    443441                List<?> values = null;
    444442                List<?> defaultValues = null;
     
    602600             
    603601              // Values, units, etc.
    604               @SuppressWarnings("rawtypes")
    605               Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     602              Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    606603              Unit unit = a.getActualUnit(dc);
    607604              UnitConverter converter = null;
  • trunk/www/common/anytoany/index.jsp

    r6414 r7605  
    102102    dc = sc.newDbControl();
    103103   
    104     AnyToAny anyToAny = (AnyToAny)cc.getObject("item");
     104    AnyToAny anyToAny = cc.getObject("item");
    105105    if (anyToAny == null)
    106106    {
  • trunk/www/common/columns/configure.jsp

    r6689 r7605  
    5656final ItemContext cc = sc.getCurrentContext(itemType, subContext);
    5757
    58 final String defaultColumns = (String)cc.getObject("defaultColumns");
     58final String defaultColumns = cc.getObject("defaultColumns");
    5959final String settingName = Values.getString(request.getParameter("settingName"), "columns");
    6060%>
  • trunk/www/common/datafiles/select_files.jsp

    r6611 r7605  
    279279        validationSupport |= hasValidator;
    280280        List<FileSetMember> files = members.get(dft);
    281         List<File> recentFiles = (List<File>)cc.getRecent(dc, Item.FILE, dft.getExternalId());
     281        List<File> recentFiles = cc.getRecent(dc, Item.FILE, dft.getExternalId());
    282282       
    283283        JSONObject jsonFileType = new JSONObject();
  • trunk/www/common/expression_builder_ajax.jsp

    r7604 r7605  
    119119  JepFunction raw = new SimpleJepFunction("raw", 1)
    120120  {
    121     @SuppressWarnings("rawtypes")
     121    @SuppressWarnings({ "unchecked", "rawtypes" })
    122122    @Override
    123123    public void run(Stack stack)
     
    132132  JepFunction mean = new SimpleJepFunction("mean", 1)
    133133  {
    134     @SuppressWarnings("rawtypes")
     134    @SuppressWarnings({ "unchecked", "rawtypes" })
    135135    @Override
    136136    public void run(Stack stack)
     
    145145  JepFunction ch = new SimpleJepFunction("ch", 1)
    146146  {
    147     @SuppressWarnings("rawtypes")
     147    @SuppressWarnings({ "unchecked", "rawtypes" })
    148148    @Override
    149149    public void run(Stack stack)
     
    158158  JepFunction rawCh = new SimpleJepFunction("rawCh", 1)
    159159  {
    160     @SuppressWarnings("rawtypes")
     160    @SuppressWarnings({ "unchecked", "rawtypes" })
    161161    @Override
    162162    public void run(Stack stack)
     
    177177  JepFunction pos = new SimpleJepFunction("pos", 0)
    178178  {
    179     @SuppressWarnings("rawtypes")
     179    @SuppressWarnings({ "unchecked", "rawtypes" })
    180180    @Override
    181181    public void run(Stack stack)
     
    188188  JepFunction rep = new SimpleJepFunction("rep", 1)
    189189  {
    190     @SuppressWarnings("rawtypes")
     190    @SuppressWarnings({ "unchecked", "rawtypes" })
    191191    @Override
    192192    public void run(Stack stack)
  • trunk/www/common/import/select_file.jsp

    r6607 r7605  
    104104    }
    105105  }
    106   List<File> recentFiles = (List<File>)currentContext.getRecent(dc, Item.FILE);
     106  List<File> recentFiles = currentContext.getRecent(dc, Item.FILE);
    107107  %>
    108108  <base:page type="popup" title="<%=title%>">
  • trunk/www/common/import/select_plugin.jsp

    r6607 r7605  
    7777  String jobName = Values.getString(request.getParameter("job_name"), title);
    7878 
    79   List<ContextResult> contextResults = (List<ContextResult>)sc.getSessionSetting("IMPORTERS");
    80   Set<String> messages = (Set<String>)sc.getSessionSetting("MESSAGES");
     79  List<ContextResult> contextResults = sc.getSessionSetting("IMPORTERS");
     80  Set<String> messages = sc.getSessionSetting("MESSAGES");
    8181  StringBuilder descriptions = new StringBuilder();
    8282 
  • trunk/www/common/overview/info.jsp

    r7604 r7605  
    131131
    132132  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, node);
    133   ExtensionsInvoker<SectionAction> invoker = (ExtensionsInvoker<SectionAction>)ExtensionsControl.useExtensions(
     133  ExtensionsInvoker<SectionAction> invoker = ExtensionsControl.useExtensions(
    134134      jspContext, "net.sf.basedb.clients.web.overview.info-details");
    135135 
     
    436436               
    437437                // Unit and formatter for the values
    438                 @SuppressWarnings("rawtypes")
    439                 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     438                Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    440439                Unit unit = snapshot.getActualUnit(dc);
    441440                UnitConverter converter = null;
  • trunk/www/common/overview/overview.jsp

    r7604 r7605  
    5757  BasicItem item = itemType.getById(dc, itemId);
    5858  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, item);
    59   ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext,
     59  ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext,
    6060    "net.sf.basedb.clients.web.toolbar.item.overview");
    6161  final String showFailures = request.getParameter("show_failures");
  • trunk/www/common/ownership/ownership.jsp

    r6181 r7605  
    5757try
    5858{
    59   Set<OwnedItem> items = (Set<OwnedItem>)cc.getObject("OwnedItems");
     59  Set<OwnedItem> items = cc.getObject("OwnedItems");
    6060  User defaultOwner = User.getById(dc, sc.getLoggedInUserId());
    61   List<User> recentUsers = (List<User>)cc.getRecent(dc, Item.USER);
     61  List<User> recentUsers = cc.getRecent(dc, Item.USER);
    6262 
    6363  // Headline on the web page.
  • trunk/www/common/ownership/submit_ownership.jsp

    r5426 r7605  
    6060  if ("Save".equals(cmd))
    6161  {
    62     Set<OwnedItem> items = (Set<OwnedItem>)cc.getObject("OwnedItems");
     62    Set<OwnedItem> items = cc.getObject("OwnedItems");
    6363    User newOwner = User.getById(dc, Values.getInt(request.getParameter("owner_id")));
    6464    cc.setRecent(newOwner, maxRecent);
  • trunk/www/common/plugin/configure.jsp

    r7604 r7605  
    223223  String htmlDateTimeFormat = HTML.encodeTags(dateTimeFormat);
    224224
    225   final PluginConfigurationRequest pcRequest = (PluginConfigurationRequest)sc.getSessionSetting("plugin.configure.request");
     225  final PluginConfigurationRequest pcRequest = sc.getSessionSetting("plugin.configure.request");
    226226  if (pcRequest == null) throw new WebException("popup", "No request information found", "No request information found");
    227227 
    228   final PluginDefinition plugin = (PluginDefinition)sc.getSessionSetting("plugin.configure.plugin");
    229   final Job job = (Job)sc.getSessionSetting("plugin.configure.job");
     228  final PluginDefinition plugin = sc.getSessionSetting("plugin.configure.plugin");
     229  final Job job = sc.getSessionSetting("plugin.configure.job");
    230230  dc.reattachItem(plugin, false);
    231231 
    232232  final Set<String> options = new HashSet<String>();
    233   final PluginConfiguration pluginConfig = (PluginConfiguration)sc.getSessionSetting("plugin.configure.config");
    234   String errorMessage = (String)sc.getSessionSetting("plugin.configure.errors.message");
    235   List<Throwable> errors = (List<Throwable>)sc.getSessionSetting("plugin.configure.errors.list");
     233  final PluginConfiguration pluginConfig = sc.getSessionSetting("plugin.configure.config");
     234  String errorMessage = sc.getSessionSetting("plugin.configure.errors.message");
     235  List<Throwable> errors = sc.getSessionSetting("plugin.configure.errors.list");
    236236 
    237237  final RequestInformation ri = pcRequest.getRequestInformation();
     
    243243  if (helpText == null && pluginConfig != null) helpText = pluginConfig.getDescription();
    244244  if (helpText == null) helpText = plugin.getDescription();
    245   List<File> recentFiles = currentContext == null ? null : (List<File>)currentContext.getRecent(dc, Item.FILE);
     245  List<File> recentFiles = currentContext == null ? null : currentContext.getRecent(dc, Item.FILE);
    246246 
    247247  JSONArray jsonParameters = JsonUtil.toArray(parameters, new JsonConverter<PluginParameter<?>>()
  • trunk/www/common/plugin/download_immediately.jsp

    r6607 r7605  
    3838final String ID = sc.getId();
    3939final DbControl dc = sc.newDbControl();
    40 PluginResponse pluginResponse = (PluginResponse)sc.getSessionSetting("plugin.configure.response");
     40PluginResponse pluginResponse = sc.getSessionSetting("plugin.configure.response");
    4141String title = pluginResponse.getMessage() == null ?
    4242  "Download export" : HTML.encodeTags(pluginResponse.getMessage());
  • trunk/www/common/plugin/finish_job.jsp

    r7352 r7605  
    6565try
    6666{
    67   Job job = (Job)sc.getSessionSetting("plugin.configure.job");
     67  Job job = sc.getSessionSetting("plugin.configure.job");
    6868  dc.reattachItem(job, false);
    6969  PluginDefinition plugin = job.getPluginDefinition();
     
    7373  boolean removeJobWhenFinished = Values.getBoolean(sc.getUserClientSetting("plugins.removejob"), false);
    7474
    75   PluginResponse pluginResponse = (PluginResponse)sc.getSessionSetting("plugin.configure.response");
     75  PluginResponse pluginResponse = sc.getSessionSetting("plugin.configure.response");
    7676  boolean executeImmediately =
    7777    pluginResponse != null && pluginResponse.getStatus() == Response.Status.EXECUTE_IMMEDIATELY;
  • trunk/www/common/plugin/index.jsp

    r7604 r7605  
    357357  {
    358358    int maxRecent = Base.getMaxRecent(sc);
    359     PluginConfigurationRequest pcRequest = (PluginConfigurationRequest)sc.getSessionSetting("plugin.configure.request");   
     359    PluginConfigurationRequest pcRequest = sc.getSessionSetting("plugin.configure.request");   
    360360    String requestId = request.getParameter("requestId");
    361361    if (requestId != null && !requestId.equals(Integer.toString(System.identityHashCode(pcRequest))))
     
    365365    List<PluginParameter<?>> parameters =  pcRequest.getRequestInformation().getParameters();
    366366    List<Throwable> parseErrors = new LinkedList<Throwable>();
    367     ItemContext currentContext = (ItemContext)sc.getSessionSetting("plugin.configure.currentContext");
     367    ItemContext currentContext = sc.getSessionSetting("plugin.configure.currentContext");
    368368    // Clear old errors
    369369    sc.setSessionSetting("plugin.configure.errors.message", null);
     
    485485    if (status == Response.Status.DONE || status == Response.Status.EXECUTE_IMMEDIATELY)
    486486    {
    487       Job job = (Job)sc.getSessionSetting("plugin.configure.job");
     487      Job job = sc.getSessionSetting("plugin.configure.job");
    488488      if (job != null)
    489489      {
     
    509509      pcRequest = pluginResponse.getNextRequest();
    510510      sc.setSessionSetting("plugin.configure.request", pcRequest);
    511       PluginDefinition plugin = (PluginDefinition)sc.getSessionSetting("plugin.configure.plugin");
     511      PluginDefinition plugin = sc.getSessionSetting("plugin.configure.plugin");
    512512      forward = getJspPage(pcRequest, plugin, "configure.jsp", root);
    513513    }
    514514    else if (status == Response.Status.ERROR)
    515515    {
    516       PluginDefinition plugin = (PluginDefinition)sc.getSessionSetting("plugin.configure.plugin");
     516      PluginDefinition plugin = sc.getSessionSetting("plugin.configure.plugin");
    517517      if (parseErrors.size() > 0)
    518518      {
     
    541541  {
    542542    dc = sc.newDbControl();
    543     Job job = (Job)sc.getSessionSetting("plugin.configure.job");
     543    Job job = sc.getSessionSetting("plugin.configure.job");
    544544    if (job.isInDatabase())
    545545    {
     
    551551    }
    552552   
    553     PluginResponse pluginResponse = (PluginResponse)sc.getSessionSetting("plugin.configure.response");
     553    PluginResponse pluginResponse = sc.getSessionSetting("plugin.configure.response");
    554554    boolean executeImmediately =
    555555      pluginResponse != null && pluginResponse.getStatus() == Response.Status.EXECUTE_IMMEDIATELY;
     
    593593  {
    594594    out.clearBuffer();
    595     PluginResponse pluginResponse = (PluginResponse)sc.getSessionSetting("plugin.configure.response");
     595    PluginResponse pluginResponse = sc.getSessionSetting("plugin.configure.response");
    596596    ExportOutputStream exportStream = new ServletExportOutputStream(response);
    597597    SimpleSignalProgressReporter progress = new SimpleSignalProgressReporter(null);
     
    622622  else if ("CancelWizard".equals(cmd))
    623623  {
    624     PluginConfigurationRequest pcRequest =
    625       (PluginConfigurationRequest)sc.setSessionSetting("plugin.configure.request", null);
    626     SimpleSignalProgressReporter progress = (SimpleSignalProgressReporter)sc.getSessionSetting("plugin.configure.progress.reporter");
     624    PluginConfigurationRequest pcRequest = sc.setSessionSetting("plugin.configure.request", null);
     625    SimpleSignalProgressReporter progress = sc.getSessionSetting("plugin.configure.progress.reporter");
    627626    if (progress != null) progress.sendToAll(new SimpleSignalSender(Signal.ABORT));
    628627    if (pcRequest != null) pcRequest.done();
  • trunk/www/common/plugin/parse_file.jsp

    r7494 r7605  
    6666  String path = request.getParameter("path");
    6767  String charsetName = Values.getString(request.getParameter("charset"), Config.getCharset());
    68   PluginConfigurationRequest pcRequest = (PluginConfigurationRequest)sc.getSessionSetting("plugin.configure.request");
     68  PluginConfigurationRequest pcRequest = sc.getSessionSetting("plugin.configure.request");
    6969  Plugin plugin = pcRequest.getPlugin();
    7070 
  • trunk/www/common/plugin/progress.jsp

    r6372 r7605  
    4141try
    4242{
    43   SimpleSignalProgressReporter progress = (SimpleSignalProgressReporter)sc.getSessionSetting("plugin.configure.progress.reporter");
     43  SimpleSignalProgressReporter progress = sc.getSessionSetting("plugin.configure.progress.reporter");
    4444  //Return the progress information
    4545  if (progress != null)
  • trunk/www/common/plugin/select_plugin.jsp

    r6607 r7605  
    7373try
    7474{
    75   List<ContextResult> contextResults = (List<ContextResult>)sc.getSessionSetting("PLUGINS");
    76   Set<String> messages = (Set<String>)sc.getSessionSetting("MESSAGES");
     75  List<ContextResult> contextResults = sc.getSessionSetting("PLUGINS");
     76  Set<String> messages = sc.getSessionSetting("MESSAGES");
    7777  StringBuilder descriptions = new StringBuilder();
    7878 
  • trunk/www/common/progress_reporter.jsp

    r6928 r7605  
    4040  SessionControl sc = Base.getExistingSessionControl(pageContext, true);
    4141 
    42   SimpleProgressReporter progress = (SimpleProgressReporter)sc.getSessionSetting("progress." + progressName);
     42  SimpleProgressReporter progress = sc.getSessionSetting("progress." + progressName);
    4343  String message = null;
    4444  int percentDone = 0;
  • trunk/www/common/share/share.jsp

    r7212 r7605  
    8686try
    8787{
    88   final MultiPermissions mp = (MultiPermissions)sc.getCurrentContext(itemType, subContext).getObject("MultiPermissions");
     88  final MultiPermissions mp = sc.getCurrentContext(itemType, subContext).getObject("MultiPermissions");
    8989  if (mp == null)
    9090  {
  • trunk/www/common/share/submit_share.jsp

    r6322 r7605  
    7272  {
    7373    ItemContext cc = sc.getCurrentContext(itemType, subContext);
    74     MultiPermissions mp = (MultiPermissions)cc.getObject("MultiPermissions");
     74    MultiPermissions mp = cc.getObject("MultiPermissions");
    7575    boolean recursive = Values.getBoolean(request.getParameter("recursive"));
    7676   
  • trunk/www/filemanager/directories/index.jsp

    r7604 r7605  
    137137    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    138138    dc = sc.newDbControl();
    139     Directory directory = (Directory)cc.getObject("item");
     139    Directory directory = cc.getObject("item");
    140140    if (directory == null)
    141141    {
  • trunk/www/filemanager/files/edit_file.jsp

    r7604 r7605  
    7979  boolean readCurrentFileServer = true;
    8080  FileServer currentFileServer = null;
    81   List<FileServer> recentFileServers = (List<FileServer>)cc.getRecent(dc, Item.FILESERVER);
     81  List<FileServer> recentFileServers = cc.getRecent(dc, Item.FILESERVER);
    8282  boolean isURL = true;
    8383
  • trunk/www/filemanager/files/index.jsp

    r7604 r7605  
    192192    final int maxRecent = Base.getMaxRecent(sc);
    193193    dc = sc.newDbControl();
    194     File file = (File)cc.getObject("item");
     194    File file = cc.getObject("item");
    195195    if (file == null)
    196196    {
  • trunk/www/filemanager/fileservers/index.jsp

    r7604 r7605  
    137137    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    138138    dc = sc.newDbControl();
    139     FileServer server = (FileServer)cc.getObject("item");
     139    FileServer server = cc.getObject("item");
    140140    if (server == null)
    141141    {
  • trunk/www/filemanager/upload/ajax.jsp

    r6124 r7605  
    4848  if ("GetProgress".equals(cmd))
    4949  {
    50     final FileUploadProgress progress = (FileUploadProgress)sc.getSessionSetting("FileUploadProgress");
    51     final SimpleAbsoluteProgressReporter unpackProgress = (SimpleAbsoluteProgressReporter)sc.getSessionSetting("UnpackProgress");
     50    final FileUploadProgress progress = sc.getSessionSetting("FileUploadProgress");
     51    final SimpleAbsoluteProgressReporter unpackProgress = sc.getSessionSetting("UnpackProgress");
    5252   
    5353    if (unpackProgress != null)
     
    7070  else if ("Abort".equals(cmd))
    7171  {
    72     final FileUploadProgress progress = (FileUploadProgress)sc.getSessionSetting("FileUploadProgress");
     72    final FileUploadProgress progress = sc.getSessionSetting("FileUploadProgress");
    7373    if (progress != null) progress.setAbort();
    7474  }
  • trunk/www/include/menu.jsp

    r7531 r7605  
    12501250    // Extensions menu
    12511251    JspContext jspContext = ExtensionsControl.createContext(dc, pageContext);
    1252     ExtensionsInvoker<MenuItemAction> invoker =
    1253       (ExtensionsInvoker<MenuItemAction>)ExtensionsControl.useExtensions(jspContext,
     1252    ExtensionsInvoker<MenuItemAction> invoker = ExtensionsControl.useExtensions(jspContext,
    12541253        "net.sf.basedb.clients.web.menu.extensions");
    12551254    ExtensionsControl ec = ExtensionsControl.get(dc);
  • trunk/www/lims/arraybatches/edit_batch.jsp

    r7604 r7605  
    8585
    8686  // Load recently used items
    87   List<ArrayDesign> recentArrayDesigns = (List<ArrayDesign>)cc.getRecent(dc, Item.ARRAYDESIGN);
    88   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL);
    89   List<Hardware> recentPrintRobots = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE);
     87  List<ArrayDesign> recentArrayDesigns = cc.getRecent(dc, Item.ARRAYDESIGN);
     88  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL);
     89  List<Hardware> recentPrintRobots = cc.getRecent(dc, Item.HARDWARE);
    9090 
    9191  int activeProjectId = sc.getActiveProjectId();
     
    9595    try
    9696    {
    97       defaultArrayDesigns = (List<ArrayDesign>)activeProject.findDefaultItems(dc, Item.ARRAYDESIGN, true);
     97      defaultArrayDesigns = activeProject.findDefaultItems(dc, Item.ARRAYDESIGN, true);
    9898    }
    9999    catch (PermissionDeniedException pdex)
     
    101101    try
    102102    {
    103       defaultProtocols = (List<Protocol>)activeProject.findDefaultItems(dc,
     103      defaultProtocols = activeProject.findDefaultItems(dc,
    104104          ItemSubtype.getById(dc, SystemItems.getId(Protocol.PRINTING)), false);
    105105    }
     
    108108    try
    109109    {
    110       defaultPrintRobots = (List<Hardware>)activeProject.findDefaultItems(dc,
     110      defaultPrintRobots = activeProject.findDefaultItems(dc,
    111111          ItemSubtype.getById(dc, SystemItems.getId(Hardware.PRINT_ROBOT)), false);
    112112    }
  • trunk/www/lims/arraybatches/index.jsp

    r7604 r7605  
    142142    final int maxRecent = Base.getMaxRecent(sc);
    143143    dc = sc.newDbControl();
    144     ArrayBatch batch = (ArrayBatch)cc.getObject("item");
     144    ArrayBatch batch = cc.getObject("item");
    145145    if (batch == null)
    146146    {
  • trunk/www/lims/arraybatches/list_batches.jsp

    r7604 r7605  
    253253      {
    254254        AnnotationType at = loader.getAnnotationType();
    255         @SuppressWarnings("rawtypes")
    256         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     255        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    257256        Enumeration<String, String> annotationEnum = null;
    258257        if (at.isEnumeration())
  • trunk/www/lims/arraydesigns/edit_design.jsp

    r7604 r7605  
    8787    try
    8888    {
    89       defaultPlatforms = (List<Platform>)activeProject.findDefaultItems(dc, Item.PLATFORM, true);
     89      defaultPlatforms = activeProject.findDefaultItems(dc, Item.PLATFORM, true);
    9090    }
    9191    catch (PermissionDeniedException pdex)
     
    9393    try
    9494    {
    95       defaultVariants = (List<PlatformVariant>)activeProject.findDefaultItems(dc, Item.PLATFORMVARIANT, true);
     95      defaultVariants = activeProject.findDefaultItems(dc, Item.PLATFORMVARIANT, true);
    9696    }
    9797    catch (PermissionDeniedException pdex)
  • trunk/www/lims/arraydesigns/features/view_feature.jsp

    r7604 r7605  
    298298              {
    299299                String name = ep.getName();
    300                 @SuppressWarnings("rawtypes")
    301                 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
     300                Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
    302301                String value = f.format(reporter.getExtended(name));
    303302                %>
  • trunk/www/lims/arraydesigns/index.jsp

    r7604 r7605  
    169169    final int maxRecent = Base.getMaxRecent(sc);
    170170    dc = sc.newDbControl();
    171     ArrayDesign design = (ArrayDesign)cc.getObject("item");
     171    ArrayDesign design = cc.getObject("item");
    172172   
    173173    String[] pv = request.getParameter("platform").split(":");
     
    416416    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    417417    dc = sc.newDbControl();
    418     ArrayDesign design = (ArrayDesign)cc.getObject("item");
     418    ArrayDesign design = cc.getObject("item");
    419419    dc.reattachItem(design, false);
    420420   
  • trunk/www/lims/arraydesigns/list_designs.jsp

    r7604 r7605  
    356356      {
    357357        AnnotationType at = loader.getAnnotationType();
    358         @SuppressWarnings("rawtypes")
    359         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     358        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    360359        Enumeration<String, String> annotationEnum = null;
    361360        if (at.isEnumeration())
  • trunk/www/lims/arrayslides/create_wizard.jsp

    r6684 r7605  
    6464 
    6565  // Load recently used items
    66   List<ArrayBatch> recentArrayBatches = (List<ArrayBatch>)cc.getRecent(dc, Item.ARRAYBATCH);
     66  List<ArrayBatch> recentArrayBatches = cc.getRecent(dc, Item.ARRAYBATCH);
    6767
    6868  title = "Create array slides";
  • trunk/www/lims/arrayslides/edit_slide.jsp

    r7604 r7605  
    7575 
    7676  // Load recently used items
    77   List<ArrayBatch> recentArrayBatches = (List<ArrayBatch>)cc.getRecent(dc, Item.ARRAYBATCH);
     77  List<ArrayBatch> recentArrayBatches = cc.getRecent(dc, Item.ARRAYBATCH);
    7878
    7979  if (itemId == 0)
  • trunk/www/lims/arrayslides/index.jsp

    r7604 r7605  
    146146    final int maxRecent = Base.getMaxRecent(sc);
    147147    dc = sc.newDbControl();
    148     ArraySlide slide = (ArraySlide)cc.getObject("item");
     148    ArraySlide slide = cc.getObject("item");
    149149    if (slide == null)
    150150    {
  • trunk/www/lims/arrayslides/list_slides.jsp

    r7604 r7605  
    262262      {
    263263        AnnotationType at = loader.getAnnotationType();
    264         @SuppressWarnings("rawtypes")
    265         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     264        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    266265        Enumeration<String, String> annotationEnum = null;
    267266        if (at.isEnumeration())
  • trunk/www/lims/geometries/index.jsp

    r7604 r7605  
    156156    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    157157    dc = sc.newDbControl();
    158     PlateGeometry geometry = (PlateGeometry)cc.getObject("item");
     158    PlateGeometry geometry = cc.getObject("item");
    159159    if (geometry == null)
    160160    {
  • trunk/www/lims/platemappings/index.jsp

    r7604 r7605  
    138138    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    139139    dc = sc.newDbControl();
    140     PlateMapping mapping = (PlateMapping)cc.getObject("item");
     140    PlateMapping mapping = cc.getObject("item");
    141141    if (mapping == null)
    142142    {
  • trunk/www/lims/plates/events/edit_event.jsp

    r7604 r7605  
    9494
    9595  // Load recently used items
    96   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL);
    97   List<Hardware> recentHardware = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE);
     96  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL);
     97  List<Hardware> recentHardware = cc.getRecent(dc, Item.HARDWARE);
    9898
    9999  ItemResultList<PlateEventType> eventTypes = null;
     
    121121    }
    122122   
    123     eventDate = (Date)cc.getPropertyObject("eventDate");
     123    eventDate = cc.getPropertyObject("eventDate");
    124124  }
    125125  else
  • trunk/www/lims/plates/events/index.jsp

    r7604 r7605  
    136136    final int maxRecent = Base.getMaxRecent(sc);
    137137    dc = sc.newDbControl();
    138     PlateEvent event = (PlateEvent)cc.getObject("item");
     138    PlateEvent event = cc.getObject("item");
    139139    if (event == null)
    140140    {
  • trunk/www/lims/plates/index.jsp

    r7604 r7605  
    139139    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    140140    dc = sc.newDbControl();
    141     Plate plate = (Plate)cc.getObject("item");
     141    Plate plate = cc.getObject("item");
    142142    if (plate == null)
    143143    {
  • trunk/www/lims/plates/list_plates.jsp

    r7604 r7605  
    295295      {
    296296        AnnotationType at = loader.getAnnotationType();
    297         @SuppressWarnings("rawtypes")
    298         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     297        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    299298        Enumeration<String, String> annotationEnum = null;
    300299        if (at.isEnumeration())
  • trunk/www/lims/plates/merge_plates.jsp

    r6312 r7605  
    5454 
    5555  // Load recently used items
    56   List<PlateMapping> recentPlateMappings = (List<PlateMapping>)cc.getRecent(dc, Item.PLATEMAPPING);
    57   List<PlateType> recentPlateTypes = (List<PlateType>)cc.getRecent(dc, Item.PLATETYPE);
     56  List<PlateMapping> recentPlateMappings = cc.getRecent(dc, Item.PLATEMAPPING);
     57  List<PlateType> recentPlateTypes = cc.getRecent(dc, Item.PLATETYPE);
    5858  %>
    5959
  • trunk/www/lims/plates/wells/index.jsp

    r7604 r7605  
    129129    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    130130    dc = sc.newDbControl();
    131     Well well = (Well)cc.getObject("item");
     131    Well well = cc.getObject("item");
    132132    dc.reattachItem(well, false);
    133133    message = "Well updated";
  • trunk/www/lims/plates/wells/list_wells.jsp

    r7604 r7605  
    364364        AnnotationType at = loader.getAnnotationType();
    365365        Enumeration<String, String> annotationEnum = null;
    366         @SuppressWarnings("rawtypes")
    367         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     366        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    368367        if (at.isEnumeration())
    369368        {
  • trunk/www/lims/plates/wells/view_well.jsp

    r7604 r7605  
    309309              {
    310310                String name = ep.getName();
    311                 @SuppressWarnings("rawtypes")
    312                 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
     311                Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
    313312                String value = f.format(reporter.getExtended(name));
    314313                %>
  • trunk/www/lims/platetypes/eventtypes/edit_eventtype.jsp

    r7604 r7605  
    7878 
    7979  // Load recently used items
    80   List<ItemSubtype> recentProtocolTypes = (List<ItemSubtype>)cc.getRecent(dc, Item.ITEMSUBTYPE);
     80  List<ItemSubtype> recentProtocolTypes = cc.getRecent(dc, Item.ITEMSUBTYPE);
    8181
    8282  if (itemId == 0)
  • trunk/www/lims/platetypes/eventtypes/index.jsp

    r7604 r7605  
    131131    final int maxRecent = Base.getMaxRecent(sc);
    132132    dc = sc.newDbControl();
    133     PlateEventType eventType = (PlateEventType)cc.getObject("item");
     133    PlateEventType eventType = cc.getObject("item");
    134134    if (eventType == null)
    135135    {
  • trunk/www/lims/platetypes/index.jsp

    r7604 r7605  
    160160    final int maxRecent = Base.getMaxRecent(sc);
    161161    dc = sc.newDbControl();
    162     PlateType plateType = (PlateType)cc.getObject("item");
     162    PlateType plateType = cc.getObject("item");
    163163    if (plateType == null)
    164164    {
  • trunk/www/login.jsp

    r7540 r7605  
    179179        User user = User.getById(dc, sc.getLoggedInUserId());
    180180        JspContext context = ExtensionsControl.createContext(dc, pageContext, null, user);
    181         ExtensionsInvoker<StartPageAction> invoker = (ExtensionsInvoker<StartPageAction>)ExtensionsControl.useExtensions(context, "net.sf.basedb.clients.web.start-page");
     181        ExtensionsInvoker<StartPageAction> invoker = ExtensionsControl.useExtensions(context, "net.sf.basedb.clients.web.start-page");
    182182        Iterator<StartPageAction> it = invoker.iterator();
    183183        while (it.hasNext())
  • trunk/www/logout.jsp

    r6607 r7605  
    5252    if (sc.isImpersonated())
    5353    {
    54       SessionControl original = (SessionControl)sc.getSessionSetting("impersonate.originalSessionControl");
     54      SessionControl original = sc.getSessionSetting("impersonate.originalSessionControl");
    5555      boolean revert = Values.getBoolean(request.getParameter("revert"));
    5656      if (revert)
     
    8686        if (sc.isImpersonated())
    8787        {
    88           User originalUser = (User)sc.getSessionSetting("impersonate.originalUser");
     88          User originalUser = sc.getSessionSetting("impersonate.originalUser");
    8989          if (originalUser != null)
    9090          {
  • trunk/www/main.jsp

    r7540 r7605  
    8686  ItemResultIterator<News> news = null;
    8787  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext);
    88   ExtensionsInvoker<LoginFormAction> invoker = (ExtensionsInvoker<LoginFormAction>)ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.login-form");
     88  ExtensionsInvoker<LoginFormAction> invoker = ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.login-form");
    8989
    9090  LoginFormAction loginAction = null;
  • trunk/www/my_base/projects/edit_project.jsp

    r7604 r7605  
    142142  PermissionTemplate currentPermissionTemplate = null;
    143143
    144   List<PermissionTemplate> recentPermissionTemplates = (List<PermissionTemplate>)cc.getRecent(dc, Item.PERMISSIONTEMPLATE);
     144  List<PermissionTemplate> recentPermissionTemplates = cc.getRecent(dc, Item.PERMISSIONTEMPLATE);
    145145
    146146  if (itemId == 0)
  • trunk/www/my_base/projects/index.jsp

    r7604 r7605  
    146146    final int maxRecent = Base.getMaxRecent(sc);
    147147    dc = sc.newDbControl();
    148     Project project = (Project)cc.getObject("item");
     148    Project project = cc.getObject("item");
    149149    if (project == null)
    150150    {
  • trunk/www/my_base/projects/items/list_items.jsp

    r7604 r7605  
    129129  int numListed = 0;
    130130  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, project);
    131   ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext, 
     131  ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext, 
    132132      "net.sf.basedb.clients.web.toolbar.list.all",
    133133      "net.sf.basedb.clients.web.toolbar.list.projectitems");
    134   ExtensionsInvoker<ListColumnAction<BasicItem, ?>> columnsInvoker = (ExtensionsInvoker<ListColumnAction<BasicItem, ?>>)ExtensionsControl.useExtensions(jspContext,
     134  ExtensionsInvoker<ListColumnAction<BasicItem, ?>> columnsInvoker = ExtensionsControl.useExtensions(jspContext,
    135135      "net.sf.basedb.clients.web.listcolumn.projectitems");
    136136  %>
  • trunk/www/my_base/projects/list_projects.jsp

    r7604 r7605  
    205205        AnnotationType at = loader.getAnnotationType();
    206206        Enumeration<String, String> annotationEnum = null;
    207         @SuppressWarnings("rawtypes")
    208         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     207        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    209208        if (at.isEnumeration())
    210209        {
  • trunk/www/my_base/user/preferences.jsp

    r7502 r7605  
    126126
    127127  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, user);
    128   ExtensionsInvoker<StartPageAction> invoker = (ExtensionsInvoker<StartPageAction>)ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.start-page");
    129   ExtensionsInvoker<TabAction> tabsInvoker = (ExtensionsInvoker<TabAction>)ExtensionsControl.useExtensions(jspContext, EditUtil.EP_PREFIX_EDIT+"user-preferences");
     128  ExtensionsInvoker<StartPageAction> invoker = ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.start-page");
     129  ExtensionsInvoker<TabAction> tabsInvoker = ExtensionsControl.useExtensions(jspContext, EditUtil.EP_PREFIX_EDIT+"user-preferences");
    130130  %>
    131131  <base:page type="popup" title="<%="Preferences for "+HTML.encodeTags(user.getName())%>" id="preferences">
  • trunk/www/my_base/user/reset_filters.jsp

    r7604 r7605  
    5656  final Set<Item> items = new TreeSet<Item>(new ToStringComparator<Item>(false));
    5757  final Set<Item> dbOnly = new HashSet<Item>();
    58   Iterator<ItemContext> it = new NestedIterator<>(inMemory, inDatabase);
     58  Iterator<ItemContext> it = new NestedIterator<ItemContext>(inMemory, inDatabase);
    5959  for (ItemContext ctx : inMemory)
    6060  {
  • trunk/www/my_base/user/settings.jsp

    r7587 r7605  
    100100  String htmlDateTimeFormat = HTML.encodeTags(dateTimeFormat);
    101101  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, user);
    102   ExtensionsInvoker<TabAction> tabsInvoker = (ExtensionsInvoker<TabAction>)ExtensionsControl.useExtensions(jspContext, EditUtil.EP_PREFIX_EDIT+"user-information");
     102  ExtensionsInvoker<TabAction> tabsInvoker = ExtensionsControl.useExtensions(jspContext, EditUtil.EP_PREFIX_EDIT+"user-information");
    103103%>
    104104  <base:page type="popup" title="<%=title%>">
  • trunk/www/my_base/user/submit_user.jsp

    r7604 r7605  
    8080      );
    8181    }
    82     User user = (User)sc.getSessionSetting("user");
     82    User user = sc.getSessionSetting("user");
    8383    dc.reattachItem(user, false);
    8484
    8585    JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, user);
    86     ExtensionsInvoker<OnSaveAction> invoker = (ExtensionsInvoker<OnSaveAction>)ExtensionsControl.useExtensions(jspContext, EditUtil.EP_PREFIX_SAVE+"user-information");
     86    ExtensionsInvoker<OnSaveAction> invoker = ExtensionsControl.useExtensions(jspContext, EditUtil.EP_PREFIX_SAVE+"user-information");
    8787    try
    8888    {
     
    150150  {
    151151    String verificationCode = request.getParameter("verificationCode");
    152     User user = (User)sc.getSessionSetting("user");
     152    User user = sc.getSessionSetting("user");
    153153    dc.reattachItem(user, false);
    154154    user.enableDeviceVerification(verificationCode);
     
    160160    User user = User.getById(dc, sc.getLoggedInUserId());
    161161    JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, user);
    162     ExtensionsInvoker<OnSaveAction> invoker = (ExtensionsInvoker<OnSaveAction>)ExtensionsControl.useExtensions(jspContext, EditUtil.EP_PREFIX_SAVE+"user-information");
     162    ExtensionsInvoker<OnSaveAction> invoker = ExtensionsControl.useExtensions(jspContext, EditUtil.EP_PREFIX_SAVE+"user-information");
    163163    try
    164164    {
  • trunk/www/plugins/net/sf/basedb/clients/web/plugins/simple_export.jsp

    r7090 r7605  
    4646final String subContext = Values.getString(request.getParameter("subcontext"), "");
    4747final ItemContext cc = sc.getCurrentContext(itemType, subContext);
    48 final String defaultColumns = (String)cc.getObject("defaultColumns");
    49 String errorMessage = (String)sc.getSessionSetting("plugin.configure.errors.message");
    50 List<Throwable> errors = (List<Throwable>)sc.getSessionSetting("plugin.configure.errors.list");
     48final String defaultColumns = cc.getObject("defaultColumns");
     49String errorMessage = sc.getSessionSetting("plugin.configure.errors.message");
     50List<Throwable> errors = sc.getSessionSetting("plugin.configure.errors.list");
    5151%>
    5252  <base:page type="popup" title="Export">
  • trunk/www/plugins/net/sf/basedb/plugins/executor/external_plugin_parameters.jsp

    r6986 r7605  
    6666try
    6767{
    68   PluginDefinition plugin = (PluginDefinition)sc.getSessionSetting("plugin.configure.plugin"); 
    69   PluginConfiguration pluginConfig = (PluginConfiguration)sc.getSessionSetting("plugin.configure.config");
    70   PluginConfigurationRequest pcRequest = (PluginConfigurationRequest)sc.getSessionSetting("plugin.configure.request");
     68  PluginDefinition plugin = sc.getSessionSetting("plugin.configure.plugin"); 
     69  PluginConfiguration pluginConfig = sc.getSessionSetting("plugin.configure.config");
     70  PluginConfigurationRequest pcRequest = sc.getSessionSetting("plugin.configure.request");
    7171  RequestInformation ri = pcRequest.getRequestInformation();
    7272  String title = HTML.encodeTags(ri.getTitle());
     
    7575  if (helpText == null) helpText = plugin.getDescription();
    7676
    77   String errorMessage = (String)sc.getSessionSetting("plugin.configure.errors.message");
    78   List<Throwable> errors = (List<Throwable>)sc.getSessionSetting("plugin.configure.errors.list");
     77  String errorMessage = sc.getSessionSetting("plugin.configure.errors.message");
     78  List<Throwable> errors = sc.getSessionSetting("plugin.configure.errors.list");
    7979 
    8080  String xml = request.getParameter("parameter:externalParameters");
  • trunk/www/plugins/net/sf/basedb/plugins/jep_extra_value_calculator.jsp

    r7604 r7605  
    6666final String ID = sc.getId();
    6767ItemContext cc = sc.getCurrentContext(Item.BIOASSAYSET);
    68 ItemContext realContext = (ItemContext)sc.getSessionSetting("plugin.configure.currentContext");
     68ItemContext realContext = sc.getSessionSetting("plugin.configure.currentContext");
    6969if (realContext == null) realContext = cc;
    7070DbControl dc = null;
    7171try
    7272{
    73   String errorMessage = (String)sc.getSessionSetting("plugin.configure.errors.message");
    74   List<Throwable> errors = (List<Throwable>)sc.getSessionSetting("plugin.configure.errors.list");
     73  String errorMessage = sc.getSessionSetting("plugin.configure.errors.message");
     74  List<Throwable> errors = sc.getSessionSetting("plugin.configure.errors.list");
    7575
    7676  dc = sc.newDbControl();
    77   Job job = (Job)sc.getSessionSetting("plugin.configure.job");
     77  Job job = sc.getSessionSetting("plugin.configure.job");
    7878  dc.reattachItem(job, false);
    7979  BioAssaySet source = null;
    80   if (job != null) source = (BioAssaySet)job.getParameterValue("source");
     80  if (job != null) source = job.getParameterValue("source");
    8181  if (source == null && cc.getId() != 0) source = BioAssaySet.getById(dc, cc.getId());
    8282  if (source == null) throw new WebException("popup", "No current bioassay set",
     
    8989  //Find selected bioassays
    9090  List<BioAssay> bioAssays = null;
    91   if (job != null) bioAssays = (List<BioAssay>)job.getParameterValues("bioAssays");
     91  if (job != null) bioAssays = job.getParameterValues("bioAssays");
    9292  if (bioAssays == null)
    9393  {
     
    113113
    114114  // Current parameter values
    115   ExtraValueType currentExtraValueType = (ExtraValueType)job.getParameterValue("extraValueType");
    116   String expression = (String)job.getParameterValue("expression");
     115  ExtraValueType currentExtraValueType = job.getParameterValue("extraValueType");
     116  String expression = job.getParameterValue("expression");
    117117 
    118118 
     
    134134 
    135135  // Load recently used items
    136   List<ExtraValueType> recentExtraValueTypes = (List<ExtraValueType>)realContext.getRecent(dc, Item.EXTRAVALUETYPE);
     136  List<ExtraValueType> recentExtraValueTypes = realContext.getRecent(dc, Item.EXTRAVALUETYPE);
    137137  %>
    138138  <base:page type="popup" title="Calculate extra value">
  • trunk/www/plugins/net/sf/basedb/plugins/jep_filter.jsp

    r7604 r7605  
    7070try
    7171{
    72   String errorMessage = (String)sc.getSessionSetting("plugin.configure.errors.message");
    73   List<Throwable> errors = (List<Throwable>)sc.getSessionSetting("plugin.configure.errors.list");
     72  String errorMessage = sc.getSessionSetting("plugin.configure.errors.message");
     73  List<Throwable> errors = sc.getSessionSetting("plugin.configure.errors.list");
    7474 
    7575  dc = sc.newDbControl();
    76   Job job = (Job)sc.getSessionSetting("plugin.configure.job");
     76  Job job = sc.getSessionSetting("plugin.configure.job");
    7777  dc.reattachItem(job, false);
    78   BioAssaySet source = null;
    79   source = (BioAssaySet)job.getParameterValue("source");
     78  BioAssaySet source = job.getParameterValue("source");
    8079  if (source == null && cc.getId() != 0) source = BioAssaySet.getById(dc, cc.getId());
    8180  if (source == null) throw new WebException("popup", "No current bioassay set",
     
    8786 
    8887  // Find selected bioassays
    89   List<BioAssay> bioAssays = null;
    90   bioAssays = (List<BioAssay>)job.getParameterValues("bioAssays");
     88  List<BioAssay> bioAssays = job.getParameterValues("bioAssays");
    9189  if (bioAssays == null)
    9290  {
     
    112110
    113111  // Current parameter values
    114   String childName = Values.getString((String)job.getParameterValue("childName"),
     112  String childName = Values.getString(job.getParameterValue("childName"),
    115113    source.getName().startsWith("Filtered") ? "" : "Filtered " + source.getName());
    116   String childDescription = (String)job.getParameterValue("childDescription");
    117   String expression = (String)job.getParameterValue("expression");
    118   Integer includeLimit = (Integer)job.getParameterValue("includeLimit");
    119   Integer excludeLimit = (Integer)job.getParameterValue("excludeLimit");
     114  String childDescription = job.getParameterValue("childDescription");
     115  String expression = job.getParameterValue("expression");
     116  Integer includeLimit = job.getParameterValue("includeLimit");
     117  Integer excludeLimit = job.getParameterValue("excludeLimit");
    120118 
    121119  // Predefined formulas
  • trunk/www/plugins/net/sf/basedb/plugins/jep_intensity_transformer.jsp

    r6320 r7605  
    5656try
    5757{
    58   String errorMessage = (String)sc.getSessionSetting("plugin.configure.errors.message");
    59   List<Throwable> errors = (List<Throwable>)sc.getSessionSetting("plugin.configure.errors.list");
    60  
    61   PluginConfigurationRequest pcRequest = (PluginConfigurationRequest)sc.getSessionSetting("plugin.configure.request");
     58  String errorMessage = sc.getSessionSetting("plugin.configure.errors.message");
     59  List<Throwable> errors = sc.getSessionSetting("plugin.configure.errors.list");
     60 
     61  PluginConfigurationRequest pcRequest = sc.getSessionSetting("plugin.configure.request");
    6262  RequestInformation info = pcRequest.getRequestInformation();
    6363 
    6464  dc = sc.newDbControl();
    65   Job job = (Job)sc.getSessionSetting("plugin.configure.job");
     65  Job job = sc.getSessionSetting("plugin.configure.job");
    6666  dc.reattachItem(job, false);
    6767  BioAssaySet source = null;
  • trunk/www/switch.jsp

    r7542 r7605  
    6464{
    6565  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext);
    66   ExtensionsInvoker<LoginFormAction> invoker = (ExtensionsInvoker<LoginFormAction>)ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.login-form");
     66  ExtensionsInvoker<LoginFormAction> invoker = ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.login-form");
    6767
    6868  LoginFormAction loginAction = null;
  • trunk/www/views/derivedbioassays/edit_bioassay.jsp

    r7604 r7605  
    163163      {
    164164        // Find most recently used related subtype
    165         List<ItemSubtype> recentSubtypes = (List<ItemSubtype>)cc.getRecent(dc, Item.ITEMSUBTYPE);
     165        List<ItemSubtype> recentSubtypes = cc.getRecent(dc, Item.ITEMSUBTYPE);
    166166        currentSubtype = ListUtil.findFirstCommon(recentSubtypes, relatedToParent, relatedToParent.get(0));
    167167      }
     
    250250  {
    251251    Project activeProject = Project.getById(dc, activeProjectId);
    252     defaultProtocols = (List<Protocol>)activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.PROTOCOL);
    253     defaultHardware = (List<Hardware>)activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.HARDWARE);
    254     defaultSoftware = (List<Software>)activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.SOFTWARE);
     252    defaultProtocols = activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.PROTOCOL);
     253    defaultHardware = activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.HARDWARE);
     254    defaultSoftware = activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.SOFTWARE);
    255255  }
    256256
    257257  // Load recently used items
    258   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL, currentSubtype);
    259   List<Kit> recentKits = (List<Kit>)cc.getRecent(dc, Item.KIT, currentSubtype);
    260   List<Hardware> recentHardware = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE, currentSubtype);
    261   List<Software> recentSoftware = (List<Software>)cc.getRecent(dc, Item.SOFTWARE, currentSubtype);
     258  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL, currentSubtype);
     259  List<Kit> recentKits = cc.getRecent(dc, Item.KIT, currentSubtype);
     260  List<Hardware> recentHardware = cc.getRecent(dc, Item.HARDWARE, currentSubtype);
     261  List<Software> recentSoftware = cc.getRecent(dc, Item.SOFTWARE, currentSubtype);
    262262 
    263263  // Query to retrieve item types
  • trunk/www/views/derivedbioassays/index.jsp

    r7604 r7605  
    199199    dc = sc.newDbControl();
    200200   
    201     DerivedBioAssay bas = (DerivedBioAssay)cc.getObject("item");
     201    DerivedBioAssay bas = cc.getObject("item");
    202202    if (bas == null)
    203203    {
  • trunk/www/views/derivedbioassays/list_bioassays.jsp

    r7604 r7605  
    366366      {
    367367        AnnotationType at = loader.getAnnotationType();
    368         @SuppressWarnings("rawtypes")
    369         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     368        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    370369        Enumeration<String, String> annotationEnum = null;
    371370        if (at.isEnumeration())
  • trunk/www/views/devices/index.jsp

    r7604 r7605  
    125125    final int maxRecent = Base.getMaxRecent(sc);
    126126    dc = sc.newDbControl();
    127     UserDevice device = (UserDevice)cc.getObject("item");
     127    UserDevice device = cc.getObject("item");
    128128    if (device == null)
    129129    {
  • trunk/www/views/experiments/bioassays/index.jsp

    r7604 r7605  
    140140    // Update the properties on an item (will close the popup)
    141141    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    142     BioAssay ba = (BioAssay)cc.getObject("item");
     142    BioAssay ba = cc.getObject("item");
    143143    if (ba != null)
    144144    {
  • trunk/www/views/experiments/bioassays/list_bioassays.jsp

    r7604 r7605  
    155155      guiContext, bioAssaySet);
    156156  ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext);
    157   ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = (ExtensionsInvoker<OverviewPlotAction>)ExtensionsControl.useExtensions(jspContext,
     157  ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = ExtensionsControl.useExtensions(jspContext,
    158158      "net.sf.basedb.clients.web.bioassayset.overviewplots");
    159159  %>
     
    279279        AnnotationType at = loader.getAnnotationType();
    280280        Enumeration<String, String> annotationEnum = null;
    281         @SuppressWarnings("rawtypes")
    282         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     281        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    283282        if (at.isEnumeration())
    284283        {
     
    314313      {
    315314        Enumeration<String, String> annotationEnum = null;
    316         @SuppressWarnings("rawtypes")
    317         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     315        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    318316        if (at.isEnumeration())
    319317        {
  • trunk/www/views/experiments/bioassaysets/analysis_tree.jsp

    r7604 r7605  
    337337  }
    338338  // Contains the ID:s of the bioassaysets that are closed in the tree
    339   Collection<String> closed = (Collection<String>)cc.getObject("closed");
     339  Collection<String> closed = cc.getObject("closed");
    340340  int numListed = 0;
    341341 
    342342  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext,
    343343    guiContext, root == null ? experiment : root);
    344   ExtensionsInvoker<ButtonAction> toolsInvoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext,
     344  ExtensionsInvoker<ButtonAction> toolsInvoker = ExtensionsControl.useExtensions(jspContext,
    345345      "net.sf.basedb.clients.web.bioassayset.list.tools");
    346346  ExtensionsInvoker<ButtonAction> toolbarInvoker = ToolbarUtil.useExtensions(jspContext);
     
    478478        AnnotationType at = loader.getAnnotationType();
    479479        Enumeration<String, String> annotationEnum = null;
    480         @SuppressWarnings("rawtypes")
    481         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     480        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    482481        if (at.isEnumeration())
    483482        {
  • trunk/www/views/experiments/bioassaysets/index.jsp

    r7604 r7605  
    206206    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    207207   
    208     BioAssaySet bas = (BioAssaySet)cc.getObject("item");
     208    BioAssaySet bas = cc.getObject("item");
    209209    if (bas != null)
    210210    {
  • trunk/www/views/experiments/bioassaysets/view_bioassayset.jsp

    r7604 r7605  
    148148  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, bioAssaySet);
    149149  ExtensionsInvoker<ButtonAction> toolbarInvoker = ToolbarUtil.useExtensions(jspContext);
    150   ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = (ExtensionsInvoker<OverviewPlotAction>)ExtensionsControl.useExtensions(jspContext,
     150  ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = ExtensionsControl.useExtensions(jspContext,
    151151      "net.sf.basedb.clients.web.bioassayset.overviewplots");
    152152  %>
  • trunk/www/views/experiments/clone_reporters.jsp

    r6315 r7605  
    7676  }
    7777 
    78   List<ReporterCloneTemplate> recentTemplates = (List<ReporterCloneTemplate>)cc.getRecent(dc, Item.REPORTERCLONETEMPLATE);
     78  List<ReporterCloneTemplate> recentTemplates = cc.getRecent(dc, Item.REPORTERCLONETEMPLATE);
    7979  %>
    8080  <base:page type="popup" title="<%=title%>">
  • trunk/www/views/experiments/edit_experiment.jsp

    r7604 r7605  
    9595  Directory currentDirectory = null;
    9696
    97   List<Directory> recentDirectories = (List<Directory>)cc.getRecent(dc, Item.DIRECTORY);
     97  List<Directory> recentDirectories = cc.getRecent(dc, Item.DIRECTORY);
    9898
    9999  int activeProjectId = sc.getActiveProjectId();
     
    374374            <input class="text" style="width: 15em;" type="text" name="publicationDate" id="publicationDate"
    375375              value="<%=HTML.encodeTags(dateFormatter.format(experiment == null ?
    376                 (Date)cc.getPropertyObject("publicationDate") : experiment.getPublicationDate()))%>"
     376                cc.getPropertyObject("publicationDate") : experiment.getPublicationDate()))%>"
    377377              maxlength="20" title="Enter date in format: <%=htmlDateFormat%>">
    378378          </td>
  • trunk/www/views/experiments/index.jsp

    r7604 r7605  
    158158    dc = sc.newDbControl();
    159159   
    160     Experiment experiment = (Experiment)cc.getObject("item");
     160    Experiment experiment = cc.getObject("item");
    161161    if (experiment == null)
    162162    {
  • trunk/www/views/experiments/list_experiments.jsp

    r7604 r7605  
    334334      {
    335335        AnnotationType at = loader.getAnnotationType();
    336         @SuppressWarnings("rawtypes")
    337         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     336        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    338337        Enumeration<String, String> annotationEnum = null;
    339338        if (at.isEnumeration())
  • trunk/www/views/experiments/rootrawbioassays/index.jsp

    r7604 r7605  
    8585    // Update the properties on an item (will close the popup)
    8686    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    87     RootRawBioAssay ba = (RootRawBioAssay)cc.getObject("item");
     87    RootRawBioAssay ba = cc.getObject("item");
    8888    if (ba != null)
    8989    {
  • trunk/www/views/experiments/rootrawbioassays/view_bioassay.jsp

    r7604 r7605  
    273273               
    274274                List<?> values = null;
    275                 @SuppressWarnings("rawtypes")
    276                 Formatter formatter = FormatterFactory.getTypeFormatter(sc, valueType);
     275                Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, valueType);
    277276                Nameable parentItem = null;
    278277                String parentType = "";
  • trunk/www/views/experiments/spotdata/list_spotdata.jsp

    r7604 r7605  
    145145  ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext);
    146146  ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = bioAssay != null ?
    147     null : (ExtensionsInvoker<OverviewPlotAction>)ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.bioassayset.overviewplots");
     147    null : ExtensionsControl.useExtensions(jspContext, "net.sf.basedb.clients.web.bioassayset.overviewplots");
    148148  %>
    149149  <base:page title="<%=title%>">
  • trunk/www/views/experiments/transformations/index.jsp

    r7604 r7605  
    117117    // Update the properties on an item (will close the popup)
    118118    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
    119     Transformation t = (Transformation)cc.getObject("item");
     119    Transformation t = cc.getObject("item");
    120120    if (t != null)
    121121    {
  • trunk/www/views/experiments/view_experiment.jsp

    r7604 r7605  
    625625          {
    626626            Set<Object> values = entry.getValue();
    627             @SuppressWarnings("rawtypes")
    628             Formatter formatter = FormatterFactory.getTypeFormatter(sc, valueType);
     627            Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, valueType);
    629628            Unit unit = at.getDefaultUnit();
    630629            if (unit != null) formatter = unit.getFormatter(formatter);
  • trunk/www/views/formulas/index.jsp

    r7604 r7605  
    144144    final int maxRecent = Base.getMaxRecent(sc);
    145145    dc = sc.newDbControl();
    146     Formula formula = (Formula)cc.getObject("item");
     146    Formula formula = cc.getObject("item");
    147147    if (formula == null)
    148148    {
  • trunk/www/views/itemlists/index.jsp

    r7604 r7605  
    223223    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    224224    dc = sc.newDbControl();
    225     ItemList list = (ItemList)cc.getObject("item");
     225    ItemList list = cc.getObject("item");
    226226   
    227227    if (list == null)
     
    280280          boolean useSyncFilter = false;
    281281          ItemContext filterContext = sc.getCurrentContext(list.getMemberType(), subContext);
    282           ItemQuery<? extends Listable> query = (ItemQuery<? extends Listable>)filterContext.getQuery();
     282          ItemQuery<? extends Listable> query = filterContext.getQuery();
    283283          if ("all".equals(source))
    284284          {
     
    498498    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    499499    dc = sc.newDbControl();
    500     ItemList itemList = (ItemList)cc.getObject("item");
     500    ItemList itemList = cc.getObject("item");
    501501    dc.reattachItem(itemList, false);
    502502   
  • trunk/www/views/itemlists/list_lists.jsp

    r7604 r7605  
    290290        AnnotationType at = loader.getAnnotationType();
    291291        Enumeration<String, String> annotationEnum = null;
    292         @SuppressWarnings("rawtypes")
    293         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     292        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    294293        if (at.isEnumeration())
    295294        {
  • trunk/www/views/itemlists/members/list_members.jsp

    r7604 r7605  
    296296        AnnotationType at = loader.getAnnotationType();
    297297        Enumeration<String, String> annotationEnum = null;
    298         @SuppressWarnings("rawtypes")
    299         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     298        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    300299        if (at.isEnumeration())
    301300        {
  • trunk/www/views/itemlists/syncfilter/ajax.jsp

    r7564 r7605  
    7575    // Get the current sync filter item we are editing
    7676    ItemContext cc = sc.getCurrentContext(Item.SYNCFILTER);
    77     SyncFilter syncFilter = (SyncFilter)cc.getObject("item");
     77    SyncFilter syncFilter = cc.getObject("item");
    7878   
    7979    // Get the requested source item type in the edit dialog
     
    104104    {
    105105      ItemContext cc = sc.getCurrentContext(Item.SYNCFILTER);
    106       syncFilter = (SyncFilter)cc.getObject("item");
     106      syncFilter = cc.getObject("item");
    107107    }
    108108    else
     
    139139      // Get the current sync filter item we are editing
    140140      ItemContext cc = sc.getCurrentContext(Item.SYNCFILTER);
    141       syncFilter = (SyncFilter)cc.getObject("item");
     141      syncFilter = cc.getObject("item");
    142142
    143143      // Get the requested source item type in the edit dialog
  • trunk/www/views/itemlists/syncfilter/index.jsp

    r7604 r7605  
    105105    dc = sc.newDbControl();
    106106   
    107     SyncFilter syncFilter = (SyncFilter)cc.getObject("item");
     107    SyncFilter syncFilter = cc.getObject("item");
    108108    if (syncFilter.isInDatabase())
    109109    {
  • trunk/www/views/items/list_items.jsp

    r7604 r7605  
    127127  int numListed = 0;
    128128  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext);
    129   ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext, 
     129  ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext, 
    130130      "net.sf.basedb.clients.web.toolbar.list.all",
    131131      "net.sf.basedb.clients.web.toolbar.list.allitems");
    132   ExtensionsInvoker<ListColumnAction<BasicItem,?>> columnsInvoker =  (ExtensionsInvoker<ListColumnAction<BasicItem,?>>)ExtensionsControl.useExtensions(jspContext,
     132  ExtensionsInvoker<ListColumnAction<BasicItem,?>> columnsInvoker =  ExtensionsControl.useExtensions(jspContext,
    133133      "net.sf.basedb.clients.web.listcolumn.allitems");
    134134  %>
  • trunk/www/views/permissiontemplates/index.jsp

    r7604 r7605  
    135135    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    136136    dc = sc.newDbControl();
    137     PermissionTemplate template = (PermissionTemplate)cc.getObject("item");
     137    PermissionTemplate template = cc.getObject("item");
    138138    if (template == null)
    139139    {
  • trunk/www/views/physicalbioassays/edit_bioassay.jsp

    r7604 r7605  
    128128    }
    129129    name = Values.getString(cc.getPropertyValue("name"), "New physical bioassay");
    130     eventDate = (Date)cc.getPropertyObject("creationEvent.eventDate");
     130    eventDate = cc.getPropertyObject("creationEvent.eventDate");
    131131   
    132132    int currentSubtypeId = Values.getInt(request.getParameter("subtype_id"));
     
    168168      {
    169169        // Find most recently used related subtype
    170         List<ItemSubtype> recentSubtypes = (List<ItemSubtype>)cc.getRecent(dc, Item.ITEMSUBTYPE);
     170        List<ItemSubtype> recentSubtypes = cc.getRecent(dc, Item.ITEMSUBTYPE);
    171171        currentSubtype = ListUtil.findFirstCommon(recentSubtypes, relatedToParent, relatedToParent.get(0));
    172172      }
     
    232232   
    233233    // Query to retrieve source extracts
    234     ItemQuery<Extract> extractsQuery = (ItemQuery<Extract>)creationEvent.getSources();
     234    ItemQuery<Extract> extractsQuery = creationEvent.getSources();
    235235    extractsQuery.include(Include.ALL);
    236236    extractsQuery.order(Orders.asc(Hql.property("srcevt", "position")));
     
    247247  {
    248248    Project activeProject = Project.getById(dc, activeProjectId);
    249     defaultProtocols = (List<Protocol>)activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.PROTOCOL);
    250     defaultHardware = (List<Hardware>)activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.HARDWARE);
     249    defaultProtocols = activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.PROTOCOL);
     250    defaultHardware = activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.HARDWARE);
    251251  }
    252252 
    253253  // Load recently used items
    254   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL, currentSubtype);
    255   List<Hardware> recentHardware = (List<Hardware>)cc.getRecent(dc, Item.HARDWARE, currentSubtype);
    256   List<Kit> recentKits = (List<Kit>)cc.getRecent(dc, Item.KIT, currentSubtype);
     254  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL, currentSubtype);
     255  List<Hardware> recentHardware = cc.getRecent(dc, Item.HARDWARE, currentSubtype);
     256  List<Kit> recentKits = cc.getRecent(dc, Item.KIT, currentSubtype);
    257257 
    258258  // Query to retrieve item types
  • trunk/www/views/physicalbioassays/index.jsp

    r7604 r7605  
    178178    final int maxRecent = Base.getMaxRecent(sc);
    179179    dc = sc.newDbControl();
    180     PhysicalBioAssay pba = (PhysicalBioAssay)cc.getObject("item");
     180    PhysicalBioAssay pba = cc.getObject("item");
    181181    BioMaterialEvent creationEvent = null;
    182182    if (pba == null)
  • trunk/www/views/physicalbioassays/list_bioassays.jsp

    r7604 r7605  
    329329      {
    330330        AnnotationType at = loader.getAnnotationType();
    331         @SuppressWarnings("rawtypes")
    332         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     331        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    333332        Enumeration<String, String> annotationEnum = null;
    334333        if (at.isEnumeration())
  • trunk/www/views/rawbioassays/edit_rawbioassay.jsp

    r7604 r7605  
    109109
    110110  // Load recently used items
    111   List<Protocol> recentProtocols = (List<Protocol>)cc.getRecent(dc, Item.PROTOCOL);
    112   List<Software> recentSoftware = (List<Software>)cc.getRecent(dc, Item.SOFTWARE);
    113   List<ArrayDesign> recentArrayDesigns = (List<ArrayDesign>)cc.getRecent(dc, Item.ARRAYDESIGN);
    114   List<File> recentFiles = (List<File>)cc.getRecent(dc, Item.FILE);
    115   List<DerivedBioAssay> recentBioAssays = (List<DerivedBioAssay>)cc.getRecent(dc, Item.DERIVEDBIOASSAY);
    116   List<Extract> recentExtracts = (List<Extract>)cc.getRecent(dc, Item.EXTRACT);
     111  List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL);
     112  List<Software> recentSoftware = cc.getRecent(dc, Item.SOFTWARE);
     113  List<ArrayDesign> recentArrayDesigns = cc.getRecent(dc, Item.ARRAYDESIGN);
     114  List<File> recentFiles = cc.getRecent(dc, Item.FILE);
     115  List<DerivedBioAssay> recentBioAssays = cc.getRecent(dc, Item.DERIVEDBIOASSAY);
     116  List<Extract> recentExtracts = cc.getRecent(dc, Item.EXTRACT);
    117117 
    118118  int activeProjectId = sc.getActiveProjectId();
     
    122122    try
    123123    {
    124       defaultProtocols = (List<Protocol>)activeProject.findDefaultItems(dc,
     124      defaultProtocols = activeProject.findDefaultItems(dc,
    125125          ItemSubtype.getById(dc, SystemItems.getId(Protocol.FEATURE_EXTRACTION)), false);
    126126    }
     
    129129    try
    130130    {
    131       defaultSoftware = (List<Software>)activeProject.findDefaultItems(dc,
     131      defaultSoftware = activeProject.findDefaultItems(dc,
    132132          ItemSubtype.getById(dc, SystemItems.getId(Software.FEATURE_EXTRACTION)), false);
    133133    }
     
    136136    try
    137137    {
    138       defaultArrayDesigns = (List<ArrayDesign>)activeProject.findDefaultItems(dc, Item.ARRAYDESIGN, true);
     138      defaultArrayDesigns = activeProject.findDefaultItems(dc, Item.ARRAYDESIGN, true);
    139139    }
    140140    catch (PermissionDeniedException pdex)
     
    142142    try
    143143    {
    144       defaultPlatforms = (List<Platform>)activeProject.findDefaultItems(dc, Item.PLATFORM, true);
     144      defaultPlatforms = activeProject.findDefaultItems(dc, Item.PLATFORM, true);
    145145    }
    146146    catch (PermissionDeniedException pdex)
     
    148148    try
    149149    {
    150       defaultVariants = (List<PlatformVariant>)activeProject.findDefaultItems(dc, Item.PLATFORMVARIANT, true);
     150      defaultVariants = activeProject.findDefaultItems(dc, Item.PLATFORMVARIANT, true);
    151151    }
    152152    catch (PermissionDeniedException pdex)
  • trunk/www/views/rawbioassays/index.jsp

    r7604 r7605  
    254254    final int maxRecent = Base.getMaxRecent(sc);
    255255    dc = sc.newDbControl();
    256     RawBioAssay rba = (RawBioAssay)cc.getObject("item");
     256    RawBioAssay rba = cc.getObject("item");
    257257   
    258258    Platform platform = null;
     
    663663  }
    664664
    665 
    666   /*
    667   else if ("ImportRawData".equals(cmd))
    668   {
    669     RawBioAssay rba = (RawBioAssay)sc.getSessionSetting(itemType.name()+".item");
    670     ItemContext context = sc.getCurrentContext(itemType);
    671     context.setId(rba.getId());
    672     redirect = "../../common/import/configure.jsp?ID="+ID+"&item_type="+itemType.name()+"&context_type=ITEM&title=Import+raw+data+for+"+HTML.urlEncode(rba.getName());
    673 
    674   }
    675   */
    676665}
    677666finally
  • trunk/www/views/rawbioassays/list_rawbioassays.jsp

    r7604 r7605  
    431431      {
    432432        AnnotationType at = loader.getAnnotationType();
    433         @SuppressWarnings("rawtypes")
    434         Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
     433        Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
    435434        Enumeration<String, String> annotationEnum = null;
    436435        if (at.isEnumeration())
  • trunk/www/views/rawbioassays/rawdata/view_rawdata.jsp

    r7604 r7605  
    174174          {
    175175            String name = rawProperty.getName();
    176             @SuppressWarnings("rawtypes")
    177             Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, rawProperty);
     176            Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, rawProperty);
    178177            String value = f.format(rawData.getExtended(name));
    179178            title = Values.trimString(rawProperty.getTitle(), 25);
     
    269268              {
    270269                String name = ep.getName();
    271                 @SuppressWarnings("rawtypes")
    272                 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
     270                Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
    273271                String value = f.format(reporter.getExtended(name));
    274272                %>
  • trunk/www/views/reporterlists/index.jsp

    r7604 r7605  
    153153    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    154154    dc = sc.newDbControl();
    155     ReporterList rl = (ReporterList)cc.getObject("item");
     155    ReporterList rl = cc.getObject("item");
    156156    if (rl == null)
    157157    {
     
    193193          if (query instanceof DataQuery)
    194194          {
    195             DataResultIterator<ReporterData> result = ((DataQuery<ReporterData>)query).iterate(dc);
     195            DataQuery<ReporterData> dataQuery = reporterContext.getQuery();
     196            DataResultIterator<ReporterData> result = dataQuery.iterate(dc);
    196197            while (result.hasNext())
    197198            {
     
    439440    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext);
    440441    dc = sc.newDbControl();
    441     ReporterList rl = (ReporterList)cc.getObject("item");
     442    ReporterList rl = cc.getObject("item");
    442443    dc.reattachItem(rl, false);
    443444   
  • trunk/www/views/reporters/index.jsp

    r7604 r7605  
    137137    final int maxRecent = Base.getMaxRecent(sc);
    138138    dc = sc.newDbControl();
    139     ReporterData reporter = (ReporterData)cc.getObject("item");
     139    ReporterData reporter = cc.getObject("item");
    140140    if (reporter == null)
    141141    {
  • trunk/www/views/reporters/view_reporter.jsp

    r7604 r7605  
    225225            {
    226226              String name = ep.getName();
    227               @SuppressWarnings("rawtypes")
    228               Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
     227              Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep);
    229228              String value = f.format(reporter.getExtended(name));
    230229              %>
  • trunk/www/views/trashcan/list_trash.jsp

    r7604 r7605  
    127127  int numListed = 0;
    128128  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext);
    129   ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext, 
     129  ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext, 
    130130      "net.sf.basedb.clients.web.toolbar.list.all",
    131131      "net.sf.basedb.clients.web.toolbar.list.trashcan");
    132   ExtensionsInvoker<ListColumnAction<BasicItem,?>> columnsInvoker =  (ExtensionsInvoker<ListColumnAction<BasicItem,?>>)ExtensionsControl.useExtensions(jspContext,
     132  ExtensionsInvoker<ListColumnAction<BasicItem,?>> columnsInvoker =  ExtensionsControl.useExtensions(jspContext,
    133133      "net.sf.basedb.clients.web.listcolumn.trashcan");
    134134  %>
  • trunk/www/views/trashcan/view_item.jsp

    r7604 r7605  
    117117  String link = Base.getLink(ID, HTML.encodeTags(name), item.getType(), itemId, writePermission);
    118118  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, item);
    119   ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext, 
     119  ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext, 
    120120    "net.sf.basedb.clients.web.toolbar.item.all",
    121121    "net.sf.basedb.clients.web.toolbar.item.trashcan");
Note: See TracChangeset for help on using the changeset viewer.