Changeset 7605
- Timestamp:
- Feb 26, 2019, 11:10:15 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 226 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/ExtensionsControl.java
r7233 r7605 406 406 @see Registry#useExtensions(net.sf.basedb.util.extensions.ClientContext, net.sf.basedb.util.extensions.ExtensionsFilter, String...) 407 407 */ 408 public static ExtensionsInvoker<?> useExtensions(JspContext context, String...extensionPoints)408 public static <A extends Action> ExtensionsInvoker<A> useExtensions(JspContext context, String...extensionPoints) 409 409 { 410 410 return registry.useExtensions(context, settings, extensionPoints); 411 411 } 412 412 413 public static ExtensionsInvoker<?> useExtensions(JspContext context,413 public static <A extends Action> ExtensionsInvoker<A> useExtensions(JspContext context, 414 414 ExtensionsFilter filter, String...extensionPoints) 415 415 { -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/list/ListColumnUtil.java
r7604 r7605 102 102 @return An invoker instance 103 103 */ 104 @SuppressWarnings("unchecked")105 104 public static <I> ExtensionsInvoker<ListColumnAction<I, ?>> useExtensions(JspContext jspContext) 106 105 { … … 131 130 } 132 131 ep[index++] = EP_PREFIX + itemType.name().toLowerCase(); 133 return (ExtensionsInvoker<ListColumnAction<I, ?>>)ExtensionsControl.useExtensions(jspContext, ep);132 return ExtensionsControl.useExtensions(jspContext, ep); 134 133 } 135 134 -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ToolbarUtil.java
r7440 r7605 141 141 @return An invoker instance 142 142 */ 143 @SuppressWarnings("unchecked")144 143 public static ExtensionsInvoker<ButtonAction> useExtensions(JspContext jspContext) 145 144 { … … 171 170 } 172 171 ep[index++] = EP_PREFIX[type] + itemType.name().toLowerCase(); 173 return (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext, ep);172 return ExtensionsControl.useExtensions(jspContext, ep); 174 173 } 175 174 -
trunk/src/clients/web/net/sf/basedb/clients/web/formatter/FormatterFactory.java
r6875 r7605 239 239 @return A formatter or null if no suitable formatter could be found 240 240 */ 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; 243 245 if (type == Type.FLOAT) 244 246 { 245 returngetNumberFormatter(sc);247 f = getNumberFormatter(sc); 246 248 } 247 249 else if (type == Type.DOUBLE) 248 250 { 249 returngetDoubleFormatter(sc);251 f = getDoubleFormatter(sc); 250 252 } 251 253 else if (type == Type.STRING || type == Type.TEXT) 252 254 { 253 returngetStringFormatter(sc);255 f = getStringFormatter(sc); 254 256 } 255 257 else if (type == Type.INT) 256 258 { 257 returngetIntFormatter(sc);259 f = getIntFormatter(sc); 258 260 } 259 261 else if (type == Type.LONG) 260 262 { 261 returngetLongFormatter(sc);263 f = getLongFormatter(sc); 262 264 } 263 265 else if (type == Type.DATE) 264 266 { 265 returngetDateFormatter(sc);267 f = getDateFormatter(sc); 266 268 } 267 269 else if (type == Type.TIMESTAMP) 268 270 { 269 returngetDateTimeFormatter(sc);271 f = getDateTimeFormatter(sc); 270 272 } 271 273 else if (type == Type.BOOLEAN) 272 274 { 273 returngetBooleanFormatter(sc);274 } 275 return null;275 f = getBooleanFormatter(sc); 276 } 277 return f; 276 278 } 277 279 … … 288 290 @see ExtendedPropertyFormatter 289 291 */ 290 public static Formatter<?> getExtendedPropertyFormatter(SessionControl sc, ExtendedProperty ep)292 public static <T> Formatter<T> getExtendedPropertyFormatter(SessionControl sc, ExtendedProperty ep) 291 293 { 292 294 return new ExtendedPropertyFormatter<>(ep, getTypeFormatter(sc, ep.getType())); … … 333 335 @since 2.9 334 336 */ 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()); 338 340 return a.getUnitFormatter(f, unit); 339 341 } … … 353 355 @since 2.16 354 356 */ 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; 359 361 Type valueType = formula.getValueType(); 360 362 if (valueType != null) … … 368 370 else 369 371 { 370 f = new ToStringFormatter< Object>();372 f = new ToStringFormatter<T>(); 371 373 } 372 374 return f; -
trunk/src/clients/web/net/sf/basedb/clients/web/plugins/SimpleExport.java
r7560 r7605 220 220 } 221 221 222 @ Override223 @ SuppressWarnings({ "unchecked", "rawtypes" })222 @SuppressWarnings("rawtypes") 223 @Override 224 224 protected void performExport(ExportOutputStream out, ProgressReporter progress) 225 225 throws IOException … … 228 228 229 229 // 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); 234 234 String collectionSeparator = Values.getStringOrNull((String)job.getValue(COLLECTION_SEPARATOR)); 235 235 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); 238 238 ItemContext cc = sc.getCurrentContext(itemType, subContext); 239 239 -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Page.java
r7409 r7605 421 421 } 422 422 423 @SuppressWarnings("unchecked")424 423 @Override 425 424 public int doStartTag() … … 433 432 skinContext = ExtensionsControl.createContext(sc, pageContext); 434 433 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"); 436 435 ActionIterator<SkinAction> it = invoker.iterate(); 437 436 skinActions = new ArrayList<SkinAction>(); -
trunk/src/core/net/sf/basedb/core/BioMaterialEvent.java
r7308 r7605 937 937 @return An {@link ItemQuery} object 938 938 */ 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; 942 943 MeasuredBioMaterialData bioMaterialData = getData().getBioMaterial(); 943 944 Item parentType = null; -
trunk/src/core/net/sf/basedb/core/DataFileType.java
r7381 r7605 628 628 @since 3.0 629 629 */ 630 @SuppressWarnings("unchecked")631 630 public boolean hasActiveValidator(DbControl dc) 632 631 { … … 634 633 Registry registry = manager.getRegistry(); 635 634 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"); 638 636 return invoker.getNumExtensions() > 0; 639 637 } -
trunk/src/core/net/sf/basedb/core/DbControl.java
r7595 r7605 159 159 Create a new object. 160 160 */ 161 @SuppressWarnings("unchecked")162 161 DbControl(SessionControl sc) 163 162 throws BaseException … … 168 167 ExtensionsManager xtManager = Application.getExtensionsManager(); 169 168 ClientContext context = new ClientContext(sc); 170 ExtensionsInvoker<LogManagerFactory> invoker = (ExtensionsInvoker<LogManagerFactory>)xtManager.getRegistry().useExtensions(169 ExtensionsInvoker<LogManagerFactory> invoker = xtManager.getRegistry().useExtensions( 171 170 context, xtManager.getSettings(), "net.sf.basedb.core.log-manager"); 172 171 if (invoker.getNumExtensions() > 0) … … 574 573 @throws BaseException If there is another error 575 574 */ 576 @SuppressWarnings("deprecation")577 575 private void updateDiskUsage(BasicItem item) 578 576 throws QuotaException, BaseException -
trunk/src/core/net/sf/basedb/core/FileSet.java
r7381 r7605 801 801 } 802 802 803 804 @SuppressWarnings("unchecked")805 803 private ExtensionsInvoker<ValidationAction> getInvoker(DbControl dc) 806 804 { … … 811 809 Registry registry = xtManager.getRegistry(); 812 810 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"); 815 812 return invoker; 816 813 } -
trunk/src/core/net/sf/basedb/core/ItemContext.java
r7558 r7605 896 896 897 897 898 public ObjectgetPropertyObject(String property)899 { 900 Objectvalue = null;898 public <T> T getPropertyObject(String property) 899 { 900 T value = null; 901 901 PropertyFilter filter = getPropertyFilter(property); 902 902 if (filter != null) … … 1122 1122 @return A list with the items 1123 1123 */ 1124 public List<? extends BasicItem> getRecent(DbControl dc, Item itemType)1124 public <T extends BasicItem> List<T> getRecent(DbControl dc, Item itemType) 1125 1125 { 1126 1126 return loadRecent(dc, itemType, itemType.name()); … … 1140 1140 @since 3.0 1141 1141 */ 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) 1143 1143 { 1144 1144 if (subtype == null) … … 1165 1165 @since 2.5 1166 1166 */ 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) 1168 1168 { 1169 1169 return loadRecent(dc, itemType, itemType.name() + "." + subList); 1170 1170 } 1171 1171 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) 1173 1174 { 1174 1175 List<String> recentIds = getRecent(key); 1175 List< BasicItem> recent = new ArrayList<BasicItem>(recentIds.size());1176 List<T> recent = new ArrayList<>(recentIds.size()); 1176 1177 for (String id : recentIds) 1177 1178 { 1178 1179 try 1179 1180 { 1180 recent.add( itemType.getById(dc, Integer.parseInt(id)));1181 recent.add((T)itemType.getById(dc, Integer.parseInt(id))); 1181 1182 } 1182 1183 catch (Throwable t) … … 1370 1371 @see #setObject(String, Object) 1371 1372 */ 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); 1375 1377 } 1376 1378 … … 1382 1384 @see #getObject(String) 1383 1385 */ 1384 public Object setObject(String name, Object value) 1386 @SuppressWarnings("unchecked") 1387 public <T> T setObject(String name, Object value) 1385 1388 { 1386 1389 if (objects == null) objects = new HashMap<String, Object>(); 1387 return objects.put(name, value);1390 return (T)objects.put(name, value); 1388 1391 } 1389 1392 … … 1393 1396 @return The old value or null if no old value existed. 1394 1397 */ 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); 1398 1402 } 1399 1403 … … 1422 1426 } 1423 1427 1424 public Query getQuery() 1425 { 1426 return query; 1428 @SuppressWarnings("unchecked") 1429 public <T extends Query> T getQuery() 1430 { 1431 return (T)query; 1427 1432 } 1428 1433 -
trunk/src/core/net/sf/basedb/core/Job.java
r7513 r7605 1613 1613 @throws BaseException If there is another error 1614 1614 */ 1615 public ObjectgetParameterValue(String name)1615 public <T> T getParameterValue(String name) 1616 1616 throws PermissionDeniedException, BaseException 1617 1617 { 1618 List< ?> values = getParameterValues(name);1618 List<T> values = getParameterValues(name); 1619 1619 return values == null || values.size() == 0 ? null : values.get(0); 1620 1620 } … … 1629 1629 @throws BaseException If there is another error 1630 1630 */ 1631 public List<?> getParameterValues(String name) 1631 @SuppressWarnings("unchecked") 1632 public <T> List<T> getParameterValues(String name) 1632 1633 throws PermissionDeniedException, BaseException 1633 1634 { 1634 1635 ParameterValueData<?> parameterValue = getData().getParameters().get(name); 1635 1636 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())); 1637 1638 } 1638 1639 -
trunk/src/core/net/sf/basedb/core/ParameterValuesImpl.java
r6875 r7605 147 147 } 148 148 149 @Override 150 public Object getValue(String name) 149 @SuppressWarnings("unchecked") 150 @Override 151 public <T> T getValue(String name) 151 152 throws PermissionDeniedException, BaseException 152 153 { 153 List< ?> values =parameters.get(name);154 List<T> values = (List<T>)parameters.get(name); 154 155 if (values != null && values.size() >= 1) 155 156 { … … 162 163 } 163 164 164 @Override 165 public List<?> getValues(String name) 165 @SuppressWarnings("unchecked") 166 @Override 167 public <T> List<T> getValues(String name) 166 168 throws PermissionDeniedException, BaseException 167 169 { 168 return parameters.get(name);170 return (List<T>)parameters.get(name); 169 171 } 170 172 -
trunk/src/core/net/sf/basedb/core/PhysicalBioAssay.java
r7381 r7605 311 311 @since 3.2 312 312 */ 313 @SuppressWarnings("unchecked")314 313 public Set<Annotatable> getAnnotatableParents(int position, Collection<Extract> extracts) 315 314 throws BaseException … … 322 321 BioMaterialEventData eventData = event.getData(); 323 322 324 ItemQuery<Extract> query = (ItemQuery<Extract>)event.getSources();323 ItemQuery<Extract> query = event.getSources(); 325 324 query.include(Include.ALL); 326 325 if (position > 0) … … 450 449 @return An {@link ItemQuery} object 451 450 */ 452 @SuppressWarnings("unchecked")453 451 public ItemQuery<Extract> getExtracts(int position) 454 452 { 455 ItemQuery<Extract> query = (ItemQuery<Extract>)getCreationEvent().getSources();453 ItemQuery<Extract> query = getCreationEvent().getSources(); 456 454 if (position > 0) 457 455 { -
trunk/src/core/net/sf/basedb/core/PluginRequest.java
r7360 r7605 346 346 } 347 347 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); 353 354 if (values != null && values.size() != 0) 354 355 { … … 358 359 } 359 360 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); 364 366 } 365 367 -
trunk/src/core/net/sf/basedb/core/Project.java
r7381 r7605 850 850 @since 3.0 851 851 */ 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) 853 854 { 854 855 if (itemType == null) throw new InvalidUseOfNullException("itemType"); 855 856 List<BasicData> defaultData = findAllDefaultData(itemType, null, strict); 856 List< BasicItem> defaultItems = new ArrayList<BasicItem>(defaultData.size());857 List<T> defaultItems = new ArrayList<>(defaultData.size()); 857 858 for (BasicData data : defaultData) 858 859 { 859 defaultItems.add( dc.getItem(BasicItem.class, data));860 defaultItems.add((T)dc.getItem(BasicItem.class, data)); 860 861 } 861 862 return defaultItems; … … 875 876 @since 3.0 876 877 */ 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) 878 880 { 879 881 if (subtype == null) throw new InvalidUseOfNullException("subtype"); 880 882 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()); 882 884 for (BasicData data : defaultData) 883 885 { 884 defaultItems.add( dc.getItem(BasicItem.class, data));886 defaultItems.add((T)dc.getItem(BasicItem.class, data)); 885 887 } 886 888 return defaultItems; … … 903 905 @since 3.0 904 906 */ 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) 906 908 { 907 909 ItemSubtype related = subtype == null ? null : subtype.getRelatedSubtype(relatedType); … … 936 938 @since 3.0 937 939 */ 938 public List<BasicItem> getDefaultItems(DbControl dc, Item itemType) 940 @SuppressWarnings("unchecked") 941 public <T extends BasicItem> List<T> getDefaultItems(DbControl dc, Item itemType) 939 942 { 940 943 ItemParameterValueData defaultItems = getData().getDefaultItems(); 941 944 if (defaultItems == null) return Collections.emptyList(); 942 945 943 List< BasicItem> items = new ArrayList<BasicItem>();946 List<T> items = new ArrayList<>(); 944 947 Iterator<BasicData> it = defaultItems.getValues().iterator(); 945 948 Class<?> dataClass = itemType == null ? null : itemType.getDataClass(); … … 951 954 try 952 955 { 953 items.add( dc.getItem(BasicItem.class, data));956 items.add((T)dc.getItem(BasicItem.class, data)); 954 957 } 955 958 catch (PermissionDeniedException ex) -
trunk/src/core/net/sf/basedb/core/PropertyFilter.java
r7558 r7605 332 332 @throws InvalidDataException If the string value can't be parsed 333 333 */ 334 public ObjectgetValueAsObject()334 public <T> T getValueAsObject() 335 335 { 336 336 return getValueAsObject(value, unit, false); … … 361 361 } 362 362 363 private Object getValueAsObject(String value, Unit unit, boolean asDouble) 363 @SuppressWarnings("unchecked") 364 private <T> T getValueAsObject(String value, Unit unit, boolean asDouble) 364 365 { 365 366 Object oValue = null; … … 388 389 oValue = valueType.parseString(value); 389 390 } 390 return oValue;391 return (T)oValue; 391 392 } 392 393 -
trunk/src/core/net/sf/basedb/core/SessionControl.java
r7551 r7605 698 698 Verify the user with external authentication. 699 699 */ 700 @SuppressWarnings("unchecked")701 700 private AuthenticatedUser verifyUserExternal(org.hibernate.Session session, LoginRequest loginRequest, List<AuthenticationManager> authManagers) 702 701 { … … 705 704 ExtensionsManager xtManager = Application.getExtensionsManager(); 706 705 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"); 708 707 709 708 AuthenticatedUser authUser = null; … … 2413 2412 no setting is found 2414 2413 */ 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); 2418 2418 } 2419 2419 … … 2426 2426 @return The old value of the setting, or null if it did not exist 2427 2427 */ 2428 public Object setSessionSetting(String name, Object value) 2428 @SuppressWarnings("unchecked") 2429 public <T> T setSessionSetting(String name, Object value) 2429 2430 { 2430 2431 if (loginInfo == null || loginInfo.sessionSettings == null) return null; 2431 2432 if (value == null) 2432 2433 { 2433 return loginInfo.sessionSettings.remove(name);2434 return (T)loginInfo.sessionSettings.remove(name); 2434 2435 } 2435 2436 else 2436 2437 { 2437 return loginInfo.sessionSettings.put(name, value);2438 return (T)loginInfo.sessionSettings.put(name, value); 2438 2439 } 2439 2440 } -
trunk/src/core/net/sf/basedb/core/plugin/AbstractAnalysisPlugin.java
r6127 r7605 451 451 @since 2.4 452 452 */ 453 @SuppressWarnings("unchecked")454 453 protected List<BioAssay> getSourceBioAssays(DbControl dc) 455 454 { 456 List<BioAssay> bioAssaySubset = (List<BioAssay>)job.getValues(SOURCE_BIOASSAYS);455 List<BioAssay> bioAssaySubset = job.getValues(SOURCE_BIOASSAYS); 457 456 if (bioAssaySubset != null) 458 457 { -
trunk/src/core/net/sf/basedb/core/plugin/NamespaceParameterValuesWrapper.java
r5319 r7605 96 96 97 97 @Override 98 public ObjectgetValue(String name)98 public <T> T getValue(String name) 99 99 throws PermissionDeniedException, BaseException 100 100 { 101 Objectvalue = parent.getValue(namespace + "." + name);101 T value = parent.getValue(namespace + "." + name); 102 102 if (value == null) value = parent.getValue(name); 103 103 return value; … … 105 105 106 106 @Override 107 public List<?> getValues(String name)107 public <T> List<T> getValues(String name) 108 108 throws PermissionDeniedException, BaseException 109 109 { 110 List< ?> values = parent.getValues(namespace + "." + name);110 List<T> values = parent.getValues(namespace + "." + name); 111 111 if (values == null) values = parent.getValues(name); 112 112 return values; -
trunk/src/core/net/sf/basedb/core/plugin/NamespaceRequestWrapper.java
r7321 r7605 81 81 82 82 @Override 83 public ObjectgetParameterValue(String name)83 public <T> T getParameterValue(String name) 84 84 throws ParameterException 85 85 { 86 Objectvalue = parent.getParameterValue(namespace + "." + name);86 T value = parent.getParameterValue(namespace + "." + name); 87 87 if (value == null) value = parent.getParameterValue(name); 88 88 return value; … … 90 90 91 91 @Override 92 public List<?> getParameterValues(String name)92 public <T> List<T> getParameterValues(String name) 93 93 { 94 List< ?> values = parent.getParameterValues(namespace + "." + name);94 List<T> values = parent.getParameterValues(namespace + "." + name); 95 95 if (values == null) values = parent.getParameterValues(name); 96 96 return values; -
trunk/src/core/net/sf/basedb/core/plugin/ParameterValues.java
r4889 r7605 81 81 @throws BaseException If there is another error 82 82 */ 83 public ObjectgetValue(String name)83 public <T> T getValue(String name) 84 84 throws PermissionDeniedException, BaseException; 85 85 … … 92 92 @throws BaseException If there is another error 93 93 */ 94 public List<?> getValues(String name)94 public <T> List<T> getValues(String name) 95 95 throws PermissionDeniedException, BaseException; 96 96 -
trunk/src/core/net/sf/basedb/core/plugin/ParameterValuesWrapper.java
r6127 r7605 122 122 */ 123 123 @Override 124 public ObjectgetValue(String name)124 public <T> T getValue(String name) 125 125 throws PermissionDeniedException, BaseException 126 126 { 127 Objectvalue = null;127 T value = null; 128 128 if (request != null) value = request.getParameterValue(name); 129 129 if (value == null && job != null) value = job.getValue(name); … … 139 139 */ 140 140 @Override 141 public List<?> getValues(String name)141 public <T> List<T> getValues(String name) 142 142 throws PermissionDeniedException, BaseException 143 143 { 144 List< ?> values = null;144 List<T> values = null; 145 145 if (request != null) values = request.getParameterValues(name); 146 146 if (values == null && job != null) values = job.getValues(name); -
trunk/src/core/net/sf/basedb/core/plugin/Request.java
r7321 r7605 98 98 is given 99 99 */ 100 public List<?> getParameterValues(String name);100 public <T> List<T> getParameterValues(String name); 101 101 102 102 /** … … 108 108 @throws ParameterException If getting the value fails. 109 109 */ 110 public ObjectgetParameterValue(String name)110 public <T> T getParameterValue(String name) 111 111 throws ParameterException; 112 112 -
trunk/src/core/net/sf/basedb/core/signal/ExtensionSignalTransporter.java
r6444 r7605 56 56 ------------------------------------------- 57 57 */ 58 @SuppressWarnings("unchecked")59 58 @Override 60 59 public void send(Signal signal) … … 69 68 context.setAttribute("signal-uri", getSignalURI()); 70 69 context.setAttribute("signal", signal); 71 ExtensionsInvoker<SignalHandler> invoker = (ExtensionsInvoker<SignalHandler>)registry.useExtensions(context, filter, extensionPointId);70 ExtensionsInvoker<SignalHandler> invoker = registry.useExtensions(context, filter, extensionPointId); 72 71 73 72 // Send the signal -
trunk/src/core/net/sf/basedb/util/extensions/Registry.java
r7275 r7605 674 674 */ 675 675 @SuppressWarnings({ "unchecked", "rawtypes" }) 676 public ExtensionsInvoker<?> useExtensions(ClientContext clientContext, ExtensionsFilter filter,676 public <A extends Action> ExtensionsInvoker<A> useExtensions(ClientContext clientContext, ExtensionsFilter filter, 677 677 String... extensionPointIds) 678 678 { 679 679 if (filter == null) filter = DEFAULT_FILTER; 680 680 681 List<ExtensionContext<A ction>> contexts = new LinkedList<ExtensionContext<Action>>();681 List<ExtensionContext<A>> contexts = new LinkedList<ExtensionContext<A>>(); 682 682 for (String id : extensionPointIds) 683 683 { … … 722 722 723 723 // Create invokation context for the extension 724 ExtensionContext<A ction> context =725 new ExtensionContext <Action>(mainContext, ext);724 ExtensionContext<A> context = 725 new ExtensionContext(mainContext, ext); 726 726 727 727 // Check with the action factory as well … … 745 745 // Sort the extensions 746 746 filter.sort(contexts); 747 return new ExtensionsInvoker<A ction>(contexts);747 return new ExtensionsInvoker<A>(contexts); 748 748 } 749 749 -
trunk/src/core/net/sf/basedb/util/overview/OverviewUtil.java
r7527 r7605 199 199 @since 3.2 200 200 */ 201 @SuppressWarnings("unchecked")202 201 public static Map<String, List<ValidationRuleAction>> getAllRules(DbControl dc, GenericOverview overview) 203 202 { … … 207 206 Registry registry = Application.getExtensionsManager().getRegistry(); 208 207 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"); 211 209 212 210 List<ValidationRuleAction> xtRules = IteratorUtils.toList(invoker.iterator()); -
trunk/src/core/net/sf/basedb/util/overview/loader/ExtensionChildNodeLoader.java
r6088 r7605 112 112 @return TRUE if new nodes were added to the parent node, FALSE if not 113 113 */ 114 @SuppressWarnings("unchecked")115 114 @Override 116 115 public boolean loadChildNodes(DbControl dc, OverviewContext context, Node node) … … 127 126 Settings settings = Application.getExtensionsManager().getSettings(); 128 127 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"); 130 129 131 130 for (ChildNodeLoaderAction a : invoker) -
trunk/src/core/net/sf/basedb/util/overview/loader/ExtractLoader.java
r7301 r7605 258 258 are the source extracts that was pooled to create the given product. 259 259 */ 260 @SuppressWarnings("unchecked")261 260 private Node createPooledReverseNode(Extract product, DbControl dc, OverviewContext context, Node parentNode) 262 261 { 263 262 NodeFactory<Extract> nf = getNodeFactory(dc, context); 264 263 Node folderNode = null; 265 ItemQuery<Extract> query = (ItemQuery<Extract>)context.initQuery(264 ItemQuery<Extract> query = context.initQuery( 266 265 product.getCreationEvent().getSources(), "name"); 267 266 -
trunk/src/core/net/sf/basedb/util/overview/loader/SampleLoader.java
r7004 r7605 221 221 Eg. the child nodes are the source sample(s) that was used to create the given product. 222 222 */ 223 @SuppressWarnings("unchecked")224 223 private Node createPooledReverseNode(Sample product, DbControl dc, OverviewContext context, Node parentNode) 225 224 { 226 225 NodeFactory<Sample> nf = getNodeFactory(dc, context); 227 226 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"); 229 228 Iterator<Sample> it = query.iterate(dc); 230 229 int numSamples = 0; -
trunk/src/core/net/sf/basedb/util/overview/validator/ExtensionNodeValidator.java
r7527 r7605 179 179 } 180 180 181 @SuppressWarnings("unchecked")182 181 private Iterable<NodeValidatorAction<I>> getValidators(DbControl dc) 183 182 { … … 190 189 Registry registry = Application.getExtensionsManager().getRegistry(); 191 190 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"); 193 192 194 193 xtValidators = IteratorUtils.toList(invoker.iterator()); -
trunk/src/core/net/sf/basedb/util/overview/validator/ExtractValidator.java
r6959 r7605 397 397 if (child.getParentType() == Item.EXTRACT) 398 398 { 399 ItemQuery<Extract> query = (ItemQuery<Extract>)child.getCreationEvent().getSources();399 ItemQuery<Extract> query = child.getCreationEvent().getSources(); 400 400 query.include(Include.ALL); 401 401 SourceItemTransformer transformer = new ExtractToParentExtractTransformer(true); -
trunk/src/core/net/sf/basedb/util/uri/ConnectionManagerUtil.java
r7527 r7605 204 204 Get an invoker for using the connection manager factory extensions. 205 205 */ 206 @SuppressWarnings("unchecked")207 206 private static ExtensionsInvoker<ConnectionManagerFactory> getInvoker(ClientContext context, ExtensionsFilter filter) 208 207 { … … 210 209 if (filter == null) filter = manager.getSettings(); 211 210 Registry registry = manager.getRegistry(); 212 return (ExtensionsInvoker<ConnectionManagerFactory>)registry.useExtensions(context, filter, EXTENSION_POINT_ID);211 return registry.useExtensions(context, filter, EXTENSION_POINT_ID); 213 212 } 214 213 -
trunk/src/plugins/core/net/sf/basedb/plugins/AnnotationFlatFileImporter.java
r7594 r7605 393 393 } 394 394 395 @SuppressWarnings("unchecked")396 395 @Override 397 396 public String isInContext(GuiContext context, Object item) 398 397 { 399 List<String> itemTypes = (List<String>)configuration.getValues("itemTypes");398 List<String> itemTypes = configuration.getValues("itemTypes"); 400 399 Item itemType = context.getItem(); 401 400 … … 755 754 // Include options 756 755 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); 761 760 762 761 itemQuery = idMethod.prepareQuery(dc, createQuery(itemType, itemList)); -
trunk/src/plugins/core/net/sf/basedb/plugins/BaseFileExporterPlugin.java
r5610 r7605 305 305 306 306 @Override 307 @SuppressWarnings("unchecked")308 307 protected void performExport(ExportOutputStream out, ProgressReporter progress) 309 308 throws IOException … … 312 311 313 312 // Get job configuration parameters 314 BioAssaySet source = (BioAssaySet)job.getValue("source");313 BioAssaySet source = job.getValue("source"); 315 314 source = BioAssaySet.getById(dc, source.getId()); 316 315 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); 318 317 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"); 322 321 if (reporterFields == null) reporterFields = Collections.emptyList(); 323 322 if (spotFields == null) spotFields = Collections.emptyList(); -
trunk/src/plugins/core/net/sf/basedb/plugins/BfsExporterPlugin.java
r6875 r7605 309 309 } 310 310 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"); 316 316 if (reporterFields == null) reporterFields = Collections.emptyList(); 317 317 if (spotFields == null) spotFields = Collections.emptyList(); -
trunk/src/plugins/core/net/sf/basedb/plugins/IlluminaRawDataImporter.java
r6127 r7605 424 424 } 425 425 426 @SuppressWarnings("unchecked")427 426 @Override 428 427 protected void begin(FlatFileParser ffp) … … 434 433 this.numberFormat = ffp.getDefaultNumberFormat(); 435 434 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"); 441 440 442 441 // Feature identification 443 442 try 444 443 { 445 String fiTemp = (String)job.getValue("featureIdentification");444 String fiTemp = job.getValue("featureIdentification"); 446 445 fiMethod = FeatureIdentificationMethod.valueOf(fiTemp); 447 446 } … … 464 463 else 465 464 { 466 String method = (String)job.getValue("featureMismatchError");465 String method = job.getValue("featureMismatchError"); 467 466 this.useSmartFeatureMismatchHandling = "smart".equals(method); 468 467 if (method != null) -
trunk/src/plugins/core/net/sf/basedb/plugins/IntensityCalculatorPlugin.java
r6127 r7605 164 164 165 165 @Override 166 @SuppressWarnings("unchecked")167 166 public void run(Request request, Response response, ProgressReporter progress) 168 167 { … … 175 174 { 176 175 // name parameter 177 String name = (String)job.getValue("name");176 String name = job.getValue("name"); 178 177 if (name == null) name = "New root bioassay set"; 179 178 180 179 // experiment parameter 181 Experiment experiment = (Experiment)job.getValue("experiment");180 Experiment experiment = job.getValue("experiment"); 182 181 if (experiment == null) 183 182 { … … 189 188 190 189 // rawBioAssays parameter 191 List<RawBioAssay> sources = (List<RawBioAssay>)job.getValues("rawBioAssays");190 List<RawBioAssay> sources = job.getValues("rawBioAssays"); 192 191 if (sources == null || sources.size() == 0) 193 192 { … … 200 199 201 200 // Formula parameter 202 Formula formula = (Formula)job.getValue("formula");201 Formula formula = job.getValue("formula"); 203 202 formula = Formula.getById(dc, formula.getId()); 204 203 … … 333 332 */ 334 333 @Override 335 @SuppressWarnings("unchecked")336 334 public void configure(GuiContext context, Request request, Response response) 337 335 { … … 360 358 "' is not stored in the database."); 361 359 } 362 List<RawBioAssay> rawBioAssays = (List<RawBioAssay>)request.getParameterValues("rawBioAssays");360 List<RawBioAssay> rawBioAssays = request.getParameterValues("rawBioAssays"); 363 361 for (RawBioAssay rba : rawBioAssays) 364 362 { -
trunk/src/plugins/core/net/sf/basedb/plugins/ManualDerivedBioAssayCreator.java
r6127 r7605 97 97 } 98 98 99 @SuppressWarnings("unchecked")100 99 @Override 101 100 public void run(Request request, Response response, ProgressReporter progress) … … 109 108 DerivedBioAssay source = getSourceDerivedBioAssay(dc); 110 109 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"); 114 113 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"); 116 115 boolean allowMoreFiles = Boolean.TRUE.equals(configuration.getValue("allowMoreFiles")); 117 116 … … 136 135 for (DataFileType ft : fileTypes) 137 136 { 138 List<File> files = (List<File>)job.getValues("file." + ft.getExternalId());137 List<File> files = job.getValues("file." + ft.getExternalId()); 139 138 if (files != null && files.size() > 0) 140 139 { … … 149 148 if (allowMoreFiles) 150 149 { 151 List<File> moreFiles = (List<File>)job.getValues("morefiles");150 List<File> moreFiles = job.getValues("morefiles"); 152 151 if (moreFiles != null) 153 152 { … … 186 185 Adds check of the item subtype. 187 186 */ 188 @SuppressWarnings("unchecked")189 187 @Override 190 188 public String isInContext(GuiContext context, Object item) … … 194 192 { 195 193 DerivedBioAssay dba = (DerivedBioAssay)item; 196 List<ItemSubtype> subtypes = (List<ItemSubtype>)configuration.getValues("subtypes");194 List<ItemSubtype> subtypes = configuration.getValues("subtypes"); 197 195 if (subtypes != null && subtypes.size() > 0) 198 196 { … … 209 207 } 210 208 211 @SuppressWarnings("unchecked")212 209 @Override 213 210 public void configure(GuiContext context, Request request, Response response) … … 247 244 248 245 // Files 249 List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");246 List<DataFileType> fileTypes = configuration.getValues("fileTypes"); 250 247 if (fileTypes != null) 251 248 { … … 258 255 259 256 // Parameters 260 List<PluginParameter<?>> tp = getToolParameters( (List<String>)configuration.getValues("parameters"));257 List<PluginParameter<?>> tp = getToolParameters(configuration.getValues("parameters")); 261 258 if (tp != null) 262 259 { … … 313 310 // ---------------------------------------------- 314 311 315 @SuppressWarnings("unchecked")316 312 private RequestInformation getConfigureJobParameters(GuiContext context) 317 313 { … … 325 321 PluginConfiguration config = getCurrentConfiguration(dc); 326 322 boolean allowMoreFiles = Boolean.TRUE.equals(configuration.getValue("allowMoreFiles")); 327 List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");323 List<DataFileType> fileTypes = configuration.getValues("fileTypes"); 328 324 boolean configIsAnnotated = config.isAnnotated(); 329 325 DerivedBioAssay source = getCurrentDerivedBioAssay(dc); … … 347 343 // Parameters section 348 344 List<PluginParameter<?>> toolParameters = 349 getToolParameters( (List<String>)configuration.getValues("parameters"));345 getToolParameters(configuration.getValues("parameters")); 350 346 if (toolParameters != null && toolParameters.size() > 0) 351 347 { -
trunk/src/plugins/core/net/sf/basedb/plugins/ManualTransformCreator.java
r6127 r7605 105 105 } 106 106 107 @SuppressWarnings("unchecked")108 107 @Override 109 108 public void run(Request request, Response response, ProgressReporter progress) … … 117 116 BioAssaySet source = getSourceBioAssaySet(dc); 118 117 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); 121 120 String childDescription = (String)job.getValue(CHILD_DESCRIPTION); 122 121 boolean copyAnnotations = Boolean.TRUE.equals(job.getValue(COPY_ANNOTATIONS)); … … 124 123 boolean importSpotData = "import".equals(job.getValue("spotData")); 125 124 boolean useBase1ColumnNames = "base1".equals(job.getValue("columnNames")); 126 List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");125 List<DataFileType> fileTypes = configuration.getValues("fileTypes"); 127 126 boolean allowMoreFiles = Boolean.TRUE.equals(configuration.getValue("allowMoreFiles")); 128 127 … … 192 191 for (DataFileType ft : fileTypes) 193 192 { 194 List<File> files = (List<File>)job.getValues("file." + ft.getExternalId());193 List<File> files = job.getValues("file." + ft.getExternalId()); 195 194 if (files != null && files.size() > 0) 196 195 { … … 205 204 if (allowMoreFiles) 206 205 { 207 List<File> moreFiles = (List<File>)job.getValues("morefiles");206 List<File> moreFiles = job.getValues("morefiles"); 208 207 if (moreFiles != null) 209 208 { … … 233 232 ------------------------------------------- 234 233 */ 235 @SuppressWarnings("unchecked")236 234 @Override 237 235 public void configure(GuiContext context, Request request, Response response) … … 272 270 273 271 // Files 274 List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");272 List<DataFileType> fileTypes = configuration.getValues("fileTypes"); 275 273 if (fileTypes != null) 276 274 { … … 283 281 284 282 // Parameters 285 List<PluginParameter<?>> tp = getToolParameters( (List<String>)configuration.getValues("parameters"));283 List<PluginParameter<?>> tp = getToolParameters(configuration.getValues("parameters")); 286 284 if (tp != null) 287 285 { … … 353 351 // ---------------------------------------------- 354 352 355 @SuppressWarnings("unchecked")356 353 private RequestInformation getConfigureJobParameters(GuiContext context) 357 354 { … … 365 362 PluginConfiguration config = getCurrentConfiguration(dc); 366 363 boolean allowMoreFiles = Boolean.TRUE.equals(configuration.getValue("allowMoreFiles")); 367 List<DataFileType> fileTypes = (List<DataFileType>)configuration.getValues("fileTypes");364 List<DataFileType> fileTypes = configuration.getValues("fileTypes"); 368 365 boolean configIsAnnotated = config.isAnnotated(); 369 366 BioAssaySet source = getCurrentBioAssaySet(dc); … … 438 435 // Parameters section 439 436 List<PluginParameter<?>> toolParameters = 440 getToolParameters( (List<String>)configuration.getValues("parameters"));437 getToolParameters(configuration.getValues("parameters")); 441 438 if (toolParameters != null && toolParameters.size() > 0) 442 439 { -
trunk/src/plugins/core/net/sf/basedb/plugins/PackedFileExporter.java
r7517 r7605 347 347 348 348 @Override 349 @SuppressWarnings("unchecked")350 349 protected void performExport(ExportOutputStream out, ProgressReporter progress) 351 350 throws IOException … … 356 355 Directory rootDir = (Directory)job.getValue("root"); 357 356 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"); 360 359 boolean removeItems = Boolean.TRUE.equals(job.getValue("removeItems")); 361 360 FilePacker packer = getPacker(); -
trunk/src/plugins/core/net/sf/basedb/plugins/PluginConfigurationExporter.java
r6473 r7605 227 227 } 228 228 @Override 229 @SuppressWarnings("unchecked")230 229 protected void performExport(ExportOutputStream out, ProgressReporter progress) 231 230 throws IOException … … 233 232 if (signalHandler != null) signalHandler.setWorkerThread(null); 234 233 numExported = 0; 235 List<Integer> selectedItems = (List<Integer>)job.getValues("items");234 List<Integer> selectedItems = job.getValues("items"); 236 235 numSelected = selectedItems != null ? selectedItems.size() : 0; 237 236 if (numSelected > 0) -
trunk/src/plugins/core/net/sf/basedb/plugins/ReporterMapFlatFileImporter.java
r6127 r7605 314 314 */ 315 315 @Override 316 @SuppressWarnings("unchecked")317 316 public String isInContext(GuiContext context, Object item) 318 317 { … … 339 338 else 340 339 { 341 List<String> platforms = (List<String>)configuration.getValues("platforms");340 List<String> platforms = configuration.getValues("platforms"); 342 341 if (platforms != null && platforms.size() > 0) 343 342 { -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/AbstractItemImporter.java
r7599 r7605 667 667 Setup column mapping. Creates DbControl and query to find items. 668 668 */ 669 @SuppressWarnings("unchecked")670 669 @Override 671 670 protected void beginData() … … 678 677 // Mapper to get name or external ID 679 678 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); 682 681 createColumnMappers(ffp, cropStrings); 683 682 684 683 // Include options 685 684 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); 690 689 itemQuery = idMethod.prepareQuery(dc, addMembersMode ? createItemQuery() : createItemQuery(itemList)); 691 690 itemQuery.setIncludes(includes); 692 691 693 List<ItemSubtype> subtypes = (List<ItemSubtype>)job.getValues("itemSubtypes");692 List<ItemSubtype> subtypes = job.getValues("itemSubtypes"); 694 693 if (subtypes != null && subtypes.size() > 0) 695 694 { -
trunk/src/plugins/core/net/sf/basedb/plugins/executor/ExternalProgramExecutor.java
r7329 r7605 1253 1253 } 1254 1254 1255 @Override 1256 public Object getParameterValue(String name) 1255 @SuppressWarnings("unchecked") 1256 @Override 1257 public <T> T getParameterValue(String name) 1257 1258 throws ParameterException 1258 1259 { 1259 1260 if (parameters.containsKey(name)) 1260 1261 { 1261 return parameters.get(name);1262 return (T)parameters.get(name); 1262 1263 } 1263 1264 return parent.getParameterValue(name); … … 1265 1266 1266 1267 @Override 1267 public List<?> getParameterValues(String name)1268 public <T> List<T> getParameterValues(String name) 1268 1269 { 1269 1270 return parent.getParameterValues(name); -
trunk/src/plugins/core/net/sf/basedb/plugins/gtf/DefaultConfigurationValues.java
r6459 r7605 82 82 } 83 83 84 @SuppressWarnings("unchecked") 84 85 @Override 85 public ObjectgetValue(String name)86 public <T> T getValue(String name) 86 87 throws PermissionDeniedException, BaseException 87 88 { 88 Objectvalue = configuration == null ? null : configuration.getValue(name);89 T value = configuration == null ? null : configuration.getValue(name); 89 90 if (value == null) 90 91 { … … 110 111 defaultValues.put("featureIdColumnMapping", "\\<transcript_id>\\@\\<seqname>\\"); 111 112 } 112 value = defaultValues.get(name);113 value = (T)defaultValues.get(name); 113 114 } 114 115 return value; … … 116 117 117 118 @Override 118 public List<?> getValues(String name)119 public <T> List<T> getValues(String name) 119 120 throws PermissionDeniedException, BaseException 120 121 { -
trunk/src/test/TestExtensions.java
r7190 r7605 200 200 } 201 201 202 @SuppressWarnings("unchecked")203 202 static void test_render_default(Registry registry, String extensionPoint) 204 203 { … … 206 205 { 207 206 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); 210 208 211 209 manager.renderDefault(); -
trunk/www/admin/annotationtypecategories/index.jsp
r7604 r7605 162 162 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 163 163 dc = sc.newDbControl(); 164 AnnotationTypeCategory annotationTypeCategory = (AnnotationTypeCategory)cc.getObject("item");164 AnnotationTypeCategory annotationTypeCategory = cc.getObject("item"); 165 165 if (annotationTypeCategory == null) 166 166 { -
trunk/www/admin/annotationtypes/index.jsp
r7604 r7605 183 183 final int maxRecent = Base.getMaxRecent(sc); 184 184 dc = sc.newDbControl(); 185 AnnotationType annotationType = (AnnotationType)cc.getObject("item");185 AnnotationType annotationType = cc.getObject("item"); 186 186 if (annotationType == null) 187 187 { -
trunk/www/admin/annotationtypes/list_annotationtypes.jsp
r7604 r7605 634 634 /></tbl:cell> 635 635 <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()) )) : 637 637 "<i>- no -</i>"%></tbl:cell> 638 638 <tbl:cell column="requiredForMiame"><%=item.isRequiredForMiame() ? "yes" : "no"%></tbl:cell> -
trunk/www/admin/annotationtypes/view_annotationtype.jsp
r7604 r7605 275 275 <th>Enumeration</th> 276 276 <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> 279 279 </tr> 280 280 <tr> -
trunk/www/admin/clients/help/index.jsp
r7604 r7605 129 129 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 130 130 dc = sc.newDbControl(); 131 Help help = (Help)cc.getObject("item");131 Help help = cc.getObject("item"); 132 132 String externalId = Values.getStringOrNull(request.getParameter("external_id")); 133 133 if (help == null) -
trunk/www/admin/clients/index.jsp
r7604 r7605 136 136 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 137 137 dc = sc.newDbControl(); 138 Client client = (Client)cc.getObject("item");138 Client client = cc.getObject("item"); 139 139 if (client == null) 140 140 { -
trunk/www/admin/datafiletypes/index.jsp
r7604 r7605 136 136 final int maxRecent = Base.getMaxRecent(sc); 137 137 dc = sc.newDbControl(); 138 DataFileType fileType = (DataFileType)cc.getObject("item");138 DataFileType fileType = cc.getObject("item"); 139 139 if (fileType == null) 140 140 { -
trunk/www/admin/diskusage/details/view_details.jsp
r7604 r7605 111 111 boolean writePermission = false; 112 112 final boolean hasDiskUsagePermission = sc.hasPermission(Permission.READ, Item.DISKUSAGE); 113 DiskUsageStatistics statistics = (DiskUsageStatistics)sc.getSessionSetting("diskUsageStatistics");113 DiskUsageStatistics statistics = sc.getSessionSetting("diskUsageStatistics"); 114 114 String returnCmd = null; 115 115 if (statistics == null) -
trunk/www/admin/diskusage/list_groups.jsp
r7604 r7605 90 90 try 91 91 { 92 DiskUsageStatistics du = (DiskUsageStatistics)sc.getSessionSetting("diskUsageStatistics");92 DiskUsageStatistics du = sc.getSessionSetting("diskUsageStatistics"); 93 93 if (du == null) 94 94 { -
trunk/www/admin/diskusage/list_users.jsp
r7604 r7605 93 93 try 94 94 { 95 DiskUsageStatistics du = (DiskUsageStatistics)sc.getSessionSetting("diskUsageStatistics");95 DiskUsageStatistics du = sc.getSessionSetting("diskUsageStatistics"); 96 96 if (du == null) 97 97 { -
trunk/www/admin/diskusage/overview.jsp
r7595 r7605 61 61 try 62 62 { 63 DiskUsageStatistics du = (DiskUsageStatistics)sc.getSessionSetting("diskUsageStatistics");63 DiskUsageStatistics du = sc.getSessionSetting("diskUsageStatistics"); 64 64 if (du == null) 65 65 { -
trunk/www/admin/extensions/tree.jsp
r7604 r7605 44 44 import="java.util.Iterator" 45 45 import="java.util.Collections" 46 import="java.util.Comparator" 46 47 import="org.json.simple.JSONArray" 47 48 import="org.json.simple.JSONObject" … … 165 166 return jsonJoust; 166 167 } 168 @SuppressWarnings({"rawtypes", "unchecked"}) 169 void sort(List list, Comparator cmp) 170 { 171 Collections.sort(list, cmp); 172 } 167 173 %> 168 174 <% … … 194 200 ExtensionsControl ec = ExtensionsControl.get(dc); 195 201 List<ExtensionPoint<?>> extensionPoints = ec.getExtensionPoints(); 196 Collections.sort(extensionPoints, Registry.EXTENSIONPOINT_COMPARATOR);202 sort(extensionPoints, Registry.EXTENSIONPOINT_COMPARATOR); 197 203 for (ExtensionPoint<?> ep : extensionPoints) 198 204 { … … 222 228 @SuppressWarnings("rawtypes") 223 229 List<ExtensionPoint> eps = ef.getObjectsOfClass(ExtensionPoint.class); 224 Collections.sort((List)eps, Registry.EXTENSIONPOINT_COMPARATOR);230 sort(eps, Registry.EXTENSIONPOINT_COMPARATOR); 225 231 for (ExtensionPoint<?> ep : eps) 226 232 { … … 230 236 @SuppressWarnings("rawtypes") 231 237 List<Extension> exts = ef.getObjectsOfClass(Extension.class); 232 Collections.sort((List)exts, Registry.EXTENSION_COMPARATOR);238 sort(exts, Registry.EXTENSION_COMPARATOR); 233 239 String currentGroupId = null; 234 240 JSONObject jsonGroup = null; … … 255 261 } 256 262 List<PluginInfo> plugins = ef.getObjectsOfClass(PluginInfo.class); 257 Collections.sort(plugins, PluginInfo.NAME_COMPARATOR);263 sort(plugins, PluginInfo.NAME_COMPARATOR); 258 264 for (PluginInfo info : plugins) 259 265 { -
trunk/www/admin/extravaluetypes/index.jsp
r7604 r7605 135 135 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 136 136 dc = sc.newDbControl(); 137 ExtraValueType extraValueType = (ExtraValueType)cc.getObject("item");137 ExtraValueType extraValueType = cc.getObject("item"); 138 138 String externalId = Values.getStringOrNull(request.getParameter("external_id")); 139 139 if (extraValueType == null) -
trunk/www/admin/groups/index.jsp
r7604 r7605 168 168 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 169 169 dc = sc.newDbControl(); 170 Group group = (Group)cc.getObject("item");170 Group group = cc.getObject("item"); 171 171 if (group == null) 172 172 { -
trunk/www/admin/hardware/index.jsp
r7604 r7605 139 139 final int maxRecent = Base.getMaxRecent(sc); 140 140 dc = sc.newDbControl(); 141 Hardware hardware = (Hardware)cc.getObject("item");141 Hardware hardware = cc.getObject("item"); 142 142 if (hardware == null) 143 143 { -
trunk/www/admin/hardware/list_hardware.jsp
r7604 r7605 223 223 AnnotationType at = loader.getAnnotationType(); 224 224 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()); 227 226 if (at.isEnumeration()) 228 227 { -
trunk/www/admin/itemsubtypes/index.jsp
r7604 r7605 159 159 final int maxRecent = Base.getMaxRecent(sc); 160 160 dc = sc.newDbControl(); 161 ItemSubtype subtype = (ItemSubtype)cc.getObject("item");161 ItemSubtype subtype = cc.getObject("item"); 162 162 if (subtype == null) 163 163 { -
trunk/www/admin/jobagents/index.jsp
r7604 r7605 138 138 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 139 139 dc = sc.newDbControl(); 140 JobAgent agent = (JobAgent)cc.getObject("item");140 JobAgent agent = cc.getObject("item"); 141 141 if (agent == null) 142 142 { -
trunk/www/admin/mimetypes/index.jsp
r7604 r7605 135 135 final int maxRecent = Base.getMaxRecent(sc); 136 136 dc = sc.newDbControl(); 137 MimeType mimeType = (MimeType)cc.getObject("item");137 MimeType mimeType = cc.getObject("item"); 138 138 if (mimeType == null) 139 139 { -
trunk/www/admin/news/edit_news.jsp
r7604 r7605 69 69 title = "Create news"; 70 70 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"); 73 73 } 74 74 else … … 169 169 <input class="text" type="text" name="end_date" style="width: 15em;" id="end_date" 170 170 value="<%=dateFormatter.format(news == null ? 171 (Date)cc.getPropertyObject("endDate") : news.getEndDate())%>"171 cc.getPropertyObject("endDate") : news.getEndDate())%>" 172 172 maxlength="20" title="Enter date in format: <%=htmlDateFormat%>"> 173 173 </td> -
trunk/www/admin/news/index.jsp
r7604 r7605 140 140 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 141 141 dc = sc.newDbControl(); 142 News news = (News)cc.getObject("item");142 News news = cc.getObject("item"); 143 143 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 144 144 Date startDate = dateFormatter.parseString(Values.getStringOrNull(request.getParameter("start_date"))); -
trunk/www/admin/platforms/index.jsp
r7604 r7605 159 159 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 160 160 dc = sc.newDbControl(); 161 Platform platform = (Platform)cc.getObject("item");161 Platform platform = cc.getObject("item"); 162 162 if (platform == null) 163 163 { -
trunk/www/admin/platforms/variants/index.jsp
r7604 r7605 138 138 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 139 139 dc = sc.newDbControl(); 140 PlatformVariant variant = (PlatformVariant)cc.getObject("item");140 PlatformVariant variant = cc.getObject("item"); 141 141 Platform platform = null; 142 142 if (variant == null) -
trunk/www/admin/pluginconfigurations/edit_configuration.jsp
r7604 r7605 73 73 74 74 // Load recently used items 75 List<PluginDefinition> recentPlugins = (List<PluginDefinition>)cc.getRecent(dc, Item.PLUGINDEFINITION);75 List<PluginDefinition> recentPlugins = cc.getRecent(dc, Item.PLUGINDEFINITION); 76 76 77 77 if (itemId == 0 && cloneId == 0) -
trunk/www/admin/pluginconfigurations/index.jsp
r7604 r7605 141 141 final int maxRecent = Base.getMaxRecent(sc); 142 142 dc = sc.newDbControl(); 143 PluginConfiguration configuration = (PluginConfiguration)cc.getObject("item");143 PluginConfiguration configuration = cc.getObject("item"); 144 144 boolean configure = Values.getBoolean(request.getParameter("configure")); 145 145 if (configuration == null) -
trunk/www/admin/plugindefinitions/index.jsp
r7604 r7605 187 187 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 188 188 dc = sc.newDbControl(); 189 PluginDefinition plugin = (PluginDefinition)cc.getObject("item");189 PluginDefinition plugin = cc.getObject("item"); 190 190 String className = Values.getStringOrNull(request.getParameter("className")); 191 191 String jarFile = Values.getStringOrNull(request.getParameter("jarFile")); -
trunk/www/admin/plugintypes/index.jsp
r7604 r7605 156 156 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 157 157 dc = sc.newDbControl(); 158 PluginType pluginType = (PluginType)cc.getObject("item");158 PluginType pluginType = cc.getObject("item"); 159 159 String interfaceName = Values.getStringOrNull(request.getParameter("interfaceName")); 160 160 String jarFile = Values.getStringOrNull(request.getParameter("jarFile")); -
trunk/www/admin/protocols/edit_protocol.jsp
r7604 r7605 78 78 79 79 // Load recently used items 80 List<File> recentFiles = (List<File>)cc.getRecent(dc, Item.FILE);80 List<File> recentFiles = cc.getRecent(dc, Item.FILE); 81 81 82 82 if (itemId == 0) -
trunk/www/admin/protocols/index.jsp
r7604 r7605 141 141 final int maxRecent = Base.getMaxRecent(sc); 142 142 dc = sc.newDbControl(); 143 Protocol protocol = (Protocol)cc.getObject("item");143 Protocol protocol = cc.getObject("item"); 144 144 if (protocol == null) 145 145 { -
trunk/www/admin/protocols/list_protocol.jsp
r7604 r7605 233 233 AnnotationType at = loader.getAnnotationType(); 234 234 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()); 237 236 if (at.isEnumeration()) 238 237 { -
trunk/www/admin/quantities/index.jsp
r7604 r7605 155 155 final int maxRecent = Base.getMaxRecent(sc); 156 156 dc = sc.newDbControl(); 157 Quantity quantity = (Quantity)cc.getObject("item");157 Quantity quantity = cc.getObject("item"); 158 158 if (quantity == null) 159 159 { -
trunk/www/admin/quantities/units/index.jsp
r7604 r7605 124 124 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 125 125 dc = sc.newDbControl(); 126 Unit unit = (Unit)cc.getObject("item");126 Unit unit = cc.getObject("item"); 127 127 String[] symbols = Values.getString(request.getParameter("symbols")).split("[\n\r]+"); 128 128 String displaySymbol = symbols.length == 0 ? null : symbols[0]; -
trunk/www/admin/quota/index.jsp
r7604 r7605 136 136 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 137 137 dc = sc.newDbControl(); 138 Quota quota = (Quota)cc.getObject("item");138 Quota quota = cc.getObject("item"); 139 139 if (quota == null) 140 140 { -
trunk/www/admin/quotatypes/index.jsp
r7604 r7605 122 122 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 123 123 dc = sc.newDbControl(); 124 QuotaType quotaType = (QuotaType)cc.getObject("item");124 QuotaType quotaType = cc.getObject("item"); 125 125 dc.reattachItem(quotaType, false); 126 126 message = "Quota type updated"; -
trunk/www/admin/reporterclonetemplates/index.jsp
r7604 r7605 135 135 final int maxRecent = Base.getMaxRecent(sc); 136 136 dc = sc.newDbControl(); 137 ReporterCloneTemplate template = (ReporterCloneTemplate)cc.getObject("item");137 ReporterCloneTemplate template = cc.getObject("item"); 138 138 if (template == null) 139 139 { -
trunk/www/admin/reportertypes/index.jsp
r7604 r7605 133 133 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 134 134 dc = sc.newDbControl(); 135 ReporterType reporterType = (ReporterType)cc.getObject("item");135 ReporterType reporterType = cc.getObject("item"); 136 136 if (reporterType == null) 137 137 { -
trunk/www/admin/roles/index.jsp
r7604 r7605 159 159 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 160 160 dc = sc.newDbControl(); 161 Role role = (Role)cc.getObject("item");161 Role role = cc.getObject("item"); 162 162 if (role == null) 163 163 { -
trunk/www/admin/services/services.jsp
r7604 r7605 28 28 29 29 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext); 30 ExtensionsInvoker<ServiceControllerAction> invoker = 31 (ExtensionsInvoker<ServiceControllerAction>)ExtensionsControl.useExtensions(jspContext, 30 ExtensionsInvoker<ServiceControllerAction> invoker = ExtensionsControl.useExtensions(jspContext, 32 31 (ExtensionsFilter)null, Services.EXTENSION_POINT_ID); 33 32 ExtensionsControl ec = ExtensionsControl.get(dc); … … 37 36 38 37 ExtensionsInvoker<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"); 40 39 try 41 40 { -
trunk/www/admin/software/index.jsp
r7604 r7605 139 139 final int maxRecent = Base.getMaxRecent(sc); 140 140 dc = sc.newDbControl(); 141 Software software = (Software)cc.getObject("item");141 Software software = cc.getObject("item"); 142 142 if (software == null) 143 143 { -
trunk/www/admin/software/list_software.jsp
r7604 r7605 223 223 AnnotationType at = loader.getAnnotationType(); 224 224 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()); 227 226 if (at.isEnumeration()) 228 227 { -
trunk/www/admin/users/edit_user.jsp
r7604 r7605 447 447 <input class="text" type="text" name="expiration_date" id="expiration_date" style="width: 15em;" 448 448 value="<%=HTML.encodeTags(dateFormatter.format( 449 user == null ? (Date)cc.getPropertyObject("expirationDate") : user.getExpirationDate())449 user == null ? cc.getPropertyObject("expirationDate") : user.getExpirationDate()) 450 450 )%>" 451 451 maxlength="20" title="Enter date in format: <%=htmlDateFormat%>"> -
trunk/www/admin/users/index.jsp
r7604 r7605 191 191 boolean externalIdHasChanged = false; 192 192 193 User user = (User)cc.getObject("item");193 User user = cc.getObject("item"); 194 194 if (user == null) 195 195 { -
trunk/www/admin/users/view_user.jsp
r7604 r7605 326 326 { 327 327 String name = ep.getName(); 328 @SuppressWarnings("rawtypes") 329 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 328 Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 330 329 String value = f.format(user.getExtended(name)); 331 330 %> -
trunk/www/biomaterials/bioplateeventtypes/index.jsp
r7604 r7605 138 138 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 139 139 dc = sc.newDbControl(); 140 BioPlateEventType eventType = (BioPlateEventType)cc.getObject("item");140 BioPlateEventType eventType = cc.getObject("item"); 141 141 if (eventType == null) 142 142 { -
trunk/www/biomaterials/bioplates/edit_bioplate.jsp
r7604 r7605 121 121 currentFreezer = Hardware.getById(dc, freezerId); 122 122 } 123 eventDate = (Date)cc.getPropertyObject("eventDate");123 eventDate = cc.getPropertyObject("eventDate"); 124 124 } 125 125 else … … 164 164 Project activeProject = Project.getById(dc, activeProjectId); 165 165 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); 167 167 } 168 168 169 169 // 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); 173 173 174 174 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); -
trunk/www/biomaterials/bioplates/events/edit_event.jsp
r7604 r7605 82 82 83 83 // 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); 87 87 88 88 cc.setObject("item", event); -
trunk/www/biomaterials/bioplates/events/index.jsp
r7604 r7605 136 136 final int maxRecent = Base.getMaxRecent(sc); 137 137 dc = sc.newDbControl(); 138 BioPlateEvent event = (BioPlateEvent)cc.getObject("item");138 BioPlateEvent event = cc.getObject("item"); 139 139 dc.reattachItem(event, false); 140 140 message = "Event updated"; -
trunk/www/biomaterials/bioplates/index.jsp
r7604 r7605 139 139 dc = sc.newDbControl(); 140 140 final int maxRecent = Base.getMaxRecent(sc); 141 BioPlate bioPlate = (BioPlate)cc.getObject("item");141 BioPlate bioPlate = cc.getObject("item"); 142 142 if (bioPlate == null) 143 143 { -
trunk/www/biomaterials/bioplates/list_bioplates.jsp
r7604 r7605 351 351 { 352 352 AnnotationType at = loader.getAnnotationType(); 353 @SuppressWarnings("rawtypes") 354 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 353 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 355 354 Enumeration<String, String> annotationEnum = null; 356 355 if (at.isEnumeration()) -
trunk/www/biomaterials/bioplates/wells/index.jsp
r7604 r7605 134 134 135 135 dc = sc.newDbControl(); 136 BioWell biowell = (BioWell)cc.getObject("item");136 BioWell biowell = cc.getObject("item"); 137 137 dc.reattachItem(biowell, false); 138 138 -
trunk/www/biomaterials/bioplates/wells/list_biowells.jsp
r7604 r7605 376 376 AnnotationType at = loader.getAnnotationType(); 377 377 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()); 380 379 if (at.isEnumeration()) 381 380 { -
trunk/www/biomaterials/bioplatetypes/index.jsp
r7604 r7605 141 141 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 142 142 dc = sc.newDbControl(); 143 BioPlateType plateType = (BioPlateType)cc.getObject("item");143 BioPlateType plateType = cc.getObject("item"); 144 144 if (plateType == null) 145 145 { -
trunk/www/biomaterials/biosources/index.jsp
r7604 r7605 160 160 final int maxRecent = Base.getMaxRecent(sc); 161 161 dc = sc.newDbControl(); 162 BioSource bioSource = (BioSource)cc.getObject("item");162 BioSource bioSource = cc.getObject("item"); 163 163 if (bioSource == null) 164 164 { -
trunk/www/biomaterials/biosources/list_biosources.jsp
r7604 r7605 251 251 AnnotationType at = loader.getAnnotationType(); 252 252 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()); 255 254 if (at.isEnumeration()) 256 255 { -
trunk/www/biomaterials/events/edit_event.jsp
r7604 r7605 77 77 78 78 // 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); 81 81 82 82 if (itemId == 0) … … 84 84 title = "Create event"; 85 85 cc.removeObject("item"); 86 eventDate = (Date)cc.getPropertyObject("eventDate");86 eventDate = cc.getPropertyObject("eventDate"); 87 87 if (cc.getPropertyFilter("protocol.name") != null) 88 88 { -
trunk/www/biomaterials/events/index.jsp
r7604 r7605 134 134 final int maxRecent = Base.getMaxRecent(sc); 135 135 dc = sc.newDbControl(); 136 BioMaterialEvent event = (BioMaterialEvent)cc.getObject("item");136 BioMaterialEvent event = cc.getObject("item"); 137 137 if (event == null) 138 138 { -
trunk/www/biomaterials/extracts/edit_extract.jsp
r7604 r7605 179 179 { 180 180 // 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); 182 182 currentSubtype = ListUtil.findFirstCommon(recentSubtypes, relatedToParent, relatedToParent.get(0)); 183 183 } … … 189 189 } 190 190 } 191 eventDate = (Date)cc.getPropertyObject("creationEvent.eventDate");191 eventDate = cc.getPropertyObject("creationEvent.eventDate"); 192 192 } 193 193 else … … 273 273 if (parentType == Item.EXTRACT) 274 274 { 275 extractsQuery = (ItemQuery<Extract>)creationEvent.getSources();275 extractsQuery = creationEvent.getSources(); 276 276 } 277 277 } … … 285 285 ItemSubtype protocolSubtype = currentSubtype == null ? null : currentSubtype.getRelatedSubtype(Item.PROTOCOL); 286 286 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); 288 288 } 289 289 290 290 // 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); 296 296 297 297 // Query to retrieve item types -
trunk/www/biomaterials/extracts/index.jsp
r7604 r7605 231 231 final int maxRecent = Base.getMaxRecent(sc); 232 232 dc = sc.newDbControl(); 233 Extract extract = (Extract)cc.getObject("item");233 Extract extract = cc.getObject("item"); 234 234 if (extract == null) 235 235 { -
trunk/www/biomaterials/extracts/list_extracts.jsp
r7604 r7605 485 485 AnnotationType at = loader.getAnnotationType(); 486 486 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()); 489 488 if (at.isEnumeration()) 490 489 { … … 519 518 AnnotationType at = loader.getAnnotationType(); 520 519 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()); 523 521 if (at.isEnumeration()) 524 522 { -
trunk/www/biomaterials/kits/edit_kit.jsp
r7604 r7605 86 86 } 87 87 cc.removeObject("item"); 88 expirationDate = (Date)cc.getPropertyObject("expirationDate");88 expirationDate = cc.getPropertyObject("expirationDate"); 89 89 inactive = Values.getBoolean(cc.getPropertyValue("inactive")); 90 90 } -
trunk/www/biomaterials/kits/index.jsp
r7604 r7605 141 141 final int maxRecent = Base.getMaxRecent(sc); 142 142 dc = sc.newDbControl(); 143 Kit kit = (Kit)cc.getObject("item");143 Kit kit = cc.getObject("item"); 144 144 if (kit == null) 145 145 { -
trunk/www/biomaterials/kits/list_kits.jsp
r7604 r7605 232 232 AnnotationType at = loader.getAnnotationType(); 233 233 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()); 236 235 if (at.isEnumeration()) 237 236 { -
trunk/www/biomaterials/samples/edit_sample.jsp
r7604 r7605 170 170 { 171 171 // 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); 173 173 currentSubtype = ListUtil.findFirstCommon(recentSubtypes, relatedToParent, relatedToParent.get(0)); 174 174 } … … 180 180 } 181 181 } 182 eventDate = (Date)cc.getPropertyObject("creationEvent.eventDate");182 eventDate = cc.getPropertyObject("creationEvent.eventDate"); 183 183 } 184 184 else … … 252 252 if (parentType == Item.SAMPLE) 253 253 { 254 samplesQuery = (ItemQuery<Sample>)creationEvent.getSources();254 samplesQuery = creationEvent.getSources(); 255 255 } 256 256 } … … 264 264 ItemSubtype protocolSubtype = currentSubtype == null ? null : currentSubtype.getRelatedSubtype(Item.PROTOCOL); 265 265 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); 267 267 } 268 268 269 269 // 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); 274 274 275 275 // Query to retrieve item types -
trunk/www/biomaterials/samples/index.jsp
r7604 r7605 206 206 final int maxRecent = Base.getMaxRecent(sc); 207 207 dc = sc.newDbControl(); 208 Sample sample = (Sample)cc.getObject("item");208 Sample sample = cc.getObject("item"); 209 209 if (sample == null) 210 210 { -
trunk/www/biomaterials/samples/list_samples.jsp
r7604 r7605 435 435 AnnotationType at = loader.getAnnotationType(); 436 436 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()); 439 438 if (at.isEnumeration()) 440 439 { -
trunk/www/biomaterials/tags/index.jsp
r7604 r7605 139 139 final int maxRecent = Base.getMaxRecent(sc); 140 140 dc = sc.newDbControl(); 141 Tag tag = (Tag)cc.getObject("item");141 Tag tag = cc.getObject("item"); 142 142 if (tag == null) 143 143 { -
trunk/www/biomaterials/tags/list_tags.jsp
r7604 r7605 223 223 AnnotationType at = loader.getAnnotationType(); 224 224 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()); 227 226 if (at.isEnumeration()) 228 227 { -
trunk/www/biomaterials/wizards/create_child_bioplate_step1.jsp
r6997 r7605 74 74 75 75 // 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"); 82 82 83 83 // Load subtypes -
trunk/www/biomaterials/wizards/move_biomaterial.jsp
r6997 r7605 64 64 65 65 // 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); 69 69 70 70 Item itemType = null; -
trunk/www/biomaterials/wizards/place_on_plate.jsp
r6997 r7605 60 60 { 61 61 // 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); 65 65 66 ItemQuery<MeasuredBioMaterial> query = (ItemQuery<MeasuredBioMaterial>)cc.getQuery();66 ItemQuery<MeasuredBioMaterial> query = cc.getQuery(); 67 67 List<MeasuredBioMaterial> bioMaterial = Collections.emptyList(); 68 68 ItemSubtype commonSubtype = null; -
trunk/www/common/annotations/batch_inherit.jsp
r6926 r7605 51 51 try 52 52 { 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"); 55 55 cc.removeObject("AnnotationTypes"); 56 56 JSONArray jsonAnnotationTypes = new JSONArray(); -
trunk/www/common/annotations/index.jsp
r7209 r7605 86 86 oldDc = sc.newDbControl(); 87 87 ItemContext cc = sc.getCurrentContext(itemType); 88 Annotatable oldItem = (Annotatable)cc.getObject("item");88 Annotatable oldItem = cc.getObject("item"); 89 89 Annotatable newItem = (Annotatable)itemType.getById(newDc, itemId); 90 90 oldDc.reattachItem((BasicItem)oldItem, false); … … 103 103 newDc = sc.newDbControl(); 104 104 105 Set<AnnotatedItem> items = (Set<AnnotatedItem>)cc.getObject("AnnotatedItems");105 Set<AnnotatedItem> items = cc.getObject("AnnotatedItems"); 106 106 cc.removeObject("AnnotatedItems"); 107 107 -
trunk/www/common/annotations/inherit.jsp
r7604 r7605 134 134 for (Annotation a : annotations) 135 135 { 136 @SuppressWarnings("rawtypes") 137 Formatter formatter = FormatterFactory.getAnnotationFormatter(sc, a, null); 136 Formatter<Object> formatter = FormatterFactory.getAnnotationFormatter(sc, a, null); 138 137 boolean inherited = inheritedAnnotations != null && inheritedAnnotations.contains(a); 139 138 if (inherited) continue; -
trunk/www/common/annotations/list_annotations.jsp
r7604 r7605 293 293 List<?> values = null; 294 294 List<?> defaultValues = null; 295 @SuppressWarnings("rawtypes") 296 Formatter formatter = null; 295 Formatter<Object> formatter = null; 297 296 boolean projectSpecific = false; 298 297 if (a != null) … … 439 438 boolean annotatePermission = writePermission & at.hasPermission(Permission.USE); 440 439 AnnotationSnapshot a = existing != null ? existing.get(at) : null; 441 @SuppressWarnings("rawtypes") 442 Formatter formatter = null; 440 Formatter<Object> formatter = null; 443 441 List<?> values = null; 444 442 List<?> defaultValues = null; … … 602 600 603 601 // Values, units, etc. 604 @SuppressWarnings("rawtypes") 605 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 602 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 606 603 Unit unit = a.getActualUnit(dc); 607 604 UnitConverter converter = null; -
trunk/www/common/anytoany/index.jsp
r6414 r7605 102 102 dc = sc.newDbControl(); 103 103 104 AnyToAny anyToAny = (AnyToAny)cc.getObject("item");104 AnyToAny anyToAny = cc.getObject("item"); 105 105 if (anyToAny == null) 106 106 { -
trunk/www/common/columns/configure.jsp
r6689 r7605 56 56 final ItemContext cc = sc.getCurrentContext(itemType, subContext); 57 57 58 final String defaultColumns = (String)cc.getObject("defaultColumns");58 final String defaultColumns = cc.getObject("defaultColumns"); 59 59 final String settingName = Values.getString(request.getParameter("settingName"), "columns"); 60 60 %> -
trunk/www/common/datafiles/select_files.jsp
r6611 r7605 279 279 validationSupport |= hasValidator; 280 280 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()); 282 282 283 283 JSONObject jsonFileType = new JSONObject(); -
trunk/www/common/expression_builder_ajax.jsp
r7604 r7605 119 119 JepFunction raw = new SimpleJepFunction("raw", 1) 120 120 { 121 @SuppressWarnings( "rawtypes")121 @SuppressWarnings({ "unchecked", "rawtypes" }) 122 122 @Override 123 123 public void run(Stack stack) … … 132 132 JepFunction mean = new SimpleJepFunction("mean", 1) 133 133 { 134 @SuppressWarnings( "rawtypes")134 @SuppressWarnings({ "unchecked", "rawtypes" }) 135 135 @Override 136 136 public void run(Stack stack) … … 145 145 JepFunction ch = new SimpleJepFunction("ch", 1) 146 146 { 147 @SuppressWarnings( "rawtypes")147 @SuppressWarnings({ "unchecked", "rawtypes" }) 148 148 @Override 149 149 public void run(Stack stack) … … 158 158 JepFunction rawCh = new SimpleJepFunction("rawCh", 1) 159 159 { 160 @SuppressWarnings( "rawtypes")160 @SuppressWarnings({ "unchecked", "rawtypes" }) 161 161 @Override 162 162 public void run(Stack stack) … … 177 177 JepFunction pos = new SimpleJepFunction("pos", 0) 178 178 { 179 @SuppressWarnings( "rawtypes")179 @SuppressWarnings({ "unchecked", "rawtypes" }) 180 180 @Override 181 181 public void run(Stack stack) … … 188 188 JepFunction rep = new SimpleJepFunction("rep", 1) 189 189 { 190 @SuppressWarnings( "rawtypes")190 @SuppressWarnings({ "unchecked", "rawtypes" }) 191 191 @Override 192 192 public void run(Stack stack) -
trunk/www/common/import/select_file.jsp
r6607 r7605 104 104 } 105 105 } 106 List<File> recentFiles = (List<File>)currentContext.getRecent(dc, Item.FILE);106 List<File> recentFiles = currentContext.getRecent(dc, Item.FILE); 107 107 %> 108 108 <base:page type="popup" title="<%=title%>"> -
trunk/www/common/import/select_plugin.jsp
r6607 r7605 77 77 String jobName = Values.getString(request.getParameter("job_name"), title); 78 78 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"); 81 81 StringBuilder descriptions = new StringBuilder(); 82 82 -
trunk/www/common/overview/info.jsp
r7604 r7605 131 131 132 132 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, node); 133 ExtensionsInvoker<SectionAction> invoker = (ExtensionsInvoker<SectionAction>)ExtensionsControl.useExtensions(133 ExtensionsInvoker<SectionAction> invoker = ExtensionsControl.useExtensions( 134 134 jspContext, "net.sf.basedb.clients.web.overview.info-details"); 135 135 … … 436 436 437 437 // 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()); 440 439 Unit unit = snapshot.getActualUnit(dc); 441 440 UnitConverter converter = null; -
trunk/www/common/overview/overview.jsp
r7604 r7605 57 57 BasicItem item = itemType.getById(dc, itemId); 58 58 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, item); 59 ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext,59 ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext, 60 60 "net.sf.basedb.clients.web.toolbar.item.overview"); 61 61 final String showFailures = request.getParameter("show_failures"); -
trunk/www/common/ownership/ownership.jsp
r6181 r7605 57 57 try 58 58 { 59 Set<OwnedItem> items = (Set<OwnedItem>)cc.getObject("OwnedItems");59 Set<OwnedItem> items = cc.getObject("OwnedItems"); 60 60 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); 62 62 63 63 // Headline on the web page. -
trunk/www/common/ownership/submit_ownership.jsp
r5426 r7605 60 60 if ("Save".equals(cmd)) 61 61 { 62 Set<OwnedItem> items = (Set<OwnedItem>)cc.getObject("OwnedItems");62 Set<OwnedItem> items = cc.getObject("OwnedItems"); 63 63 User newOwner = User.getById(dc, Values.getInt(request.getParameter("owner_id"))); 64 64 cc.setRecent(newOwner, maxRecent); -
trunk/www/common/plugin/configure.jsp
r7604 r7605 223 223 String htmlDateTimeFormat = HTML.encodeTags(dateTimeFormat); 224 224 225 final PluginConfigurationRequest pcRequest = (PluginConfigurationRequest)sc.getSessionSetting("plugin.configure.request");225 final PluginConfigurationRequest pcRequest = sc.getSessionSetting("plugin.configure.request"); 226 226 if (pcRequest == null) throw new WebException("popup", "No request information found", "No request information found"); 227 227 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"); 230 230 dc.reattachItem(plugin, false); 231 231 232 232 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"); 236 236 237 237 final RequestInformation ri = pcRequest.getRequestInformation(); … … 243 243 if (helpText == null && pluginConfig != null) helpText = pluginConfig.getDescription(); 244 244 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); 246 246 247 247 JSONArray jsonParameters = JsonUtil.toArray(parameters, new JsonConverter<PluginParameter<?>>() -
trunk/www/common/plugin/download_immediately.jsp
r6607 r7605 38 38 final String ID = sc.getId(); 39 39 final DbControl dc = sc.newDbControl(); 40 PluginResponse pluginResponse = (PluginResponse)sc.getSessionSetting("plugin.configure.response");40 PluginResponse pluginResponse = sc.getSessionSetting("plugin.configure.response"); 41 41 String title = pluginResponse.getMessage() == null ? 42 42 "Download export" : HTML.encodeTags(pluginResponse.getMessage()); -
trunk/www/common/plugin/finish_job.jsp
r7352 r7605 65 65 try 66 66 { 67 Job job = (Job)sc.getSessionSetting("plugin.configure.job");67 Job job = sc.getSessionSetting("plugin.configure.job"); 68 68 dc.reattachItem(job, false); 69 69 PluginDefinition plugin = job.getPluginDefinition(); … … 73 73 boolean removeJobWhenFinished = Values.getBoolean(sc.getUserClientSetting("plugins.removejob"), false); 74 74 75 PluginResponse pluginResponse = (PluginResponse)sc.getSessionSetting("plugin.configure.response");75 PluginResponse pluginResponse = sc.getSessionSetting("plugin.configure.response"); 76 76 boolean executeImmediately = 77 77 pluginResponse != null && pluginResponse.getStatus() == Response.Status.EXECUTE_IMMEDIATELY; -
trunk/www/common/plugin/index.jsp
r7604 r7605 357 357 { 358 358 int maxRecent = Base.getMaxRecent(sc); 359 PluginConfigurationRequest pcRequest = (PluginConfigurationRequest)sc.getSessionSetting("plugin.configure.request");359 PluginConfigurationRequest pcRequest = sc.getSessionSetting("plugin.configure.request"); 360 360 String requestId = request.getParameter("requestId"); 361 361 if (requestId != null && !requestId.equals(Integer.toString(System.identityHashCode(pcRequest)))) … … 365 365 List<PluginParameter<?>> parameters = pcRequest.getRequestInformation().getParameters(); 366 366 List<Throwable> parseErrors = new LinkedList<Throwable>(); 367 ItemContext currentContext = (ItemContext)sc.getSessionSetting("plugin.configure.currentContext");367 ItemContext currentContext = sc.getSessionSetting("plugin.configure.currentContext"); 368 368 // Clear old errors 369 369 sc.setSessionSetting("plugin.configure.errors.message", null); … … 485 485 if (status == Response.Status.DONE || status == Response.Status.EXECUTE_IMMEDIATELY) 486 486 { 487 Job job = (Job)sc.getSessionSetting("plugin.configure.job");487 Job job = sc.getSessionSetting("plugin.configure.job"); 488 488 if (job != null) 489 489 { … … 509 509 pcRequest = pluginResponse.getNextRequest(); 510 510 sc.setSessionSetting("plugin.configure.request", pcRequest); 511 PluginDefinition plugin = (PluginDefinition)sc.getSessionSetting("plugin.configure.plugin");511 PluginDefinition plugin = sc.getSessionSetting("plugin.configure.plugin"); 512 512 forward = getJspPage(pcRequest, plugin, "configure.jsp", root); 513 513 } 514 514 else if (status == Response.Status.ERROR) 515 515 { 516 PluginDefinition plugin = (PluginDefinition)sc.getSessionSetting("plugin.configure.plugin");516 PluginDefinition plugin = sc.getSessionSetting("plugin.configure.plugin"); 517 517 if (parseErrors.size() > 0) 518 518 { … … 541 541 { 542 542 dc = sc.newDbControl(); 543 Job job = (Job)sc.getSessionSetting("plugin.configure.job");543 Job job = sc.getSessionSetting("plugin.configure.job"); 544 544 if (job.isInDatabase()) 545 545 { … … 551 551 } 552 552 553 PluginResponse pluginResponse = (PluginResponse)sc.getSessionSetting("plugin.configure.response");553 PluginResponse pluginResponse = sc.getSessionSetting("plugin.configure.response"); 554 554 boolean executeImmediately = 555 555 pluginResponse != null && pluginResponse.getStatus() == Response.Status.EXECUTE_IMMEDIATELY; … … 593 593 { 594 594 out.clearBuffer(); 595 PluginResponse pluginResponse = (PluginResponse)sc.getSessionSetting("plugin.configure.response");595 PluginResponse pluginResponse = sc.getSessionSetting("plugin.configure.response"); 596 596 ExportOutputStream exportStream = new ServletExportOutputStream(response); 597 597 SimpleSignalProgressReporter progress = new SimpleSignalProgressReporter(null); … … 622 622 else if ("CancelWizard".equals(cmd)) 623 623 { 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"); 627 626 if (progress != null) progress.sendToAll(new SimpleSignalSender(Signal.ABORT)); 628 627 if (pcRequest != null) pcRequest.done(); -
trunk/www/common/plugin/parse_file.jsp
r7494 r7605 66 66 String path = request.getParameter("path"); 67 67 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"); 69 69 Plugin plugin = pcRequest.getPlugin(); 70 70 -
trunk/www/common/plugin/progress.jsp
r6372 r7605 41 41 try 42 42 { 43 SimpleSignalProgressReporter progress = (SimpleSignalProgressReporter)sc.getSessionSetting("plugin.configure.progress.reporter");43 SimpleSignalProgressReporter progress = sc.getSessionSetting("plugin.configure.progress.reporter"); 44 44 //Return the progress information 45 45 if (progress != null) -
trunk/www/common/plugin/select_plugin.jsp
r6607 r7605 73 73 try 74 74 { 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"); 77 77 StringBuilder descriptions = new StringBuilder(); 78 78 -
trunk/www/common/progress_reporter.jsp
r6928 r7605 40 40 SessionControl sc = Base.getExistingSessionControl(pageContext, true); 41 41 42 SimpleProgressReporter progress = (SimpleProgressReporter)sc.getSessionSetting("progress." + progressName);42 SimpleProgressReporter progress = sc.getSessionSetting("progress." + progressName); 43 43 String message = null; 44 44 int percentDone = 0; -
trunk/www/common/share/share.jsp
r7212 r7605 86 86 try 87 87 { 88 final MultiPermissions mp = (MultiPermissions)sc.getCurrentContext(itemType, subContext).getObject("MultiPermissions");88 final MultiPermissions mp = sc.getCurrentContext(itemType, subContext).getObject("MultiPermissions"); 89 89 if (mp == null) 90 90 { -
trunk/www/common/share/submit_share.jsp
r6322 r7605 72 72 { 73 73 ItemContext cc = sc.getCurrentContext(itemType, subContext); 74 MultiPermissions mp = (MultiPermissions)cc.getObject("MultiPermissions");74 MultiPermissions mp = cc.getObject("MultiPermissions"); 75 75 boolean recursive = Values.getBoolean(request.getParameter("recursive")); 76 76 -
trunk/www/filemanager/directories/index.jsp
r7604 r7605 137 137 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 138 138 dc = sc.newDbControl(); 139 Directory directory = (Directory)cc.getObject("item");139 Directory directory = cc.getObject("item"); 140 140 if (directory == null) 141 141 { -
trunk/www/filemanager/files/edit_file.jsp
r7604 r7605 79 79 boolean readCurrentFileServer = true; 80 80 FileServer currentFileServer = null; 81 List<FileServer> recentFileServers = (List<FileServer>)cc.getRecent(dc, Item.FILESERVER);81 List<FileServer> recentFileServers = cc.getRecent(dc, Item.FILESERVER); 82 82 boolean isURL = true; 83 83 -
trunk/www/filemanager/files/index.jsp
r7604 r7605 192 192 final int maxRecent = Base.getMaxRecent(sc); 193 193 dc = sc.newDbControl(); 194 File file = (File)cc.getObject("item");194 File file = cc.getObject("item"); 195 195 if (file == null) 196 196 { -
trunk/www/filemanager/fileservers/index.jsp
r7604 r7605 137 137 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 138 138 dc = sc.newDbControl(); 139 FileServer server = (FileServer)cc.getObject("item");139 FileServer server = cc.getObject("item"); 140 140 if (server == null) 141 141 { -
trunk/www/filemanager/upload/ajax.jsp
r6124 r7605 48 48 if ("GetProgress".equals(cmd)) 49 49 { 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"); 52 52 53 53 if (unpackProgress != null) … … 70 70 else if ("Abort".equals(cmd)) 71 71 { 72 final FileUploadProgress progress = (FileUploadProgress)sc.getSessionSetting("FileUploadProgress");72 final FileUploadProgress progress = sc.getSessionSetting("FileUploadProgress"); 73 73 if (progress != null) progress.setAbort(); 74 74 } -
trunk/www/include/menu.jsp
r7531 r7605 1250 1250 // Extensions menu 1251 1251 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext); 1252 ExtensionsInvoker<MenuItemAction> invoker = 1253 (ExtensionsInvoker<MenuItemAction>)ExtensionsControl.useExtensions(jspContext, 1252 ExtensionsInvoker<MenuItemAction> invoker = ExtensionsControl.useExtensions(jspContext, 1254 1253 "net.sf.basedb.clients.web.menu.extensions"); 1255 1254 ExtensionsControl ec = ExtensionsControl.get(dc); -
trunk/www/lims/arraybatches/edit_batch.jsp
r7604 r7605 85 85 86 86 // 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); 90 90 91 91 int activeProjectId = sc.getActiveProjectId(); … … 95 95 try 96 96 { 97 defaultArrayDesigns = (List<ArrayDesign>)activeProject.findDefaultItems(dc, Item.ARRAYDESIGN, true);97 defaultArrayDesigns = activeProject.findDefaultItems(dc, Item.ARRAYDESIGN, true); 98 98 } 99 99 catch (PermissionDeniedException pdex) … … 101 101 try 102 102 { 103 defaultProtocols = (List<Protocol>)activeProject.findDefaultItems(dc,103 defaultProtocols = activeProject.findDefaultItems(dc, 104 104 ItemSubtype.getById(dc, SystemItems.getId(Protocol.PRINTING)), false); 105 105 } … … 108 108 try 109 109 { 110 defaultPrintRobots = (List<Hardware>)activeProject.findDefaultItems(dc,110 defaultPrintRobots = activeProject.findDefaultItems(dc, 111 111 ItemSubtype.getById(dc, SystemItems.getId(Hardware.PRINT_ROBOT)), false); 112 112 } -
trunk/www/lims/arraybatches/index.jsp
r7604 r7605 142 142 final int maxRecent = Base.getMaxRecent(sc); 143 143 dc = sc.newDbControl(); 144 ArrayBatch batch = (ArrayBatch)cc.getObject("item");144 ArrayBatch batch = cc.getObject("item"); 145 145 if (batch == null) 146 146 { -
trunk/www/lims/arraybatches/list_batches.jsp
r7604 r7605 253 253 { 254 254 AnnotationType at = loader.getAnnotationType(); 255 @SuppressWarnings("rawtypes") 256 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 255 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 257 256 Enumeration<String, String> annotationEnum = null; 258 257 if (at.isEnumeration()) -
trunk/www/lims/arraydesigns/edit_design.jsp
r7604 r7605 87 87 try 88 88 { 89 defaultPlatforms = (List<Platform>)activeProject.findDefaultItems(dc, Item.PLATFORM, true);89 defaultPlatforms = activeProject.findDefaultItems(dc, Item.PLATFORM, true); 90 90 } 91 91 catch (PermissionDeniedException pdex) … … 93 93 try 94 94 { 95 defaultVariants = (List<PlatformVariant>)activeProject.findDefaultItems(dc, Item.PLATFORMVARIANT, true);95 defaultVariants = activeProject.findDefaultItems(dc, Item.PLATFORMVARIANT, true); 96 96 } 97 97 catch (PermissionDeniedException pdex) -
trunk/www/lims/arraydesigns/features/view_feature.jsp
r7604 r7605 298 298 { 299 299 String name = ep.getName(); 300 @SuppressWarnings("rawtypes") 301 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 300 Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 302 301 String value = f.format(reporter.getExtended(name)); 303 302 %> -
trunk/www/lims/arraydesigns/index.jsp
r7604 r7605 169 169 final int maxRecent = Base.getMaxRecent(sc); 170 170 dc = sc.newDbControl(); 171 ArrayDesign design = (ArrayDesign)cc.getObject("item");171 ArrayDesign design = cc.getObject("item"); 172 172 173 173 String[] pv = request.getParameter("platform").split(":"); … … 416 416 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 417 417 dc = sc.newDbControl(); 418 ArrayDesign design = (ArrayDesign)cc.getObject("item");418 ArrayDesign design = cc.getObject("item"); 419 419 dc.reattachItem(design, false); 420 420 -
trunk/www/lims/arraydesigns/list_designs.jsp
r7604 r7605 356 356 { 357 357 AnnotationType at = loader.getAnnotationType(); 358 @SuppressWarnings("rawtypes") 359 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 358 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 360 359 Enumeration<String, String> annotationEnum = null; 361 360 if (at.isEnumeration()) -
trunk/www/lims/arrayslides/create_wizard.jsp
r6684 r7605 64 64 65 65 // Load recently used items 66 List<ArrayBatch> recentArrayBatches = (List<ArrayBatch>)cc.getRecent(dc, Item.ARRAYBATCH);66 List<ArrayBatch> recentArrayBatches = cc.getRecent(dc, Item.ARRAYBATCH); 67 67 68 68 title = "Create array slides"; -
trunk/www/lims/arrayslides/edit_slide.jsp
r7604 r7605 75 75 76 76 // Load recently used items 77 List<ArrayBatch> recentArrayBatches = (List<ArrayBatch>)cc.getRecent(dc, Item.ARRAYBATCH);77 List<ArrayBatch> recentArrayBatches = cc.getRecent(dc, Item.ARRAYBATCH); 78 78 79 79 if (itemId == 0) -
trunk/www/lims/arrayslides/index.jsp
r7604 r7605 146 146 final int maxRecent = Base.getMaxRecent(sc); 147 147 dc = sc.newDbControl(); 148 ArraySlide slide = (ArraySlide)cc.getObject("item");148 ArraySlide slide = cc.getObject("item"); 149 149 if (slide == null) 150 150 { -
trunk/www/lims/arrayslides/list_slides.jsp
r7604 r7605 262 262 { 263 263 AnnotationType at = loader.getAnnotationType(); 264 @SuppressWarnings("rawtypes") 265 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 264 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 266 265 Enumeration<String, String> annotationEnum = null; 267 266 if (at.isEnumeration()) -
trunk/www/lims/geometries/index.jsp
r7604 r7605 156 156 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 157 157 dc = sc.newDbControl(); 158 PlateGeometry geometry = (PlateGeometry)cc.getObject("item");158 PlateGeometry geometry = cc.getObject("item"); 159 159 if (geometry == null) 160 160 { -
trunk/www/lims/platemappings/index.jsp
r7604 r7605 138 138 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 139 139 dc = sc.newDbControl(); 140 PlateMapping mapping = (PlateMapping)cc.getObject("item");140 PlateMapping mapping = cc.getObject("item"); 141 141 if (mapping == null) 142 142 { -
trunk/www/lims/plates/events/edit_event.jsp
r7604 r7605 94 94 95 95 // 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); 98 98 99 99 ItemResultList<PlateEventType> eventTypes = null; … … 121 121 } 122 122 123 eventDate = (Date)cc.getPropertyObject("eventDate");123 eventDate = cc.getPropertyObject("eventDate"); 124 124 } 125 125 else -
trunk/www/lims/plates/events/index.jsp
r7604 r7605 136 136 final int maxRecent = Base.getMaxRecent(sc); 137 137 dc = sc.newDbControl(); 138 PlateEvent event = (PlateEvent)cc.getObject("item");138 PlateEvent event = cc.getObject("item"); 139 139 if (event == null) 140 140 { -
trunk/www/lims/plates/index.jsp
r7604 r7605 139 139 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 140 140 dc = sc.newDbControl(); 141 Plate plate = (Plate)cc.getObject("item");141 Plate plate = cc.getObject("item"); 142 142 if (plate == null) 143 143 { -
trunk/www/lims/plates/list_plates.jsp
r7604 r7605 295 295 { 296 296 AnnotationType at = loader.getAnnotationType(); 297 @SuppressWarnings("rawtypes") 298 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 297 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 299 298 Enumeration<String, String> annotationEnum = null; 300 299 if (at.isEnumeration()) -
trunk/www/lims/plates/merge_plates.jsp
r6312 r7605 54 54 55 55 // 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); 58 58 %> 59 59 -
trunk/www/lims/plates/wells/index.jsp
r7604 r7605 129 129 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 130 130 dc = sc.newDbControl(); 131 Well well = (Well)cc.getObject("item");131 Well well = cc.getObject("item"); 132 132 dc.reattachItem(well, false); 133 133 message = "Well updated"; -
trunk/www/lims/plates/wells/list_wells.jsp
r7604 r7605 364 364 AnnotationType at = loader.getAnnotationType(); 365 365 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()); 368 367 if (at.isEnumeration()) 369 368 { -
trunk/www/lims/plates/wells/view_well.jsp
r7604 r7605 309 309 { 310 310 String name = ep.getName(); 311 @SuppressWarnings("rawtypes") 312 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 311 Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 313 312 String value = f.format(reporter.getExtended(name)); 314 313 %> -
trunk/www/lims/platetypes/eventtypes/edit_eventtype.jsp
r7604 r7605 78 78 79 79 // Load recently used items 80 List<ItemSubtype> recentProtocolTypes = (List<ItemSubtype>)cc.getRecent(dc, Item.ITEMSUBTYPE);80 List<ItemSubtype> recentProtocolTypes = cc.getRecent(dc, Item.ITEMSUBTYPE); 81 81 82 82 if (itemId == 0) -
trunk/www/lims/platetypes/eventtypes/index.jsp
r7604 r7605 131 131 final int maxRecent = Base.getMaxRecent(sc); 132 132 dc = sc.newDbControl(); 133 PlateEventType eventType = (PlateEventType)cc.getObject("item");133 PlateEventType eventType = cc.getObject("item"); 134 134 if (eventType == null) 135 135 { -
trunk/www/lims/platetypes/index.jsp
r7604 r7605 160 160 final int maxRecent = Base.getMaxRecent(sc); 161 161 dc = sc.newDbControl(); 162 PlateType plateType = (PlateType)cc.getObject("item");162 PlateType plateType = cc.getObject("item"); 163 163 if (plateType == null) 164 164 { -
trunk/www/login.jsp
r7540 r7605 179 179 User user = User.getById(dc, sc.getLoggedInUserId()); 180 180 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"); 182 182 Iterator<StartPageAction> it = invoker.iterator(); 183 183 while (it.hasNext()) -
trunk/www/logout.jsp
r6607 r7605 52 52 if (sc.isImpersonated()) 53 53 { 54 SessionControl original = (SessionControl)sc.getSessionSetting("impersonate.originalSessionControl");54 SessionControl original = sc.getSessionSetting("impersonate.originalSessionControl"); 55 55 boolean revert = Values.getBoolean(request.getParameter("revert")); 56 56 if (revert) … … 86 86 if (sc.isImpersonated()) 87 87 { 88 User originalUser = (User)sc.getSessionSetting("impersonate.originalUser");88 User originalUser = sc.getSessionSetting("impersonate.originalUser"); 89 89 if (originalUser != null) 90 90 { -
trunk/www/main.jsp
r7540 r7605 86 86 ItemResultIterator<News> news = null; 87 87 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"); 89 89 90 90 LoginFormAction loginAction = null; -
trunk/www/my_base/projects/edit_project.jsp
r7604 r7605 142 142 PermissionTemplate currentPermissionTemplate = null; 143 143 144 List<PermissionTemplate> recentPermissionTemplates = (List<PermissionTemplate>)cc.getRecent(dc, Item.PERMISSIONTEMPLATE);144 List<PermissionTemplate> recentPermissionTemplates = cc.getRecent(dc, Item.PERMISSIONTEMPLATE); 145 145 146 146 if (itemId == 0) -
trunk/www/my_base/projects/index.jsp
r7604 r7605 146 146 final int maxRecent = Base.getMaxRecent(sc); 147 147 dc = sc.newDbControl(); 148 Project project = (Project)cc.getObject("item");148 Project project = cc.getObject("item"); 149 149 if (project == null) 150 150 { -
trunk/www/my_base/projects/items/list_items.jsp
r7604 r7605 129 129 int numListed = 0; 130 130 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, project); 131 ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext,131 ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext, 132 132 "net.sf.basedb.clients.web.toolbar.list.all", 133 133 "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, 135 135 "net.sf.basedb.clients.web.listcolumn.projectitems"); 136 136 %> -
trunk/www/my_base/projects/list_projects.jsp
r7604 r7605 205 205 AnnotationType at = loader.getAnnotationType(); 206 206 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()); 209 208 if (at.isEnumeration()) 210 209 { -
trunk/www/my_base/user/preferences.jsp
r7502 r7605 126 126 127 127 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"); 130 130 %> 131 131 <base:page type="popup" title="<%="Preferences for "+HTML.encodeTags(user.getName())%>" id="preferences"> -
trunk/www/my_base/user/reset_filters.jsp
r7604 r7605 56 56 final Set<Item> items = new TreeSet<Item>(new ToStringComparator<Item>(false)); 57 57 final Set<Item> dbOnly = new HashSet<Item>(); 58 Iterator<ItemContext> it = new NestedIterator< >(inMemory, inDatabase);58 Iterator<ItemContext> it = new NestedIterator<ItemContext>(inMemory, inDatabase); 59 59 for (ItemContext ctx : inMemory) 60 60 { -
trunk/www/my_base/user/settings.jsp
r7587 r7605 100 100 String htmlDateTimeFormat = HTML.encodeTags(dateTimeFormat); 101 101 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"); 103 103 %> 104 104 <base:page type="popup" title="<%=title%>"> -
trunk/www/my_base/user/submit_user.jsp
r7604 r7605 80 80 ); 81 81 } 82 User user = (User)sc.getSessionSetting("user");82 User user = sc.getSessionSetting("user"); 83 83 dc.reattachItem(user, false); 84 84 85 85 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"); 87 87 try 88 88 { … … 150 150 { 151 151 String verificationCode = request.getParameter("verificationCode"); 152 User user = (User)sc.getSessionSetting("user");152 User user = sc.getSessionSetting("user"); 153 153 dc.reattachItem(user, false); 154 154 user.enableDeviceVerification(verificationCode); … … 160 160 User user = User.getById(dc, sc.getLoggedInUserId()); 161 161 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"); 163 163 try 164 164 { -
trunk/www/plugins/net/sf/basedb/clients/web/plugins/simple_export.jsp
r7090 r7605 46 46 final String subContext = Values.getString(request.getParameter("subcontext"), ""); 47 47 final 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");48 final String defaultColumns = cc.getObject("defaultColumns"); 49 String errorMessage = sc.getSessionSetting("plugin.configure.errors.message"); 50 List<Throwable> errors = sc.getSessionSetting("plugin.configure.errors.list"); 51 51 %> 52 52 <base:page type="popup" title="Export"> -
trunk/www/plugins/net/sf/basedb/plugins/executor/external_plugin_parameters.jsp
r6986 r7605 66 66 try 67 67 { 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"); 71 71 RequestInformation ri = pcRequest.getRequestInformation(); 72 72 String title = HTML.encodeTags(ri.getTitle()); … … 75 75 if (helpText == null) helpText = plugin.getDescription(); 76 76 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"); 79 79 80 80 String xml = request.getParameter("parameter:externalParameters"); -
trunk/www/plugins/net/sf/basedb/plugins/jep_extra_value_calculator.jsp
r7604 r7605 66 66 final String ID = sc.getId(); 67 67 ItemContext cc = sc.getCurrentContext(Item.BIOASSAYSET); 68 ItemContext realContext = (ItemContext)sc.getSessionSetting("plugin.configure.currentContext");68 ItemContext realContext = sc.getSessionSetting("plugin.configure.currentContext"); 69 69 if (realContext == null) realContext = cc; 70 70 DbControl dc = null; 71 71 try 72 72 { 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"); 75 75 76 76 dc = sc.newDbControl(); 77 Job job = (Job)sc.getSessionSetting("plugin.configure.job");77 Job job = sc.getSessionSetting("plugin.configure.job"); 78 78 dc.reattachItem(job, false); 79 79 BioAssaySet source = null; 80 if (job != null) source = (BioAssaySet)job.getParameterValue("source");80 if (job != null) source = job.getParameterValue("source"); 81 81 if (source == null && cc.getId() != 0) source = BioAssaySet.getById(dc, cc.getId()); 82 82 if (source == null) throw new WebException("popup", "No current bioassay set", … … 89 89 //Find selected bioassays 90 90 List<BioAssay> bioAssays = null; 91 if (job != null) bioAssays = (List<BioAssay>)job.getParameterValues("bioAssays");91 if (job != null) bioAssays = job.getParameterValues("bioAssays"); 92 92 if (bioAssays == null) 93 93 { … … 113 113 114 114 // 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"); 117 117 118 118 … … 134 134 135 135 // Load recently used items 136 List<ExtraValueType> recentExtraValueTypes = (List<ExtraValueType>)realContext.getRecent(dc, Item.EXTRAVALUETYPE);136 List<ExtraValueType> recentExtraValueTypes = realContext.getRecent(dc, Item.EXTRAVALUETYPE); 137 137 %> 138 138 <base:page type="popup" title="Calculate extra value"> -
trunk/www/plugins/net/sf/basedb/plugins/jep_filter.jsp
r7604 r7605 70 70 try 71 71 { 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"); 74 74 75 75 dc = sc.newDbControl(); 76 Job job = (Job)sc.getSessionSetting("plugin.configure.job");76 Job job = sc.getSessionSetting("plugin.configure.job"); 77 77 dc.reattachItem(job, false); 78 BioAssaySet source = null; 79 source = (BioAssaySet)job.getParameterValue("source"); 78 BioAssaySet source = job.getParameterValue("source"); 80 79 if (source == null && cc.getId() != 0) source = BioAssaySet.getById(dc, cc.getId()); 81 80 if (source == null) throw new WebException("popup", "No current bioassay set", … … 87 86 88 87 // Find selected bioassays 89 List<BioAssay> bioAssays = null; 90 bioAssays = (List<BioAssay>)job.getParameterValues("bioAssays"); 88 List<BioAssay> bioAssays = job.getParameterValues("bioAssays"); 91 89 if (bioAssays == null) 92 90 { … … 112 110 113 111 // Current parameter values 114 String childName = Values.getString( (String)job.getParameterValue("childName"),112 String childName = Values.getString(job.getParameterValue("childName"), 115 113 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"); 120 118 121 119 // Predefined formulas -
trunk/www/plugins/net/sf/basedb/plugins/jep_intensity_transformer.jsp
r6320 r7605 56 56 try 57 57 { 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"); 62 62 RequestInformation info = pcRequest.getRequestInformation(); 63 63 64 64 dc = sc.newDbControl(); 65 Job job = (Job)sc.getSessionSetting("plugin.configure.job");65 Job job = sc.getSessionSetting("plugin.configure.job"); 66 66 dc.reattachItem(job, false); 67 67 BioAssaySet source = null; -
trunk/www/switch.jsp
r7542 r7605 64 64 { 65 65 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"); 67 67 68 68 LoginFormAction loginAction = null; -
trunk/www/views/derivedbioassays/edit_bioassay.jsp
r7604 r7605 163 163 { 164 164 // 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); 166 166 currentSubtype = ListUtil.findFirstCommon(recentSubtypes, relatedToParent, relatedToParent.get(0)); 167 167 } … … 250 250 { 251 251 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); 255 255 } 256 256 257 257 // 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); 262 262 263 263 // Query to retrieve item types -
trunk/www/views/derivedbioassays/index.jsp
r7604 r7605 199 199 dc = sc.newDbControl(); 200 200 201 DerivedBioAssay bas = (DerivedBioAssay)cc.getObject("item");201 DerivedBioAssay bas = cc.getObject("item"); 202 202 if (bas == null) 203 203 { -
trunk/www/views/derivedbioassays/list_bioassays.jsp
r7604 r7605 366 366 { 367 367 AnnotationType at = loader.getAnnotationType(); 368 @SuppressWarnings("rawtypes") 369 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 368 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 370 369 Enumeration<String, String> annotationEnum = null; 371 370 if (at.isEnumeration()) -
trunk/www/views/devices/index.jsp
r7604 r7605 125 125 final int maxRecent = Base.getMaxRecent(sc); 126 126 dc = sc.newDbControl(); 127 UserDevice device = (UserDevice)cc.getObject("item");127 UserDevice device = cc.getObject("item"); 128 128 if (device == null) 129 129 { -
trunk/www/views/experiments/bioassays/index.jsp
r7604 r7605 140 140 // Update the properties on an item (will close the popup) 141 141 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 142 BioAssay ba = (BioAssay)cc.getObject("item");142 BioAssay ba = cc.getObject("item"); 143 143 if (ba != null) 144 144 { -
trunk/www/views/experiments/bioassays/list_bioassays.jsp
r7604 r7605 155 155 guiContext, bioAssaySet); 156 156 ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); 157 ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = (ExtensionsInvoker<OverviewPlotAction>)ExtensionsControl.useExtensions(jspContext,157 ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = ExtensionsControl.useExtensions(jspContext, 158 158 "net.sf.basedb.clients.web.bioassayset.overviewplots"); 159 159 %> … … 279 279 AnnotationType at = loader.getAnnotationType(); 280 280 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()); 283 282 if (at.isEnumeration()) 284 283 { … … 314 313 { 315 314 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()); 318 316 if (at.isEnumeration()) 319 317 { -
trunk/www/views/experiments/bioassaysets/analysis_tree.jsp
r7604 r7605 337 337 } 338 338 // 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"); 340 340 int numListed = 0; 341 341 342 342 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, 343 343 guiContext, root == null ? experiment : root); 344 ExtensionsInvoker<ButtonAction> toolsInvoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext,344 ExtensionsInvoker<ButtonAction> toolsInvoker = ExtensionsControl.useExtensions(jspContext, 345 345 "net.sf.basedb.clients.web.bioassayset.list.tools"); 346 346 ExtensionsInvoker<ButtonAction> toolbarInvoker = ToolbarUtil.useExtensions(jspContext); … … 478 478 AnnotationType at = loader.getAnnotationType(); 479 479 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()); 482 481 if (at.isEnumeration()) 483 482 { -
trunk/www/views/experiments/bioassaysets/index.jsp
r7604 r7605 206 206 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 207 207 208 BioAssaySet bas = (BioAssaySet)cc.getObject("item");208 BioAssaySet bas = cc.getObject("item"); 209 209 if (bas != null) 210 210 { -
trunk/www/views/experiments/bioassaysets/view_bioassayset.jsp
r7604 r7605 148 148 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, bioAssaySet); 149 149 ExtensionsInvoker<ButtonAction> toolbarInvoker = ToolbarUtil.useExtensions(jspContext); 150 ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = (ExtensionsInvoker<OverviewPlotAction>)ExtensionsControl.useExtensions(jspContext,150 ExtensionsInvoker<OverviewPlotAction> overviewPlotInvoker = ExtensionsControl.useExtensions(jspContext, 151 151 "net.sf.basedb.clients.web.bioassayset.overviewplots"); 152 152 %> -
trunk/www/views/experiments/clone_reporters.jsp
r6315 r7605 76 76 } 77 77 78 List<ReporterCloneTemplate> recentTemplates = (List<ReporterCloneTemplate>)cc.getRecent(dc, Item.REPORTERCLONETEMPLATE);78 List<ReporterCloneTemplate> recentTemplates = cc.getRecent(dc, Item.REPORTERCLONETEMPLATE); 79 79 %> 80 80 <base:page type="popup" title="<%=title%>"> -
trunk/www/views/experiments/edit_experiment.jsp
r7604 r7605 95 95 Directory currentDirectory = null; 96 96 97 List<Directory> recentDirectories = (List<Directory>)cc.getRecent(dc, Item.DIRECTORY);97 List<Directory> recentDirectories = cc.getRecent(dc, Item.DIRECTORY); 98 98 99 99 int activeProjectId = sc.getActiveProjectId(); … … 374 374 <input class="text" style="width: 15em;" type="text" name="publicationDate" id="publicationDate" 375 375 value="<%=HTML.encodeTags(dateFormatter.format(experiment == null ? 376 (Date)cc.getPropertyObject("publicationDate") : experiment.getPublicationDate()))%>"376 cc.getPropertyObject("publicationDate") : experiment.getPublicationDate()))%>" 377 377 maxlength="20" title="Enter date in format: <%=htmlDateFormat%>"> 378 378 </td> -
trunk/www/views/experiments/index.jsp
r7604 r7605 158 158 dc = sc.newDbControl(); 159 159 160 Experiment experiment = (Experiment)cc.getObject("item");160 Experiment experiment = cc.getObject("item"); 161 161 if (experiment == null) 162 162 { -
trunk/www/views/experiments/list_experiments.jsp
r7604 r7605 334 334 { 335 335 AnnotationType at = loader.getAnnotationType(); 336 @SuppressWarnings("rawtypes") 337 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 336 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 338 337 Enumeration<String, String> annotationEnum = null; 339 338 if (at.isEnumeration()) -
trunk/www/views/experiments/rootrawbioassays/index.jsp
r7604 r7605 85 85 // Update the properties on an item (will close the popup) 86 86 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 87 RootRawBioAssay ba = (RootRawBioAssay)cc.getObject("item");87 RootRawBioAssay ba = cc.getObject("item"); 88 88 if (ba != null) 89 89 { -
trunk/www/views/experiments/rootrawbioassays/view_bioassay.jsp
r7604 r7605 273 273 274 274 List<?> values = null; 275 @SuppressWarnings("rawtypes") 276 Formatter formatter = FormatterFactory.getTypeFormatter(sc, valueType); 275 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, valueType); 277 276 Nameable parentItem = null; 278 277 String parentType = ""; -
trunk/www/views/experiments/spotdata/list_spotdata.jsp
r7604 r7605 145 145 ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); 146 146 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"); 148 148 %> 149 149 <base:page title="<%=title%>"> -
trunk/www/views/experiments/transformations/index.jsp
r7604 r7605 117 117 // Update the properties on an item (will close the popup) 118 118 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); 119 Transformation t = (Transformation)cc.getObject("item");119 Transformation t = cc.getObject("item"); 120 120 if (t != null) 121 121 { -
trunk/www/views/experiments/view_experiment.jsp
r7604 r7605 625 625 { 626 626 Set<Object> values = entry.getValue(); 627 @SuppressWarnings("rawtypes") 628 Formatter formatter = FormatterFactory.getTypeFormatter(sc, valueType); 627 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, valueType); 629 628 Unit unit = at.getDefaultUnit(); 630 629 if (unit != null) formatter = unit.getFormatter(formatter); -
trunk/www/views/formulas/index.jsp
r7604 r7605 144 144 final int maxRecent = Base.getMaxRecent(sc); 145 145 dc = sc.newDbControl(); 146 Formula formula = (Formula)cc.getObject("item");146 Formula formula = cc.getObject("item"); 147 147 if (formula == null) 148 148 { -
trunk/www/views/itemlists/index.jsp
r7604 r7605 223 223 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 224 224 dc = sc.newDbControl(); 225 ItemList list = (ItemList)cc.getObject("item");225 ItemList list = cc.getObject("item"); 226 226 227 227 if (list == null) … … 280 280 boolean useSyncFilter = false; 281 281 ItemContext filterContext = sc.getCurrentContext(list.getMemberType(), subContext); 282 ItemQuery<? extends Listable> query = (ItemQuery<? extends Listable>)filterContext.getQuery();282 ItemQuery<? extends Listable> query = filterContext.getQuery(); 283 283 if ("all".equals(source)) 284 284 { … … 498 498 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 499 499 dc = sc.newDbControl(); 500 ItemList itemList = (ItemList)cc.getObject("item");500 ItemList itemList = cc.getObject("item"); 501 501 dc.reattachItem(itemList, false); 502 502 -
trunk/www/views/itemlists/list_lists.jsp
r7604 r7605 290 290 AnnotationType at = loader.getAnnotationType(); 291 291 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()); 294 293 if (at.isEnumeration()) 295 294 { -
trunk/www/views/itemlists/members/list_members.jsp
r7604 r7605 296 296 AnnotationType at = loader.getAnnotationType(); 297 297 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()); 300 299 if (at.isEnumeration()) 301 300 { -
trunk/www/views/itemlists/syncfilter/ajax.jsp
r7564 r7605 75 75 // Get the current sync filter item we are editing 76 76 ItemContext cc = sc.getCurrentContext(Item.SYNCFILTER); 77 SyncFilter syncFilter = (SyncFilter)cc.getObject("item");77 SyncFilter syncFilter = cc.getObject("item"); 78 78 79 79 // Get the requested source item type in the edit dialog … … 104 104 { 105 105 ItemContext cc = sc.getCurrentContext(Item.SYNCFILTER); 106 syncFilter = (SyncFilter)cc.getObject("item");106 syncFilter = cc.getObject("item"); 107 107 } 108 108 else … … 139 139 // Get the current sync filter item we are editing 140 140 ItemContext cc = sc.getCurrentContext(Item.SYNCFILTER); 141 syncFilter = (SyncFilter)cc.getObject("item");141 syncFilter = cc.getObject("item"); 142 142 143 143 // Get the requested source item type in the edit dialog -
trunk/www/views/itemlists/syncfilter/index.jsp
r7604 r7605 105 105 dc = sc.newDbControl(); 106 106 107 SyncFilter syncFilter = (SyncFilter)cc.getObject("item");107 SyncFilter syncFilter = cc.getObject("item"); 108 108 if (syncFilter.isInDatabase()) 109 109 { -
trunk/www/views/items/list_items.jsp
r7604 r7605 127 127 int numListed = 0; 128 128 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext); 129 ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext,129 ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext, 130 130 "net.sf.basedb.clients.web.toolbar.list.all", 131 131 "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, 133 133 "net.sf.basedb.clients.web.listcolumn.allitems"); 134 134 %> -
trunk/www/views/permissiontemplates/index.jsp
r7604 r7605 135 135 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 136 136 dc = sc.newDbControl(); 137 PermissionTemplate template = (PermissionTemplate)cc.getObject("item");137 PermissionTemplate template = cc.getObject("item"); 138 138 if (template == null) 139 139 { -
trunk/www/views/physicalbioassays/edit_bioassay.jsp
r7604 r7605 128 128 } 129 129 name = Values.getString(cc.getPropertyValue("name"), "New physical bioassay"); 130 eventDate = (Date)cc.getPropertyObject("creationEvent.eventDate");130 eventDate = cc.getPropertyObject("creationEvent.eventDate"); 131 131 132 132 int currentSubtypeId = Values.getInt(request.getParameter("subtype_id")); … … 168 168 { 169 169 // 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); 171 171 currentSubtype = ListUtil.findFirstCommon(recentSubtypes, relatedToParent, relatedToParent.get(0)); 172 172 } … … 232 232 233 233 // Query to retrieve source extracts 234 ItemQuery<Extract> extractsQuery = (ItemQuery<Extract>)creationEvent.getSources();234 ItemQuery<Extract> extractsQuery = creationEvent.getSources(); 235 235 extractsQuery.include(Include.ALL); 236 236 extractsQuery.order(Orders.asc(Hql.property("srcevt", "position"))); … … 247 247 { 248 248 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); 251 251 } 252 252 253 253 // 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); 257 257 258 258 // Query to retrieve item types -
trunk/www/views/physicalbioassays/index.jsp
r7604 r7605 178 178 final int maxRecent = Base.getMaxRecent(sc); 179 179 dc = sc.newDbControl(); 180 PhysicalBioAssay pba = (PhysicalBioAssay)cc.getObject("item");180 PhysicalBioAssay pba = cc.getObject("item"); 181 181 BioMaterialEvent creationEvent = null; 182 182 if (pba == null) -
trunk/www/views/physicalbioassays/list_bioassays.jsp
r7604 r7605 329 329 { 330 330 AnnotationType at = loader.getAnnotationType(); 331 @SuppressWarnings("rawtypes") 332 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 331 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 333 332 Enumeration<String, String> annotationEnum = null; 334 333 if (at.isEnumeration()) -
trunk/www/views/rawbioassays/edit_rawbioassay.jsp
r7604 r7605 109 109 110 110 // 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); 117 117 118 118 int activeProjectId = sc.getActiveProjectId(); … … 122 122 try 123 123 { 124 defaultProtocols = (List<Protocol>)activeProject.findDefaultItems(dc,124 defaultProtocols = activeProject.findDefaultItems(dc, 125 125 ItemSubtype.getById(dc, SystemItems.getId(Protocol.FEATURE_EXTRACTION)), false); 126 126 } … … 129 129 try 130 130 { 131 defaultSoftware = (List<Software>)activeProject.findDefaultItems(dc,131 defaultSoftware = activeProject.findDefaultItems(dc, 132 132 ItemSubtype.getById(dc, SystemItems.getId(Software.FEATURE_EXTRACTION)), false); 133 133 } … … 136 136 try 137 137 { 138 defaultArrayDesigns = (List<ArrayDesign>)activeProject.findDefaultItems(dc, Item.ARRAYDESIGN, true);138 defaultArrayDesigns = activeProject.findDefaultItems(dc, Item.ARRAYDESIGN, true); 139 139 } 140 140 catch (PermissionDeniedException pdex) … … 142 142 try 143 143 { 144 defaultPlatforms = (List<Platform>)activeProject.findDefaultItems(dc, Item.PLATFORM, true);144 defaultPlatforms = activeProject.findDefaultItems(dc, Item.PLATFORM, true); 145 145 } 146 146 catch (PermissionDeniedException pdex) … … 148 148 try 149 149 { 150 defaultVariants = (List<PlatformVariant>)activeProject.findDefaultItems(dc, Item.PLATFORMVARIANT, true);150 defaultVariants = activeProject.findDefaultItems(dc, Item.PLATFORMVARIANT, true); 151 151 } 152 152 catch (PermissionDeniedException pdex) -
trunk/www/views/rawbioassays/index.jsp
r7604 r7605 254 254 final int maxRecent = Base.getMaxRecent(sc); 255 255 dc = sc.newDbControl(); 256 RawBioAssay rba = (RawBioAssay)cc.getObject("item");256 RawBioAssay rba = cc.getObject("item"); 257 257 258 258 Platform platform = null; … … 663 663 } 664 664 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 */676 665 } 677 666 finally -
trunk/www/views/rawbioassays/list_rawbioassays.jsp
r7604 r7605 431 431 { 432 432 AnnotationType at = loader.getAnnotationType(); 433 @SuppressWarnings("rawtypes") 434 Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 433 Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); 435 434 Enumeration<String, String> annotationEnum = null; 436 435 if (at.isEnumeration()) -
trunk/www/views/rawbioassays/rawdata/view_rawdata.jsp
r7604 r7605 174 174 { 175 175 String name = rawProperty.getName(); 176 @SuppressWarnings("rawtypes") 177 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, rawProperty); 176 Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, rawProperty); 178 177 String value = f.format(rawData.getExtended(name)); 179 178 title = Values.trimString(rawProperty.getTitle(), 25); … … 269 268 { 270 269 String name = ep.getName(); 271 @SuppressWarnings("rawtypes") 272 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 270 Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 273 271 String value = f.format(reporter.getExtended(name)); 274 272 %> -
trunk/www/views/reporterlists/index.jsp
r7604 r7605 153 153 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 154 154 dc = sc.newDbControl(); 155 ReporterList rl = (ReporterList)cc.getObject("item");155 ReporterList rl = cc.getObject("item"); 156 156 if (rl == null) 157 157 { … … 193 193 if (query instanceof DataQuery) 194 194 { 195 DataResultIterator<ReporterData> result = ((DataQuery<ReporterData>)query).iterate(dc); 195 DataQuery<ReporterData> dataQuery = reporterContext.getQuery(); 196 DataResultIterator<ReporterData> result = dataQuery.iterate(dc); 196 197 while (result.hasNext()) 197 198 { … … 439 440 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, defaultContext); 440 441 dc = sc.newDbControl(); 441 ReporterList rl = (ReporterList)cc.getObject("item");442 ReporterList rl = cc.getObject("item"); 442 443 dc.reattachItem(rl, false); 443 444 -
trunk/www/views/reporters/index.jsp
r7604 r7605 137 137 final int maxRecent = Base.getMaxRecent(sc); 138 138 dc = sc.newDbControl(); 139 ReporterData reporter = (ReporterData)cc.getObject("item");139 ReporterData reporter = cc.getObject("item"); 140 140 if (reporter == null) 141 141 { -
trunk/www/views/reporters/view_reporter.jsp
r7604 r7605 225 225 { 226 226 String name = ep.getName(); 227 @SuppressWarnings("rawtypes") 228 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 227 Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 229 228 String value = f.format(reporter.getExtended(name)); 230 229 %> -
trunk/www/views/trashcan/list_trash.jsp
r7604 r7605 127 127 int numListed = 0; 128 128 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext); 129 ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext,129 ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext, 130 130 "net.sf.basedb.clients.web.toolbar.list.all", 131 131 "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, 133 133 "net.sf.basedb.clients.web.listcolumn.trashcan"); 134 134 %> -
trunk/www/views/trashcan/view_item.jsp
r7604 r7605 117 117 String link = Base.getLink(ID, HTML.encodeTags(name), item.getType(), itemId, writePermission); 118 118 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, item); 119 ExtensionsInvoker<ButtonAction> invoker = (ExtensionsInvoker<ButtonAction>)ExtensionsControl.useExtensions(jspContext,119 ExtensionsInvoker<ButtonAction> invoker = ExtensionsControl.useExtensions(jspContext, 120 120 "net.sf.basedb.clients.web.toolbar.item.all", 121 121 "net.sf.basedb.clients.web.toolbar.item.trashcan");
Note: See TracChangeset
for help on using the changeset viewer.