X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=server%2Fruntime%2Forg.argeo.server.jxl%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fserver%2Fjxl%2Fdao%2FJxlDaoSupport.java;h=01e027047ce7fc10d8563d092e7c103143d09dab;hb=1d5afdce3e91054f07ddd3c98309c363b4cf1d46;hp=64bcf03dc46e4f82aa72dd72289f49c9ab31a704;hpb=6a40c8111e3dfd7e2ca31a0d1aefd4d9579d2928;p=lgpl%2Fargeo-commons.git diff --git a/server/runtime/org.argeo.server.jxl/src/main/java/org/argeo/server/jxl/dao/JxlDaoSupport.java b/server/runtime/org.argeo.server.jxl/src/main/java/org/argeo/server/jxl/dao/JxlDaoSupport.java index 64bcf03dc..01e027047 100644 --- a/server/runtime/org.argeo.server.jxl/src/main/java/org/argeo/server/jxl/dao/JxlDaoSupport.java +++ b/server/runtime/org.argeo.server.jxl/src/main/java/org/argeo/server/jxl/dao/JxlDaoSupport.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2007-2012 Mathieu Baudier + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.argeo.server.jxl.dao; import java.io.InputStream; @@ -20,13 +35,12 @@ import jxl.WorkbookSettings; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.argeo.server.ArgeoServerException; +import org.argeo.ArgeoException; import org.argeo.server.dao.AbstractTabularDaoSupport; import org.argeo.server.dao.LightDaoSupport; import org.springframework.beans.BeanWrapper; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.ApplicationContextAware; -import org.springframework.core.io.Resource; import org.springframework.util.StringUtils; public class JxlDaoSupport extends AbstractTabularDaoSupport implements @@ -47,7 +61,7 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements loadSheet(sheet, references); } } catch (Exception e) { - throw new ArgeoServerException("Cannot load workbook", e); + throw new ArgeoException("Cannot load workbook", e); } } @@ -79,7 +93,7 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements if (keyProperty == null) keyProperty = fieldName; if (!espSt.hasMoreTokens()) - throw new ArgeoServerException("Badly formatted sheetname " + throw new ArgeoException("Badly formatted sheetname " + sheetName); String fieldValue = espSt.nextToken(); bw.setPropertyValue(fieldName, fieldValue); @@ -272,7 +286,7 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements String formula = ((FormulaCell) cell).getFormula(); int index = formula.indexOf('!'); if (index < 0) - throw new ArgeoServerException("Cannot interpret formula " + throw new ArgeoException("Cannot interpret formula " + formula); ; String targetSheet = formula.substring(0, index); @@ -332,17 +346,6 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements return false; } - /** - * @deprecated use - * {@link #overrideCell(Cell, BeanWrapper, String, String, Integer, List)} - * instead. This method is not called anymore. - */ - protected Boolean overrideCell(Cell cell, BeanWrapper bw, - String propertyName, String keyProperty, Integer row, - List references, Map> tempRefs) { - throw new UnsupportedOperationException(); - } - public void setEncoding(String encoding) { this.encoding = encoding; } @@ -351,11 +354,4 @@ public class JxlDaoSupport extends AbstractTabularDaoSupport implements this.locale = locale; } - /** @deprecated use {@link #setResources(List)} instead. */ - public void setWorkbooks(List workbooks) { - setResources(workbooks); - log.warn("###\n" + "### Use of the 'workbooks' property is deprecated!" - + " It will be removed in one of the next releases." - + " Use the 'resources' property instead." + "\n###"); - } }