summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java)0
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java (renamed from server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java)0
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinSession.java33
-rw-r--r--server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java5
-rw-r--r--server/src/main/java/com/vaadin/v7/data/util/converter/ConverterFactory.java1
21 files changed, 29 insertions, 10 deletions
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java
index bd9392ee01..bd9392ee01 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java
index b0679e9caf..b0679e9caf 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java
index 467b848988..467b848988 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java
index c789e7d1e8..c789e7d1e8 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java
index 681cbfc6b2..681cbfc6b2 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java
index cbbf62ad6c..cbbf62ad6c 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java
index ff8649b7d8..ff8649b7d8 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java
index d645fd35ad..d645fd35ad 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java
index c8ebea6e5b..c8ebea6e5b 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java
index e915a95550..e915a95550 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java
index 708cc13fe8..708cc13fe8 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java
index 7d7f5b96aa..7d7f5b96aa 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java
index 1da06aa834..1da06aa834 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java
index d753b1e73f..d753b1e73f 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java
index e37cf89784..e37cf89784 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java
index 82dcf7e6b8..82dcf7e6b8 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java
index 29c129c3fd..29c129c3fd 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java
index 71408eb53e..71408eb53e 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java
diff --git a/server/src/main/java/com/vaadin/server/VaadinSession.java b/server/src/main/java/com/vaadin/server/VaadinSession.java
index 82f75c2ad6..bcd7e66518 100644
--- a/server/src/main/java/com/vaadin/server/VaadinSession.java
+++ b/server/src/main/java/com/vaadin/server/VaadinSession.java
@@ -52,9 +52,7 @@ import com.vaadin.shared.communication.PushMode;
import com.vaadin.ui.UI;
import com.vaadin.util.CurrentInstance;
import com.vaadin.util.ReflectTools;
-import com.vaadin.v7.data.util.converter.Converter;
import com.vaadin.v7.data.util.converter.ConverterFactory;
-import com.vaadin.v7.data.util.converter.DefaultConverterFactory;
/**
* Contains everything that Vaadin needs to store for a specific user. This is
@@ -226,7 +224,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* The converter factory that is used to provide default converters for the
* session.
*/
- private ConverterFactory converterFactory = new DefaultConverterFactory();
+ @Deprecated
+ private ConverterFactory converterFactory;
private LinkedList<RequestHandler> requestHandlers = new LinkedList<RequestHandler>();
@@ -278,6 +277,18 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
*/
public VaadinSession(VaadinService service) {
this.service = service;
+ try {
+ // This is to avoid having DefaultConverterFactory in the server
+ // package
+ Class<? extends ConverterFactory> cls = (Class<? extends ConverterFactory>) getClass()
+ .getClassLoader().loadClass(
+ "com.vaadin.v7.data.util.converter.DefaultConverterFactory");
+ ConverterFactory factory = cls.newInstance();
+ converterFactory = factory;
+ } catch (Exception e) {
+ // DefaultConverterFactory not found, go on without and warn later
+ // if it is used
+ }
}
/**
@@ -592,14 +603,19 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
/**
* Gets the {@link ConverterFactory} used to locate a suitable
- * {@link Converter} for fields in the session.
+ * {@code Converter} for fields in the session.
*
* See {@link #setConverterFactory(ConverterFactory)} for more details
*
* @return The converter factory used in the session
*/
+ @Deprecated
public ConverterFactory getConverterFactory() {
assert hasLock();
+ if (converterFactory == null) {
+ throw new IllegalStateException(
+ "No converter factory has been set and com.vaadin.v7.data.util.converter.DefaultConverterFactory could not be found when creating the session");
+ }
return converterFactory;
}
@@ -607,10 +623,10 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* Sets the {@link ConverterFactory} used to locate a suitable
* {@link Converter} for fields in the session.
* <p>
- * The {@link ConverterFactory} is used to find a suitable converter
- * when binding data to a UI component and the data type does not match the
- * UI component type, e.g. binding a Double to a TextField (which is based
- * on a String).
+ * The {@link ConverterFactory} is used to find a suitable converter when
+ * binding data to a UI component and the data type does not match the UI
+ * component type, e.g. binding a Double to a TextField (which is based on a
+ * String).
* </p>
* <p>
* The converter factory must never be set to null.
@@ -618,6 +634,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* @param converterFactory
* The converter factory used in the session
*/
+ @Deprecated
public void setConverterFactory(ConverterFactory converterFactory) {
assert hasLock();
this.converterFactory = converterFactory;
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java
index e545c6ea6b..cad8897c15 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java
+++ b/server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java
@@ -47,6 +47,7 @@ import java.util.Locale;
* @author Vaadin Ltd.
* @since 7.0
*/
+@Deprecated
public interface Converter<PRESENTATION, MODEL> extends Serializable {
/**
@@ -122,8 +123,8 @@ public interface Converter<PRESENTATION, MODEL> extends Serializable {
/**
* An exception that signals that the value passed to
* {@link Converter#convertToPresentation(Object, Class, Locale)} or
- * {@link Converter#convertToModel(Object, Class, Locale)} could not
- * be converted.
+ * {@link Converter#convertToModel(Object, Class, Locale)} could not be
+ * converted.
*
* @author Vaadin Ltd
* @since 7.0
diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterFactory.java b/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterFactory.java
index e4ec82c056..1730a15e10 100644
--- a/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterFactory.java
+++ b/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterFactory.java
@@ -26,6 +26,7 @@ import java.io.Serializable;
* @since 7.0
*
*/
+@Deprecated
public interface ConverterFactory extends Serializable {
public <PRESENTATION, MODEL> Converter<PRESENTATION, MODEL> createConverter(
Class<PRESENTATION> presentationType, Class<MODEL> modelType);