diff options
Diffstat (limited to 'server/src')
131 files changed, 667 insertions, 667 deletions
diff --git a/server/src/main/java/com/vaadin/event/DataBoundTransferable.java b/server/src/main/java/com/vaadin/event/DataBoundTransferable.java index 9c70b2915f..d4b4a5ba6b 100644 --- a/server/src/main/java/com/vaadin/event/DataBoundTransferable.java +++ b/server/src/main/java/com/vaadin/event/DataBoundTransferable.java @@ -17,8 +17,8 @@ package com.vaadin.event; import java.util.Map; -import com.vaadin.data.Container; import com.vaadin.ui.Component; +import com.vaadin.v7.data.Container; /** * Parent class for {@link Transferable} implementations that have a Vaadin @@ -27,7 +27,7 @@ import com.vaadin.ui.Component; * table column identifier when transferring a single table cell). * * The component must implement the interface - * {@link com.vaadin.data.Container.Viewer}. + * {@link com.vaadin.v7.data.Container.Viewer}. * * In most cases, receivers of data transfers should depend on this class * instead of its concrete subclasses. @@ -60,7 +60,7 @@ public abstract class DataBoundTransferable extends TransferableImpl { /** * Returns the container data source from which the transfer occurs. * - * {@link com.vaadin.data.Container.Viewer#getContainerDataSource()} is used + * {@link com.vaadin.v7.data.Container.Viewer#getContainerDataSource()} is used * to obtain the underlying container of the source component. * * @return Container diff --git a/server/src/main/java/com/vaadin/event/FieldEvents.java b/server/src/main/java/com/vaadin/event/FieldEvents.java index e96d320a34..fa4b00cbca 100644 --- a/server/src/main/java/com/vaadin/event/FieldEvents.java +++ b/server/src/main/java/com/vaadin/event/FieldEvents.java @@ -24,12 +24,12 @@ import com.vaadin.shared.communication.FieldRpc.FocusAndBlurServerRpc; import com.vaadin.ui.Component; import com.vaadin.ui.Component.Event; import com.vaadin.util.ReflectTools; -import com.vaadin.v7.ui.LegacyField; -import com.vaadin.v7.ui.LegacyField.ValueChangeEvent; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.ui.Field; +import com.vaadin.v7.ui.Field.ValueChangeEvent; +import com.vaadin.v7.ui.TextField; /** - * Interface that serves as a wrapper for {@link LegacyField} related events. + * Interface that serves as a wrapper for {@link Field} related events. */ public interface FieldEvents { @@ -192,12 +192,12 @@ public interface FieldEvents { * The {@link TextChangeNotifier}s implementation may decide when exactly * TextChangeEvents are fired. TextChangeEvents are not necessary fire for * example on each key press, but buffered with a small delay. The - * {@link LegacyTextField} component supports different modes for triggering + * {@link TextField} component supports different modes for triggering * TextChangeEvents. * * @see TextChangeListener * @see TextChangeNotifier - * @see LegacyTextField#setTextChangeEventMode(com.vaadin.ui.LegacyTextField.TextChangeEventMode) + * @see TextField#setTextChangeEventMode(com.vaadin.ui.TextField.TextChangeEventMode) * @since 6.5 */ public static abstract class TextChangeEvent extends Component.Event { @@ -239,8 +239,8 @@ public interface FieldEvents { } /** - * An interface implemented by a {@link LegacyField} supporting - * {@link TextChangeEvent}s. An example a {@link LegacyTextField} supports + * An interface implemented by a {@link Field} supporting + * {@link TextChangeEvent}s. An example a {@link TextField} supports * {@link TextChangeListener}s. */ public interface TextChangeNotifier extends Serializable { diff --git a/server/src/main/java/com/vaadin/event/ItemClickEvent.java b/server/src/main/java/com/vaadin/event/ItemClickEvent.java index 621f5af525..3680b7764a 100644 --- a/server/src/main/java/com/vaadin/event/ItemClickEvent.java +++ b/server/src/main/java/com/vaadin/event/ItemClickEvent.java @@ -18,16 +18,16 @@ package com.vaadin.event; import java.io.Serializable; import java.lang.reflect.Method; -import com.vaadin.data.Item; -import com.vaadin.data.Property; import com.vaadin.event.MouseEvents.ClickEvent; import com.vaadin.shared.MouseEventDetails; import com.vaadin.ui.Component; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Property; /** * * Click event fired by a {@link Component} implementing - * {@link com.vaadin.data.Container} interface. ItemClickEvents happens on an + * {@link com.vaadin.v7.data.Container} interface. ItemClickEvents happens on an * {@link Item} rendered somehow on terminal. Event may also contain a specific * {@link Property} on which the click event happened. * diff --git a/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java b/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java index 6910201856..c3b8d0f436 100644 --- a/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java +++ b/server/src/main/java/com/vaadin/server/AbstractErrorMessage.java @@ -21,7 +21,7 @@ import java.io.StringWriter; import java.util.ArrayList; import java.util.List; -import com.vaadin.data.Buffered; +import com.vaadin.v7.data.Buffered; import com.vaadin.v7.data.Validator; /** diff --git a/server/src/main/java/com/vaadin/server/ClassResource.java b/server/src/main/java/com/vaadin/server/ClassResource.java index 83a9371f8f..d3114a36ef 100644 --- a/server/src/main/java/com/vaadin/server/ClassResource.java +++ b/server/src/main/java/com/vaadin/server/ClassResource.java @@ -18,9 +18,9 @@ package com.vaadin.server; import java.io.Serializable; -import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.UI; import com.vaadin.util.FileTypeResolver; +import com.vaadin.v7.ui.LegacyWindow; /** * <code>ClassResource</code> is a named resource accessed with the class diff --git a/server/src/main/java/com/vaadin/server/LegacyApplication.java b/server/src/main/java/com/vaadin/server/LegacyApplication.java index 93f3da3d8f..1e6714fa2a 100644 --- a/server/src/main/java/com/vaadin/server/LegacyApplication.java +++ b/server/src/main/java/com/vaadin/server/LegacyApplication.java @@ -23,8 +23,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; -import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.UI; +import com.vaadin.v7.ui.LegacyWindow; /** * A special application designed to help migrating applications from Vaadin 6 diff --git a/server/src/main/java/com/vaadin/server/LegacyApplicationUIProvider.java b/server/src/main/java/com/vaadin/server/LegacyApplicationUIProvider.java index 4ad7097e3b..18e44add09 100644 --- a/server/src/main/java/com/vaadin/server/LegacyApplicationUIProvider.java +++ b/server/src/main/java/com/vaadin/server/LegacyApplicationUIProvider.java @@ -21,8 +21,8 @@ import java.net.URL; import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.UI; +import com.vaadin.v7.ui.LegacyWindow; /** * diff --git a/server/src/main/java/com/vaadin/server/Page.java b/server/src/main/java/com/vaadin/server/Page.java index 7142659fca..4b4984ebb7 100644 --- a/server/src/main/java/com/vaadin/server/Page.java +++ b/server/src/main/java/com/vaadin/server/Page.java @@ -34,11 +34,11 @@ import com.vaadin.shared.ui.ui.UIConstants; import com.vaadin.shared.ui.ui.UIState; import com.vaadin.shared.util.SharedUtil; import com.vaadin.ui.JavaScript; -import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.Link; import com.vaadin.ui.Notification; import com.vaadin.ui.UI; import com.vaadin.util.ReflectTools; +import com.vaadin.v7.ui.LegacyWindow; public class Page implements Serializable { diff --git a/server/src/main/java/com/vaadin/server/VaadinSession.java b/server/src/main/java/com/vaadin/server/VaadinSession.java index d10390dd64..82f75c2ad6 100644 --- a/server/src/main/java/com/vaadin/server/VaadinSession.java +++ b/server/src/main/java/com/vaadin/server/VaadinSession.java @@ -52,9 +52,9 @@ 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.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyConverterFactory; -import com.vaadin.v7.data.util.converter.LegacyDefaultConverterFactory; +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 +226,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * The converter factory that is used to provide default converters for the * session. */ - private LegacyConverterFactory converterFactory = new LegacyDefaultConverterFactory(); + private ConverterFactory converterFactory = new DefaultConverterFactory(); private LinkedList<RequestHandler> requestHandlers = new LinkedList<RequestHandler>(); @@ -591,23 +591,23 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { } /** - * Gets the {@link LegacyConverterFactory} used to locate a suitable - * {@link LegacyConverter} for fields in the session. + * Gets the {@link ConverterFactory} used to locate a suitable + * {@link Converter} for fields in the session. * - * See {@link #setConverterFactory(LegacyConverterFactory)} for more details + * See {@link #setConverterFactory(ConverterFactory)} for more details * * @return The converter factory used in the session */ - public LegacyConverterFactory getConverterFactory() { + public ConverterFactory getConverterFactory() { assert hasLock(); return converterFactory; } /** - * Sets the {@link LegacyConverterFactory} used to locate a suitable - * {@link LegacyConverter} for fields in the session. + * Sets the {@link ConverterFactory} used to locate a suitable + * {@link Converter} for fields in the session. * <p> - * The {@link LegacyConverterFactory} is used to find a suitable converter + * 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). @@ -618,7 +618,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @param converterFactory * The converter factory used in the session */ - public void setConverterFactory(LegacyConverterFactory converterFactory) { + public void setConverterFactory(ConverterFactory converterFactory) { assert hasLock(); this.converterFactory = converterFactory; } diff --git a/server/src/main/java/com/vaadin/ui/AbstractField.java b/server/src/main/java/com/vaadin/ui/AbstractField.java index c1895377c2..d8397a65e1 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractField.java +++ b/server/src/main/java/com/vaadin/ui/AbstractField.java @@ -39,7 +39,7 @@ import com.vaadin.util.ReflectTools; * <p> * This class replaces the Vaadin 7 {@code com.vaadin.ui.AbstractField} class. * The old {@code AbstractField} is retained, under the new name - * {@link com.vaadin.v7.ui.LegacyAbstractField}, for compatibility and + * {@link com.vaadin.v7.ui.AbstractField}, for compatibility and * migration purposes. * * @author Vaadin Ltd. diff --git a/server/src/main/java/com/vaadin/ui/Label.java b/server/src/main/java/com/vaadin/ui/Label.java index 49bad48786..21aa7bdcbe 100644 --- a/server/src/main/java/com/vaadin/ui/Label.java +++ b/server/src/main/java/com/vaadin/ui/Label.java @@ -22,14 +22,14 @@ import java.util.Locale; import org.jsoup.nodes.Element; -import com.vaadin.data.Property; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.shared.ui.label.LabelState; import com.vaadin.shared.util.SharedUtil; import com.vaadin.ui.declarative.DesignContext; import com.vaadin.ui.declarative.DesignFormatter; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyConverterUtil; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.ConverterUtil; /** * Label component for showing non-editable short texts. @@ -98,7 +98,7 @@ public class Label extends AbstractComponent implements Property<String>, * A converter used to convert from the data model type to the field type * and vice versa. Label type is always String. */ - private LegacyConverter<String, Object> converter = null; + private Converter<String, Object> converter = null; private Property<String> dataSource = null; @@ -188,7 +188,7 @@ public class Label extends AbstractComponent implements Property<String>, * @return */ private String getDataSourceValue() { - return LegacyConverterUtil.convertFromModel( + return ConverterUtil.convertFromModel( getPropertyDataSource().getValue(), String.class, getConverter(), getLocale()); } @@ -220,7 +220,7 @@ public class Label extends AbstractComponent implements Property<String>, /** * Gets the type of the Property. * - * @see com.vaadin.data.Property#getType() + * @see com.vaadin.v7.data.Property#getType() */ @Override public Class<String> getType() { @@ -231,7 +231,7 @@ public class Label extends AbstractComponent implements Property<String>, * Gets the viewing data-source property. * * @return the data source property. - * @see com.vaadin.data.Property.Viewer#getPropertyDataSource() + * @see com.vaadin.v7.data.Property.Viewer#getPropertyDataSource() */ @Override public Property getPropertyDataSource() { @@ -244,7 +244,7 @@ public class Label extends AbstractComponent implements Property<String>, * * @param newDataSource * the new data source Property - * @see com.vaadin.data.Property.Viewer#setPropertyDataSource(com.vaadin.data.Property) + * @see com.vaadin.v7.data.Property.Viewer#setPropertyDataSource(com.vaadin.v7.data.Property) */ @Override public void setPropertyDataSource(Property newDataSource) { @@ -256,11 +256,11 @@ public class Label extends AbstractComponent implements Property<String>, // Check if the current converter is compatible. if (newDataSource != null - && !LegacyConverterUtil.canConverterPossiblyHandle( + && !ConverterUtil.canConverterPossiblyHandle( getConverter(), getType(), newDataSource.getType())) { // There is no converter set or there is no way the current // converter can be compatible. - LegacyConverter<String, ?> c = LegacyConverterUtil.getConverter( + Converter<String, ?> c = ConverterUtil.getConverter( String.class, newDataSource.getType(), getSession()); setConverter(c); } @@ -345,7 +345,7 @@ public class Label extends AbstractComponent implements Property<String>, /** * Gets the Property that has been modified. * - * @see com.vaadin.data.Property.ValueChangeEvent#getProperty() + * @see com.vaadin.v7.data.Property.ValueChangeEvent#getProperty() */ @Override public Property getProperty() { @@ -358,7 +358,7 @@ public class Label extends AbstractComponent implements Property<String>, * * @param listener * the Listener to be added. - * @see com.vaadin.data.Property.ValueChangeNotifier#addListener(com.vaadin.data.Property.ValueChangeListener) + * @see com.vaadin.v7.data.Property.ValueChangeNotifier#addListener(com.vaadin.v7.data.Property.ValueChangeListener) */ @Override public void addValueChangeListener(Property.ValueChangeListener listener) { @@ -368,7 +368,7 @@ public class Label extends AbstractComponent implements Property<String>, /** * @deprecated As of 7.0, replaced by - * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)} + * {@link #addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)} **/ @Override @Deprecated @@ -381,7 +381,7 @@ public class Label extends AbstractComponent implements Property<String>, * * @param listener * the Listener to be removed. - * @see com.vaadin.data.Property.ValueChangeNotifier#removeListener(com.vaadin.data.Property.ValueChangeListener) + * @see com.vaadin.v7.data.Property.ValueChangeNotifier#removeListener(com.vaadin.v7.data.Property.ValueChangeListener) */ @Override public void removeValueChangeListener( @@ -392,7 +392,7 @@ public class Label extends AbstractComponent implements Property<String>, /** * @deprecated As of 7.0, replaced by - * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)} + * {@link #removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)} **/ @Override @Deprecated @@ -411,7 +411,7 @@ public class Label extends AbstractComponent implements Property<String>, /** * Listens the value change events from data source. * - * @see com.vaadin.data.Property.ValueChangeListener#valueChange(Property.ValueChangeEvent) + * @see com.vaadin.v7.data.Property.ValueChangeListener#valueChange(Property.ValueChangeEvent) */ @Override public void valueChange(Property.ValueChangeEvent event) { @@ -527,7 +527,7 @@ public class Label extends AbstractComponent implements Property<String>, * * @return The converter or null if none is set. */ - public LegacyConverter<String, Object> getConverter() { + public Converter<String, Object> getConverter() { return converter; } @@ -538,8 +538,8 @@ public class Label extends AbstractComponent implements Property<String>, * @param converter * The new converter to use. */ - public void setConverter(LegacyConverter<String, ?> converter) { - this.converter = (LegacyConverter<String, Object>) converter; + public void setConverter(Converter<String, ?> converter) { + this.converter = (Converter<String, Object>) converter; markAsDirty(); } diff --git a/server/src/main/java/com/vaadin/ui/ProgressBar.java b/server/src/main/java/com/vaadin/ui/ProgressBar.java index b7fde04d5a..8a29176e55 100644 --- a/server/src/main/java/com/vaadin/ui/ProgressBar.java +++ b/server/src/main/java/com/vaadin/ui/ProgressBar.java @@ -18,11 +18,11 @@ package com.vaadin.ui; import org.jsoup.nodes.Element; -import com.vaadin.data.Property; import com.vaadin.shared.ui.progressindicator.ProgressBarState; import com.vaadin.ui.declarative.DesignAttributeHandler; import com.vaadin.ui.declarative.DesignContext; -import com.vaadin.v7.ui.LegacyAbstractField; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.ui.AbstractField; /** * Shows the current progress of a long running task. @@ -35,7 +35,7 @@ import com.vaadin.v7.ui.LegacyAbstractField; * @since 7.1 * @author Vaadin Ltd */ -public class ProgressBar extends LegacyAbstractField<Float> +public class ProgressBar extends AbstractField<Float> implements Property.Viewer, Property.ValueChangeListener { private static final float DEFAULT_VALUE = 0f; diff --git a/server/src/main/java/com/vaadin/ui/ProgressIndicator.java b/server/src/main/java/com/vaadin/ui/ProgressIndicator.java index 83dd1f0aa4..d0f1ae164b 100644 --- a/server/src/main/java/com/vaadin/ui/ProgressIndicator.java +++ b/server/src/main/java/com/vaadin/ui/ProgressIndicator.java @@ -16,10 +16,10 @@ package com.vaadin.ui; -import com.vaadin.data.Property; import com.vaadin.shared.communication.PushMode; import com.vaadin.shared.ui.progressindicator.ProgressIndicatorServerRpc; import com.vaadin.shared.ui.progressindicator.ProgressIndicatorState; +import com.vaadin.v7.data.Property; /** * A {@link ProgressBar} which polls the server for updates. diff --git a/server/src/main/java/com/vaadin/ui/TextField.java b/server/src/main/java/com/vaadin/ui/TextField.java index 1e40c34f51..ccbba00f36 100644 --- a/server/src/main/java/com/vaadin/ui/TextField.java +++ b/server/src/main/java/com/vaadin/ui/TextField.java @@ -19,9 +19,9 @@ package com.vaadin.ui; import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Element; -import com.vaadin.data.Property; import com.vaadin.ui.declarative.DesignAttributeHandler; import com.vaadin.ui.declarative.DesignContext; +import com.vaadin.v7.data.Property; /** * A component for editing textual data that fits on a single line. For a @@ -54,7 +54,7 @@ public class TextField extends AbstractTextField { * Constructs a new <code>TextField</code> with the given caption and * initial text contents. The editor constructed this way will not be bound * to a Property unless - * {@link com.vaadin.data.Property.Viewer#setPropertyDataSource(Property)} + * {@link com.vaadin.v7.data.Property.Viewer#setPropertyDataSource(Property)} * is called to bind it. * * @param caption diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java index c38f2bf040..f6607c91e4 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java +++ b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java @@ -39,7 +39,7 @@ import org.jsoup.nodes.Node; import com.vaadin.shared.ui.AlignmentInfo; import com.vaadin.shared.util.SharedUtil; import com.vaadin.ui.Alignment; -import com.vaadin.v7.data.util.converter.LegacyConverter; +import com.vaadin.v7.data.util.converter.Converter; /** * Default attribute handler implementation used when parsing designs to @@ -379,7 +379,7 @@ public class DesignAttributeHandler implements Serializable { // value is not null. How to represent null value in attributes? return ""; } - LegacyConverter<String, Object> converter = getFormatter() + Converter<String, Object> converter = getFormatter() .findConverterFor(sourceType); if (converter != null) { return converter.convertToPresentation(value, String.class, null); diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java b/server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java index 4879609e01..d8e131a047 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/DesignFormatter.java @@ -39,10 +39,10 @@ import com.vaadin.ui.declarative.converters.DesignResourceConverter; import com.vaadin.ui.declarative.converters.DesignShortcutActionConverter; import com.vaadin.ui.declarative.converters.DesignTimeZoneConverter; import com.vaadin.ui.declarative.converters.DesignToStringConverter; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyStringToBigDecimalConverter; -import com.vaadin.v7.data.util.converter.LegacyStringToDoubleConverter; -import com.vaadin.v7.data.util.converter.LegacyStringToFloatConverter; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.StringToBigDecimalConverter; +import com.vaadin.v7.data.util.converter.StringToDoubleConverter; +import com.vaadin.v7.data.util.converter.StringToFloatConverter; /** * Class focused on flexible and consistent formatting and parsing of different @@ -54,9 +54,9 @@ import com.vaadin.v7.data.util.converter.LegacyStringToFloatConverter; */ public class DesignFormatter implements Serializable { - private final Map<Class<?>, LegacyConverter<String, ?>> converterMap = new ConcurrentHashMap<Class<?>, LegacyConverter<String, ?>>(); - private final LegacyConverter<String, Enum> stringEnumConverter = new DesignEnumConverter(); - private final LegacyConverter<String, Object> stringObjectConverter = new DesignObjectConverter(); + private final Map<Class<?>, Converter<String, ?>> converterMap = new ConcurrentHashMap<Class<?>, Converter<String, ?>>(); + private final Converter<String, Enum> stringEnumConverter = new DesignEnumConverter(); + private final Converter<String, Object> stringObjectConverter = new DesignObjectConverter(); /** * Creates the formatter with default types already mapped. @@ -83,19 +83,19 @@ public class DesignFormatter implements Serializable { } // booleans use a bit different converter than the standard one // "false" is boolean false, everything else is boolean true - LegacyConverter<String, Boolean> booleanConverter = new LegacyConverter<String, Boolean>() { + Converter<String, Boolean> booleanConverter = new Converter<String, Boolean>() { @Override public Boolean convertToModel(String value, Class<? extends Boolean> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { return !value.equalsIgnoreCase("false"); } @Override public String convertToPresentation(Boolean value, Class<? extends String> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { if (value.booleanValue()) { return ""; } else { @@ -123,7 +123,7 @@ public class DesignFormatter implements Serializable { final DecimalFormat fmt = new DecimalFormat("0.###", symbols); fmt.setGroupingUsed(false); - LegacyConverter<String, ?> floatConverter = new LegacyStringToFloatConverter() { + Converter<String, ?> floatConverter = new StringToFloatConverter() { @Override protected NumberFormat getFormat(Locale locale) { return fmt; @@ -132,7 +132,7 @@ public class DesignFormatter implements Serializable { converterMap.put(Float.class, floatConverter); converterMap.put(float.class, floatConverter); - LegacyConverter<String, ?> doubleConverter = new LegacyStringToDoubleConverter() { + Converter<String, ?> doubleConverter = new StringToDoubleConverter() { @Override protected NumberFormat getFormat(Locale locale) { return fmt; @@ -145,7 +145,7 @@ public class DesignFormatter implements Serializable { bigDecimalFmt.setGroupingUsed(false); bigDecimalFmt.setParseBigDecimal(true); converterMap.put(BigDecimal.class, - new LegacyStringToBigDecimalConverter() { + new StringToBigDecimalConverter() { @Override protected NumberFormat getFormat(Locale locale) { return bigDecimalFmt; @@ -153,19 +153,19 @@ public class DesignFormatter implements Serializable { }); // strings do nothing - converterMap.put(String.class, new LegacyConverter<String, String>() { + converterMap.put(String.class, new Converter<String, String>() { @Override public String convertToModel(String value, Class<? extends String> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { return value; } @Override public String convertToPresentation(String value, Class<? extends String> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { return value; } @@ -182,13 +182,13 @@ public class DesignFormatter implements Serializable { }); // char takes the first character from the string - LegacyConverter<String, Character> charConverter = new DesignToStringConverter<Character>( + Converter<String, Character> charConverter = new DesignToStringConverter<Character>( Character.class) { @Override public Character convertToModel(String value, Class<? extends Character> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { return value.charAt(0); } @@ -209,7 +209,7 @@ public class DesignFormatter implements Serializable { * @param converter * Converter to add. */ - protected <T> void addConverter(LegacyConverter<String, T> converter) { + protected <T> void addConverter(Converter<String, T> converter) { converterMap.put(converter.getModelType(), converter); } @@ -222,7 +222,7 @@ public class DesignFormatter implements Serializable { * Converter. */ protected <T> void addConverter(Class<?> type, - LegacyConverter<String, ?> converter) { + Converter<String, ?> converter) { converterMap.put(type, converter); } @@ -258,7 +258,7 @@ public class DesignFormatter implements Serializable { * converter for that type. */ public <T> T parse(String value, Class<? extends T> type) { - LegacyConverter<String, T> converter = findConverterFor(type); + Converter<String, T> converter = findConverterFor(type); if (converter != null) { return converter.convertToModel(value, type, null); } else { @@ -293,7 +293,7 @@ public class DesignFormatter implements Serializable { if (object == null) { return null; } else { - LegacyConverter<String, Object> converter = findConverterFor( + Converter<String, Object> converter = findConverterFor( object.getClass()); return converter.convertToPresentation(object, String.class, null); } @@ -326,28 +326,28 @@ public class DesignFormatter implements Serializable { * if it was not found. */ @SuppressWarnings("unchecked") - protected <T> LegacyConverter<String, T> findConverterFor( + protected <T> Converter<String, T> findConverterFor( Class<? extends T> sourceType, boolean strict) { if (sourceType == Object.class) { // Use for propertyIds, itemIds and such. Only string type objects // are really supported if no special logic is implemented in the // component. - return (LegacyConverter<String, T>) stringObjectConverter; + return (Converter<String, T>) stringObjectConverter; } if (converterMap.containsKey(sourceType)) { - return ((LegacyConverter<String, T>) converterMap.get(sourceType)); + return ((Converter<String, T>) converterMap.get(sourceType)); } else if (!strict) { for (Class<?> supported : converterMap.keySet()) { if (supported.isAssignableFrom(sourceType)) { - return ((LegacyConverter<String, T>) converterMap + return ((Converter<String, T>) converterMap .get(supported)); } } } if (sourceType.isEnum()) { - return (LegacyConverter<String, T>) stringEnumConverter; + return (Converter<String, T>) stringEnumConverter; } return null; } @@ -361,7 +361,7 @@ public class DesignFormatter implements Serializable { * @return A valid converter for a given type or its subtype, <b>null</b> if * it was not found. */ - protected <T> LegacyConverter<String, T> findConverterFor( + protected <T> Converter<String, T> findConverterFor( Class<? extends T> sourceType) { return findConverterFor(sourceType, false); } diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignDateConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignDateConverter.java index 8d8ec7ab7e..d2b8233da4 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignDateConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignDateConverter.java @@ -21,7 +21,7 @@ import java.util.Date; import java.util.Locale; import com.vaadin.ui.declarative.DesignAttributeHandler; -import com.vaadin.v7.data.util.converter.LegacyConverter; +import com.vaadin.v7.data.util.converter.Converter; /** * A date converter to be used by {@link DesignAttributeHandler}. Provides @@ -30,11 +30,11 @@ import com.vaadin.v7.data.util.converter.LegacyConverter; * @since 7.4 * @author Vaadin Ltd */ -public class DesignDateConverter implements LegacyConverter<String, Date> { +public class DesignDateConverter implements Converter<String, Date> { @Override public Date convertToModel(String value, Class<? extends Date> targetType, - Locale locale) throws LegacyConverter.ConversionException { + Locale locale) throws Converter.ConversionException { for (String pattern : new String[] { "yyyy-MM-dd HH:mm:ssZ", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH", "yyyy-MM-dd", "yyyy-MM", "yyyy" }) { @@ -50,7 +50,7 @@ public class DesignDateConverter implements LegacyConverter<String, Date> { @Override public String convertToPresentation(Date value, Class<? extends String> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ").format(value); } diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java index ae142c1bb2..4424c6c66f 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignEnumConverter.java @@ -18,7 +18,7 @@ package com.vaadin.ui.declarative.converters; import java.util.Locale; import com.vaadin.ui.declarative.DesignAttributeHandler; -import com.vaadin.v7.data.util.converter.LegacyConverter; +import com.vaadin.v7.data.util.converter.Converter; /** * An converter for Enum to/from String for {@link DesignAttributeHandler} to @@ -27,12 +27,12 @@ import com.vaadin.v7.data.util.converter.LegacyConverter; * @since 7.4 * @author Vaadin Ltd */ -public class DesignEnumConverter implements LegacyConverter<String, Enum> { +public class DesignEnumConverter implements Converter<String, Enum> { @Override public Enum convertToModel(String value, Class<? extends Enum> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { if (value == null || value.trim().equals("")) { return null; } @@ -42,7 +42,7 @@ public class DesignEnumConverter implements LegacyConverter<String, Enum> { @Override public String convertToPresentation(Enum value, Class<? extends String> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { if (value == null) { return null; } diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignObjectConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignObjectConverter.java index cc9dce4425..22d44a1fb5 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignObjectConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignObjectConverter.java @@ -18,7 +18,7 @@ package com.vaadin.ui.declarative.converters; import java.util.Locale; import com.vaadin.ui.declarative.DesignAttributeHandler; -import com.vaadin.v7.data.util.converter.LegacyConverter; +import com.vaadin.v7.data.util.converter.Converter; /** * An converter for Object to/from String for {@link DesignAttributeHandler} to @@ -27,19 +27,19 @@ import com.vaadin.v7.data.util.converter.LegacyConverter; * @since 7.4 * @author Vaadin Ltd */ -public class DesignObjectConverter implements LegacyConverter<String, Object> { +public class DesignObjectConverter implements Converter<String, Object> { @Override public Object convertToModel(String value, Class<? extends Object> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { return value; } @Override public String convertToPresentation(Object value, Class<? extends String> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { if (value == null) { return null; } diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java index bf2b5446f7..a55cfd070b 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java @@ -30,7 +30,7 @@ import com.vaadin.server.Resource; import com.vaadin.server.ResourceReference; import com.vaadin.server.ThemeResource; import com.vaadin.ui.declarative.DesignAttributeHandler; -import com.vaadin.v7.data.util.converter.LegacyConverter; +import com.vaadin.v7.data.util.converter.Converter; /** * A converter for {@link Resource} implementations supported by @@ -41,12 +41,12 @@ import com.vaadin.v7.data.util.converter.LegacyConverter; */ @SuppressWarnings("serial") public class DesignResourceConverter - implements LegacyConverter<String, Resource> { + implements Converter<String, Resource> { @Override public Resource convertToModel(String value, Class<? extends Resource> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { if (!value.contains("://")) { // assume it'is "file://" protocol, one that is used to access a // file on a given path on the server, this will later be striped @@ -68,13 +68,13 @@ public class DesignResourceConverter @Override public String convertToPresentation(Resource value, Class<? extends String> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { ResourceConverterByProtocol byType = ResourceConverterByProtocol .byType(value.getClass()); if (byType != null) { return byType.format(value); } else { - throw new LegacyConverter.ConversionException( + throw new Converter.ConversionException( "unknown Resource type - " + value.getClass().getName()); } } @@ -109,7 +109,7 @@ public class DesignResourceConverter @Override public String format(Resource value) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { return new ResourceReference(value, null, null).getURL(); } }, @@ -139,7 +139,7 @@ public class DesignResourceConverter @Override public String format(Resource value) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { FontIcon icon = (FontIcon) value; return new ResourceReference(icon, null, null).getURL(); @@ -163,7 +163,7 @@ public class DesignResourceConverter @Override public String format(Resource value) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { throw new UnsupportedOperationException( "Use " + ResourceConverterByProtocol.FONTICON.toString() + " instead"); @@ -177,7 +177,7 @@ public class DesignResourceConverter @Override public String format(Resource value) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { String path = ((FileResource) value).getSourceFile().getPath(); if (File.separatorChar != '/') { // make sure we use '/' as file separator in templates @@ -197,7 +197,7 @@ public class DesignResourceConverter @Override public String format(Resource value) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { // default behavior for HTTP, HTTPS, FTP and FTPS return ((ExternalResource) value).getURL(); } diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java index 8ca4cbc905..12d96abb63 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java @@ -24,7 +24,7 @@ import java.util.Map.Entry; import com.vaadin.event.ShortcutAction; import com.vaadin.event.ShortcutAction.KeyCode; import com.vaadin.event.ShortcutAction.ModifierKey; -import com.vaadin.v7.data.util.converter.LegacyConverter; +import com.vaadin.v7.data.util.converter.Converter; /** * Converter for {@link ShortcutActions}. @@ -33,7 +33,7 @@ import com.vaadin.v7.data.util.converter.LegacyConverter; * @author Vaadin Ltd */ public class DesignShortcutActionConverter - implements LegacyConverter<String, ShortcutAction> { + implements Converter<String, ShortcutAction> { private final Map<Integer, String> keyCodeMap; private final Map<String, Integer> presentationMap; @@ -122,7 +122,7 @@ public class DesignShortcutActionConverter @Override public ShortcutAction convertToModel(String value, Class<? extends ShortcutAction> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { if (value.length() == 0) { return null; } @@ -163,7 +163,7 @@ public class DesignShortcutActionConverter @Override public String convertToPresentation(ShortcutAction value, Class<? extends String> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { StringBuilder sb = new StringBuilder(); // handle modifiers if (value.getModifiers() != null) { diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignTimeZoneConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignTimeZoneConverter.java index bb8819034a..4ef52d0819 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignTimeZoneConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignTimeZoneConverter.java @@ -19,7 +19,7 @@ import java.util.Locale; import java.util.TimeZone; import com.vaadin.ui.declarative.DesignAttributeHandler; -import com.vaadin.v7.data.util.converter.LegacyConverter; +import com.vaadin.v7.data.util.converter.Converter; /** * Utility class for {@link DesignAttributeHandler} that deals with converting @@ -29,12 +29,12 @@ import com.vaadin.v7.data.util.converter.LegacyConverter; * @author Vaadin Ltd */ public class DesignTimeZoneConverter - implements LegacyConverter<String, TimeZone> { + implements Converter<String, TimeZone> { @Override public TimeZone convertToModel(String value, Class<? extends TimeZone> targetTimeZone, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { if (value == null || value.isEmpty()) { return null; } @@ -45,7 +45,7 @@ public class DesignTimeZoneConverter @Override public String convertToPresentation(TimeZone value, Class<? extends String> targetTimeZone, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { if (value == null) { return ""; } else { diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignToStringConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignToStringConverter.java index 8979bcef76..9127832690 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignToStringConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignToStringConverter.java @@ -19,7 +19,7 @@ import java.lang.reflect.InvocationTargetException; import java.util.Locale; import com.vaadin.ui.declarative.DesignAttributeHandler; -import com.vaadin.v7.data.util.converter.LegacyConverter; +import com.vaadin.v7.data.util.converter.Converter; /** * Utility class for {@link DesignAttributeHandler} that deals with converting @@ -31,7 +31,7 @@ import com.vaadin.v7.data.util.converter.LegacyConverter; * Type of the data being converted. */ public class DesignToStringConverter<TYPE> - implements LegacyConverter<String, TYPE> { + implements Converter<String, TYPE> { private final Class<? extends TYPE> type; @@ -73,29 +73,29 @@ public class DesignToStringConverter<TYPE> @Override public TYPE convertToModel(String value, Class<? extends TYPE> targetType, - Locale locale) throws LegacyConverter.ConversionException { + Locale locale) throws Converter.ConversionException { try { return type.cast(type.getMethod(this.staticMethodName, String.class) .invoke(null, value)); } catch (IllegalAccessException e) { - throw new LegacyConverter.ConversionException(e); + throw new Converter.ConversionException(e); } catch (IllegalArgumentException e) { - throw new LegacyConverter.ConversionException(e); + throw new Converter.ConversionException(e); } catch (InvocationTargetException e) { - throw new LegacyConverter.ConversionException(e.getCause()); + throw new Converter.ConversionException(e.getCause()); } catch (NoSuchMethodException e) { - throw new LegacyConverter.ConversionException(e); + throw new Converter.ConversionException(e); } catch (SecurityException e) { - throw new LegacyConverter.ConversionException(e); + throw new Converter.ConversionException(e); } catch (RuntimeException e) { - throw new LegacyConverter.ConversionException(e); + throw new Converter.ConversionException(e); } } @Override public String convertToPresentation(TYPE value, Class<? extends String> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { if (value == null) { return NULL_VALUE_REPRESENTATION; } else { diff --git a/server/src/main/java/com/vaadin/data/Buffered.java b/server/src/main/java/com/vaadin/v7/data/Buffered.java index bc3c2327fe..cec9916b6a 100644 --- a/server/src/main/java/com/vaadin/data/Buffered.java +++ b/server/src/main/java/com/vaadin/v7/data/Buffered.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.data; +package com.vaadin.v7.data; import java.io.Serializable; diff --git a/server/src/main/java/com/vaadin/data/BufferedValidatable.java b/server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java index 0a7c875a96..ea0b3c0ebd 100644 --- a/server/src/main/java/com/vaadin/data/BufferedValidatable.java +++ b/server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java @@ -14,12 +14,10 @@ * the License. */ -package com.vaadin.data; +package com.vaadin.v7.data; import java.io.Serializable; -import com.vaadin.v7.data.Validatable; - /** * <p> * This interface defines the combination of <code>Validatable</code> and diff --git a/server/src/main/java/com/vaadin/data/Collapsible.java b/server/src/main/java/com/vaadin/v7/data/Collapsible.java index 9f57b2e445..a5d63c5a50 100644 --- a/server/src/main/java/com/vaadin/data/Collapsible.java +++ b/server/src/main/java/com/vaadin/v7/data/Collapsible.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data; +package com.vaadin.v7.data; -import com.vaadin.data.Container.Hierarchical; -import com.vaadin.data.Container.Ordered; +import com.vaadin.v7.data.Container.Hierarchical; +import com.vaadin.v7.data.Container.Ordered; /** * Container needed by large lazy loading hierarchies displayed e.g. in diff --git a/server/src/main/java/com/vaadin/data/Container.java b/server/src/main/java/com/vaadin/v7/data/Container.java index 1618c456a6..c280525dcd 100644 --- a/server/src/main/java/com/vaadin/data/Container.java +++ b/server/src/main/java/com/vaadin/v7/data/Container.java @@ -14,14 +14,14 @@ * the License. */ -package com.vaadin.data; +package com.vaadin.v7.data; import java.io.Serializable; import java.util.Collection; import java.util.List; -import com.vaadin.data.util.filter.SimpleStringFilter; -import com.vaadin.data.util.filter.UnsupportedFilterException; +import com.vaadin.v7.data.util.filter.SimpleStringFilter; +import com.vaadin.v7.data.util.filter.UnsupportedFilterException; /** * <p> @@ -736,7 +736,7 @@ public interface Container extends Serializable { * <p> * The children must be first explicitly removed with * {@link #setParent(Object itemId, Object newParentId)}or - * {@link com.vaadin.data.Container#removeItem(Object itemId)}. + * {@link com.vaadin.v7.data.Container#removeItem(Object itemId)}. * </p> * * <p> @@ -839,7 +839,7 @@ public interface Container extends Serializable { * Adding items (if supported) to a filtered {@link Ordered} or * {@link Indexed} container should insert them immediately after the * indicated visible item. The unfiltered position of items added at index - * 0, at index {@link com.vaadin.data.Container#size()} or at an undefined + * 0, at index {@link com.vaadin.v7.data.Container#size()} or at an undefined * position is up to the implementation. * </p> * <p> @@ -974,7 +974,7 @@ public interface Container extends Serializable { * Adding items (if supported) to a filtered {@link Ordered} or * {@link Indexed} container should insert them immediately after the * indicated visible item. However, the unfiltered position of items added - * at index 0, at index {@link com.vaadin.data.Container#size()} or at an + * at index 0, at index {@link com.vaadin.v7.data.Container#size()} or at an * undefined position is up to the implementation. * </p> * diff --git a/server/src/main/java/com/vaadin/data/ContainerHelpers.java b/server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java index f2d891c845..c782f33133 100644 --- a/server/src/main/java/com/vaadin/data/ContainerHelpers.java +++ b/server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java @@ -13,14 +13,14 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data; +package com.vaadin.v7.data; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import com.vaadin.data.Container.Indexed; +import com.vaadin.v7.data.Container.Indexed; /** * Contains helper methods for containers that can be used to ease development diff --git a/server/src/main/java/com/vaadin/data/Item.java b/server/src/main/java/com/vaadin/v7/data/Item.java index 478aa206ea..d90cdca3f7 100644 --- a/server/src/main/java/com/vaadin/data/Item.java +++ b/server/src/main/java/com/vaadin/v7/data/Item.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.data; +package com.vaadin.v7.data; import java.io.Serializable; import java.util.Collection; diff --git a/server/src/main/java/com/vaadin/data/Property.java b/server/src/main/java/com/vaadin/v7/data/Property.java index bc0a902d3c..21129a64f9 100644 --- a/server/src/main/java/com/vaadin/data/Property.java +++ b/server/src/main/java/com/vaadin/v7/data/Property.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.data; +package com.vaadin.v7.data; import java.io.Serializable; diff --git a/server/src/main/java/com/vaadin/data/util/AbstractProperty.java b/server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java index 6e046ddbf4..33d22777ad 100644 --- a/server/src/main/java/com/vaadin/data/util/AbstractProperty.java +++ b/server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java @@ -13,14 +13,14 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.util.Collection; import java.util.Collections; import java.util.LinkedList; import java.util.logging.Logger; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Property; /** * Abstract base class for {@link Property} implementations. @@ -118,7 +118,7 @@ public abstract class AbstractProperty<T> implements Property<T>, /** * @deprecated As of 7.0, replaced by - * {@link #addReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)} + * {@link #addReadOnlyStatusChangeListener(com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener)} **/ @Override @Deprecated @@ -142,7 +142,7 @@ public abstract class AbstractProperty<T> implements Property<T>, /** * @deprecated As of 7.0, replaced by - * {@link #removeReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)} + * {@link #removeReadOnlyStatusChangeListener(com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener)} **/ @Override @Deprecated @@ -205,7 +205,7 @@ public abstract class AbstractProperty<T> implements Property<T>, /** * @deprecated As of 7.0, replaced by - * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)} + * {@link #addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)} **/ @Override @Deprecated @@ -223,7 +223,7 @@ public abstract class AbstractProperty<T> implements Property<T>, /** * @deprecated As of 7.0, replaced by - * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)} + * {@link #removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)} **/ @Override @Deprecated diff --git a/server/src/main/java/com/vaadin/data/util/ContainerOrderedWrapper.java b/server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java index c92769eac1..9ac8038f03 100644 --- a/server/src/main/java/com/vaadin/data/util/ContainerOrderedWrapper.java +++ b/server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.util.ArrayList; import java.util.Collection; @@ -23,14 +23,14 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import com.vaadin.data.Container; -import com.vaadin.data.Item; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Container; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Property; /** * <p> * A wrapper class for adding external ordering to containers not implementing - * the {@link com.vaadin.data.Container.Ordered} interface. + * the {@link com.vaadin.v7.data.Container.Ordered} interface. * </p> * * <p> @@ -547,7 +547,7 @@ public class ContainerOrderedWrapper implements Container.Ordered, /** * @deprecated As of 7.0, replaced by - * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)} + * {@link #addItemSetChangeListener(com.vaadin.v7.data.Container.ItemSetChangeListener)} **/ @Override @Deprecated @@ -572,7 +572,7 @@ public class ContainerOrderedWrapper implements Container.Ordered, /** * @deprecated As of 7.0, replaced by - * {@link #removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)} + * {@link #removeItemSetChangeListener(com.vaadin.v7.data.Container.ItemSetChangeListener)} **/ @Override @Deprecated @@ -597,7 +597,7 @@ public class ContainerOrderedWrapper implements Container.Ordered, /** * @deprecated As of 7.0, replaced by - * {@link #addPropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)} + * {@link #addPropertySetChangeListener(com.vaadin.v7.data.Container.PropertySetChangeListener)} **/ @Override @Deprecated @@ -622,7 +622,7 @@ public class ContainerOrderedWrapper implements Container.Ordered, /** * @deprecated As of 7.0, replaced by - * {@link #removePropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)} + * {@link #removePropertySetChangeListener(com.vaadin.v7.data.Container.PropertySetChangeListener)} **/ @Override @Deprecated diff --git a/server/src/main/java/com/vaadin/data/util/DefaultItemSorter.java b/server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java index 2ef33c1ec2..345d50614f 100644 --- a/server/src/main/java/com/vaadin/data/util/DefaultItemSorter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.io.Serializable; import java.util.ArrayList; @@ -21,10 +21,10 @@ import java.util.Collection; import java.util.Comparator; import java.util.List; -import com.vaadin.data.Container; -import com.vaadin.data.Container.Sortable; -import com.vaadin.data.Item; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Container; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.Container.Sortable; /** * Provides a default implementation of an ItemSorter. The diff --git a/server/src/main/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java b/server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java index 765f0a4f5f..f25842aec9 100644 --- a/server/src/main/java/com/vaadin/data/util/HierarchicalContainerOrderedWrapper.java +++ b/server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java @@ -13,15 +13,15 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.util.Collection; -import com.vaadin.data.Container.Hierarchical; +import com.vaadin.v7.data.Container.Hierarchical; /** * A wrapper class for adding external ordering to containers not implementing - * the {@link com.vaadin.data.Container.Ordered} interface while retaining + * the {@link com.vaadin.v7.data.Container.Ordered} interface while retaining * {@link Hierarchical} features. * * @see ContainerOrderedWrapper diff --git a/server/src/main/java/com/vaadin/data/util/ItemSorter.java b/server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java index 2df551cdbc..9ca21ca137 100644 --- a/server/src/main/java/com/vaadin/data/util/ItemSorter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java @@ -13,13 +13,13 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.io.Serializable; import java.util.Comparator; -import com.vaadin.data.Container; -import com.vaadin.data.Container.Sortable; +import com.vaadin.v7.data.Container; +import com.vaadin.v7.data.Container.Sortable; /** * An item comparator which is compatible with the {@link Sortable} interface. diff --git a/server/src/main/java/com/vaadin/data/util/ListSet.java b/server/src/main/java/com/vaadin/v7/data/util/ListSet.java index 9a5ef1d172..2fd182238d 100644 --- a/server/src/main/java/com/vaadin/data/util/ListSet.java +++ b/server/src/main/java/com/vaadin/v7/data/util/ListSet.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.util.ArrayList; import java.util.Collection; diff --git a/server/src/main/java/com/vaadin/data/util/MethodProperty.java b/server/src/main/java/com/vaadin/v7/data/util/MethodProperty.java index 6f18b88344..86fb0ae40d 100644 --- a/server/src/main/java/com/vaadin/data/util/MethodProperty.java +++ b/server/src/main/java/com/vaadin/v7/data/util/MethodProperty.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import static com.vaadin.util.ReflectTools.convertPrimitiveType; @@ -25,9 +25,9 @@ import java.util.Arrays; import java.util.logging.Level; import java.util.logging.Logger; -import com.vaadin.data.Property; import com.vaadin.shared.util.SharedUtil; import com.vaadin.util.SerializerHelper; +import com.vaadin.v7.data.Property; /** * <p> diff --git a/server/src/main/java/com/vaadin/data/util/MethodPropertyDescriptor.java b/server/src/main/java/com/vaadin/v7/data/util/MethodPropertyDescriptor.java index cba5f3e51d..dfffb5b189 100644 --- a/server/src/main/java/com/vaadin/data/util/MethodPropertyDescriptor.java +++ b/server/src/main/java/com/vaadin/v7/data/util/MethodPropertyDescriptor.java @@ -13,16 +13,16 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.io.IOException; import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger; -import com.vaadin.data.Property; import com.vaadin.util.ReflectTools; import com.vaadin.util.SerializerHelper; +import com.vaadin.v7.data.Property; /** * Property descriptor that is able to create simple {@link MethodProperty} diff --git a/server/src/main/java/com/vaadin/data/util/NestedMethodProperty.java b/server/src/main/java/com/vaadin/v7/data/util/NestedMethodProperty.java index 59c5324858..38bf7300aa 100644 --- a/server/src/main/java/com/vaadin/data/util/NestedMethodProperty.java +++ b/server/src/main/java/com/vaadin/v7/data/util/NestedMethodProperty.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import static com.vaadin.util.ReflectTools.convertPrimitiveType; @@ -24,9 +24,9 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import com.vaadin.data.Property; -import com.vaadin.data.util.MethodProperty.MethodException; import com.vaadin.shared.util.SharedUtil; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.util.MethodProperty.MethodException; /** * Nested accessor based property for a bean. diff --git a/server/src/main/java/com/vaadin/data/util/NestedPropertyDescriptor.java b/server/src/main/java/com/vaadin/v7/data/util/NestedPropertyDescriptor.java index 91481230db..7bbf6253a5 100644 --- a/server/src/main/java/com/vaadin/data/util/NestedPropertyDescriptor.java +++ b/server/src/main/java/com/vaadin/v7/data/util/NestedPropertyDescriptor.java @@ -13,9 +13,9 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Property; /** * Property descriptor that is able to create nested property instances for a diff --git a/server/src/main/java/com/vaadin/data/util/ObjectProperty.java b/server/src/main/java/com/vaadin/v7/data/util/ObjectProperty.java index 0855924bde..cd9f6c36c7 100644 --- a/server/src/main/java/com/vaadin/data/util/ObjectProperty.java +++ b/server/src/main/java/com/vaadin/v7/data/util/ObjectProperty.java @@ -14,13 +14,13 @@ * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Property; /** * A simple data object containing one typed value. This class is a - * straightforward implementation of the the {@link com.vaadin.data.Property} + * straightforward implementation of the the {@link com.vaadin.v7.data.Property} * interface. * * @author Vaadin Ltd. diff --git a/server/src/main/java/com/vaadin/data/util/PropertyFormatter.java b/server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java index 908c7fb1e5..c95f97a1f1 100644 --- a/server/src/main/java/com/vaadin/data/util/PropertyFormatter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; -import com.vaadin.data.Property; -import com.vaadin.v7.data.util.converter.LegacyConverter; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.util.converter.Converter; /** * Formatting proxy for a {@link Property}. @@ -46,7 +46,7 @@ import com.vaadin.v7.data.util.converter.LegacyConverter; * type of the underlying property (a PropertyFormatter is always a * Property<String>) * - * @deprecated As of 7.0, replaced by {@link LegacyConverter} + * @deprecated As of 7.0, replaced by {@link Converter} * @author Vaadin Ltd. * @since 5.3.0 */ @@ -239,7 +239,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String> * This should not be called directly. */ @Override - public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) { + public void valueChange(com.vaadin.v7.data.Property.ValueChangeEvent event) { fireValueChange(); } @@ -250,7 +250,7 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String> */ @Override public void readOnlyStatusChange( - com.vaadin.data.Property.ReadOnlyStatusChangeEvent event) { + com.vaadin.v7.data.Property.ReadOnlyStatusChangeEvent event) { fireReadOnlyStatusChange(); } diff --git a/server/src/main/java/com/vaadin/data/util/PropertyValueGenerator.java b/server/src/main/java/com/vaadin/v7/data/util/PropertyValueGenerator.java index 25067d09f5..8cc4e7ac10 100644 --- a/server/src/main/java/com/vaadin/data/util/PropertyValueGenerator.java +++ b/server/src/main/java/com/vaadin/v7/data/util/PropertyValueGenerator.java @@ -13,15 +13,15 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.io.Serializable; -import com.vaadin.data.Container.Filter; -import com.vaadin.data.Item; -import com.vaadin.data.Property; import com.vaadin.data.sort.SortOrder; -import com.vaadin.data.util.filter.UnsupportedFilterException; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.Container.Filter; +import com.vaadin.v7.data.util.filter.UnsupportedFilterException; /** * PropertyValueGenerator for GeneratedPropertyContainer. diff --git a/server/src/main/java/com/vaadin/data/util/PropertysetItem.java b/server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java index 9fc3eca4e3..092cf3f36e 100644 --- a/server/src/main/java/com/vaadin/data/util/PropertysetItem.java +++ b/server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.util.Collection; import java.util.Collections; @@ -23,8 +23,8 @@ import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; -import com.vaadin.data.Item; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Property; /** * Class for handling a set of identified Properties. The elements contained in @@ -211,7 +211,7 @@ public class PropertysetItem /** * @deprecated As of 7.0, replaced by - * {@link #addPropertySetChangeListener(com.vaadin.data.Item.PropertySetChangeListener)} + * {@link #addPropertySetChangeListener(com.vaadin.v7.data.Item.PropertySetChangeListener)} **/ @Override @Deprecated @@ -235,7 +235,7 @@ public class PropertysetItem /** * @deprecated As of 7.0, replaced by - * {@link #removePropertySetChangeListener(com.vaadin.data.Item.PropertySetChangeListener)} + * {@link #removePropertySetChangeListener(com.vaadin.v7.data.Item.PropertySetChangeListener)} **/ @Override @Deprecated diff --git a/server/src/main/java/com/vaadin/data/util/TextFileProperty.java b/server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java index 2e84d93dc3..ce5bed8968 100644 --- a/server/src/main/java/com/vaadin/data/util/TextFileProperty.java +++ b/server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.io.BufferedReader; import java.io.BufferedWriter; diff --git a/server/src/main/java/com/vaadin/data/util/TransactionalPropertyWrapper.java b/server/src/main/java/com/vaadin/v7/data/util/TransactionalPropertyWrapper.java index c81aa6fcfd..21afa4bc92 100644 --- a/server/src/main/java/com/vaadin/data/util/TransactionalPropertyWrapper.java +++ b/server/src/main/java/com/vaadin/v7/data/util/TransactionalPropertyWrapper.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; -import com.vaadin.data.Property; -import com.vaadin.data.Property.ValueChangeEvent; -import com.vaadin.data.Property.ValueChangeNotifier; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.Property.ValueChangeEvent; +import com.vaadin.v7.data.Property.ValueChangeNotifier; /** * Wrapper class that helps implement two-phase commit for a non-transactional @@ -34,7 +34,7 @@ import com.vaadin.data.Property.ValueChangeNotifier; * fired at the end of a successful transaction, whereas listeners attached to * the underlying property may receive multiple value change events. * - * @see com.vaadin.data.Property.Transactional + * @see com.vaadin.v7.data.Property.Transactional * * @author Vaadin Ltd * @since 7.0 diff --git a/server/src/main/java/com/vaadin/data/util/VaadinPropertyDescriptor.java b/server/src/main/java/com/vaadin/v7/data/util/VaadinPropertyDescriptor.java index 90e82b37af..71c562d425 100644 --- a/server/src/main/java/com/vaadin/data/util/VaadinPropertyDescriptor.java +++ b/server/src/main/java/com/vaadin/v7/data/util/VaadinPropertyDescriptor.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util; +package com.vaadin.v7.data.util; import java.io.Serializable; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Property; /** * Property descriptor that can create a property instance for a bean. diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyAbstractStringToNumberConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java index d927bd57de..bd9392ee01 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyAbstractStringToNumberConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java @@ -32,8 +32,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.1 */ -public abstract class LegacyAbstractStringToNumberConverter<T> - implements LegacyConverter<String, T> { +public abstract class AbstractStringToNumberConverter<T> + implements Converter<String, T> { /** * Returns the format used by {@link #convertToPresentation(Object, Locale)} diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java index ee1aea81c7..e545c6ea6b 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java @@ -47,7 +47,7 @@ import java.util.Locale; * @author Vaadin Ltd. * @since 7.0 */ -public interface LegacyConverter<PRESENTATION, MODEL> extends Serializable { +public interface Converter<PRESENTATION, MODEL> extends Serializable { /** * Converts the given value from target type to source type. @@ -121,8 +121,8 @@ public interface LegacyConverter<PRESENTATION, MODEL> extends Serializable { /** * An exception that signals that the value passed to - * {@link LegacyConverter#convertToPresentation(Object, Class, Locale)} or - * {@link LegacyConverter#convertToModel(Object, Class, Locale)} could not + * {@link Converter#convertToPresentation(Object, Class, Locale)} or + * {@link Converter#convertToModel(Object, Class, Locale)} could not * be converted. * * @author Vaadin Ltd diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyConverterFactory.java b/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterFactory.java index a177e7673e..e4ec82c056 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyConverterFactory.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterFactory.java @@ -26,8 +26,8 @@ import java.io.Serializable; * @since 7.0 * */ -public interface LegacyConverterFactory extends Serializable { - public <PRESENTATION, MODEL> LegacyConverter<PRESENTATION, MODEL> createConverter( +public interface ConverterFactory extends Serializable { + public <PRESENTATION, MODEL> Converter<PRESENTATION, MODEL> createConverter( Class<PRESENTATION> presentationType, Class<MODEL> modelType); } diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyConverterUtil.java b/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java index f6e0fec69c..b0679e9caf 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyConverterUtil.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java @@ -20,12 +20,12 @@ import java.util.Locale; import com.vaadin.server.VaadinSession; -public class LegacyConverterUtil implements Serializable { +public class ConverterUtil implements Serializable { /** * Finds a converter that can convert from the given presentation type to * the given model type and back. Uses the given application to find a - * {@link LegacyConverterFactory} or, if application is null, uses the + * {@link ConverterFactory} or, if application is null, uses the * {@link VaadinSession#getCurrent()}. * * @param <PRESENTATIONTYPE> @@ -42,16 +42,16 @@ public class LegacyConverterUtil implements Serializable { * @return a Converter capable of converting between the given types or null * if no converter was found */ - public static <PRESENTATIONTYPE, MODELTYPE> LegacyConverter<PRESENTATIONTYPE, MODELTYPE> getConverter( + public static <PRESENTATIONTYPE, MODELTYPE> Converter<PRESENTATIONTYPE, MODELTYPE> getConverter( Class<PRESENTATIONTYPE> presentationType, Class<MODELTYPE> modelType, VaadinSession session) { - LegacyConverter<PRESENTATIONTYPE, MODELTYPE> converter = null; + Converter<PRESENTATIONTYPE, MODELTYPE> converter = null; if (session == null) { session = VaadinSession.getCurrent(); } if (session != null) { - LegacyConverterFactory factory = session.getConverterFactory(); + ConverterFactory factory = session.getConverterFactory(); converter = factory.createConverter(presentationType, modelType); } return converter; @@ -77,15 +77,15 @@ public class LegacyConverterUtil implements Serializable { * @return the converted value, compatible with the presentation type, or * the original value if its type is compatible and no converter is * set. - * @throws LegacyConverter.ConversionException + * @throws Converter.ConversionException * if there was a problem converting the value */ @SuppressWarnings("unchecked") public static <PRESENTATIONTYPE, MODELTYPE> PRESENTATIONTYPE convertFromModel( MODELTYPE modelValue, Class<? extends PRESENTATIONTYPE> presentationType, - LegacyConverter<PRESENTATIONTYPE, MODELTYPE> converter, - Locale locale) throws LegacyConverter.ConversionException { + Converter<PRESENTATIONTYPE, MODELTYPE> converter, + Locale locale) throws Converter.ConversionException { if (converter != null) { /* * If there is a converter, always use it. It must convert or throw @@ -95,7 +95,7 @@ public class LegacyConverterUtil implements Serializable { modelValue, presentationType, locale); if (presentation != null && !presentationType.isInstance(presentation)) { - throw new LegacyConverter.ConversionException( + throw new Converter.ConversionException( "Converter returned an object of type " + presentation.getClass().getName() + " when expecting " @@ -113,7 +113,7 @@ public class LegacyConverterUtil implements Serializable { if (presentationType.isAssignableFrom(modelValue.getClass())) { return (PRESENTATIONTYPE) modelValue; } else { - throw new LegacyConverter.ConversionException( + throw new Converter.ConversionException( "Unable to convert value of type " + modelValue.getClass().getName() + " to presentation type " + presentationType @@ -140,13 +140,13 @@ public class LegacyConverterUtil implements Serializable { * * @return the converted value, compatible with the model type, or the * original value if its type is compatible and no converter is set. - * @throws LegacyConverter.ConversionException + * @throws Converter.ConversionException * if there was a problem converting the value */ public static <MODELTYPE, PRESENTATIONTYPE> MODELTYPE convertToModel( PRESENTATIONTYPE presentationValue, Class<MODELTYPE> modelType, - LegacyConverter<PRESENTATIONTYPE, MODELTYPE> converter, - Locale locale) throws LegacyConverter.ConversionException { + Converter<PRESENTATIONTYPE, MODELTYPE> converter, + Locale locale) throws Converter.ConversionException { if (converter != null) { /* * If there is a converter, always use it. It must convert or throw @@ -155,7 +155,7 @@ public class LegacyConverterUtil implements Serializable { MODELTYPE model = converter.convertToModel(presentationValue, modelType, locale); if (model != null && !modelType.isInstance(model)) { - throw new LegacyConverter.ConversionException( + throw new Converter.ConversionException( "Converter returned an object of type " + model.getClass().getName() + " when expecting " + modelType.getName()); @@ -177,7 +177,7 @@ public class LegacyConverterUtil implements Serializable { // presentation type directly compatible with model type return modelType.cast(presentationValue); } else { - throw new LegacyConverter.ConversionException( + throw new Converter.ConversionException( "Unable to convert value of type " + presentationValue.getClass().getName() + " to model type " + modelType @@ -191,7 +191,7 @@ public class LegacyConverterUtil implements Serializable { * presentation and model type. Does strict type checking and only returns * true if the converter claims it can handle exactly the given types. * - * @see #canConverterPossiblyHandle(LegacyConverter, Class, Class) + * @see #canConverterPossiblyHandle(Converter, Class, Class) * * @param converter * The converter to check. If this is null the result is always @@ -203,7 +203,7 @@ public class LegacyConverterUtil implements Serializable { * @return true if the converter supports conversion between the given * presentation and model type, false otherwise */ - public static boolean canConverterHandle(LegacyConverter<?, ?> converter, + public static boolean canConverterHandle(Converter<?, ?> converter, Class<?> presentationType, Class<?> modelType) { if (converter == null) { return false; @@ -234,7 +234,7 @@ public class LegacyConverterUtil implements Serializable { * given presentation and model type, false otherwise */ public static boolean canConverterPossiblyHandle( - LegacyConverter<?, ?> converter, Class<?> presentationType, + Converter<?, ?> converter, Class<?> presentationType, Class<?> modelType) { if (converter == null) { return false; diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyDateToLongConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java index 495d43d2de..467b848988 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyDateToLongConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java @@ -25,7 +25,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ -public class LegacyDateToLongConverter implements LegacyConverter<Date, Long> { +public class DateToLongConverter implements Converter<Date, Long> { /* * (non-Javadoc) diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyDateToSqlDateConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java index a64a7ab04c..c789e7d1e8 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyDateToSqlDateConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java @@ -32,8 +32,8 @@ import java.util.Locale; * @since 7.1 * @author Vaadin Ltd */ -public class LegacyDateToSqlDateConverter - implements LegacyConverter<Date, java.sql.Date> { +public class DateToSqlDateConverter + implements Converter<Date, java.sql.Date> { @Override public java.sql.Date convertToModel(Date value, diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyDefaultConverterFactory.java b/server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java index 5becb07143..681cbfc6b2 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyDefaultConverterFactory.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java @@ -24,26 +24,26 @@ import java.util.logging.Logger; import com.vaadin.server.VaadinSession; /** - * Default implementation of {@link LegacyConverterFactory}. Provides converters + * Default implementation of {@link ConverterFactory}. Provides converters * for standard types like {@link String}, {@link Double} and {@link Date}. * </p> * <p> * Custom converters can be provided by extending this class and using - * {@link VaadinSession#setConverterFactory(LegacyConverterFactory)}. + * {@link VaadinSession#setConverterFactory(ConverterFactory)}. * </p> * * @author Vaadin Ltd * @since 7.0 */ -public class LegacyDefaultConverterFactory implements LegacyConverterFactory { +public class DefaultConverterFactory implements ConverterFactory { private final static Logger log = Logger - .getLogger(LegacyDefaultConverterFactory.class.getName()); + .getLogger(DefaultConverterFactory.class.getName()); @Override - public <PRESENTATION, MODEL> LegacyConverter<PRESENTATION, MODEL> createConverter( + public <PRESENTATION, MODEL> Converter<PRESENTATION, MODEL> createConverter( Class<PRESENTATION> presentationType, Class<MODEL> modelType) { - LegacyConverter<PRESENTATION, MODEL> converter = findConverter( + Converter<PRESENTATION, MODEL> converter = findConverter( presentationType, modelType); if (converter != null) { log.finest(getClass().getName() + " created a " @@ -52,12 +52,12 @@ public class LegacyDefaultConverterFactory implements LegacyConverterFactory { } // Try to find a reverse converter - LegacyConverter<MODEL, PRESENTATION> reverseConverter = findConverter( + Converter<MODEL, PRESENTATION> reverseConverter = findConverter( modelType, presentationType); if (reverseConverter != null) { log.finest(getClass().getName() + " created a reverse " + reverseConverter.getClass()); - return new LegacyReverseConverter<PRESENTATION, MODEL>( + return new ReverseConverter<PRESENTATION, MODEL>( reverseConverter); } @@ -68,18 +68,18 @@ public class LegacyDefaultConverterFactory implements LegacyConverterFactory { } - protected <PRESENTATION, MODEL> LegacyConverter<PRESENTATION, MODEL> findConverter( + protected <PRESENTATION, MODEL> Converter<PRESENTATION, MODEL> findConverter( Class<PRESENTATION> presentationType, Class<MODEL> modelType) { if (presentationType == String.class) { // TextField converters and more - LegacyConverter<PRESENTATION, MODEL> converter = (LegacyConverter<PRESENTATION, MODEL>) createStringConverter( + Converter<PRESENTATION, MODEL> converter = (Converter<PRESENTATION, MODEL>) createStringConverter( modelType); if (converter != null) { return converter; } } else if (presentationType == Date.class) { // DateField converters and more - LegacyConverter<PRESENTATION, MODEL> converter = (LegacyConverter<PRESENTATION, MODEL>) createDateConverter( + Converter<PRESENTATION, MODEL> converter = (Converter<PRESENTATION, MODEL>) createDateConverter( modelType); if (converter != null) { return converter; @@ -90,41 +90,41 @@ public class LegacyDefaultConverterFactory implements LegacyConverterFactory { } - protected LegacyConverter<Date, ?> createDateConverter( + protected Converter<Date, ?> createDateConverter( Class<?> sourceType) { if (Long.class.isAssignableFrom(sourceType)) { - return new LegacyDateToLongConverter(); + return new DateToLongConverter(); } else if (java.sql.Date.class.isAssignableFrom(sourceType)) { - return new LegacyDateToSqlDateConverter(); + return new DateToSqlDateConverter(); } else { return null; } } - protected LegacyConverter<String, ?> createStringConverter( + protected Converter<String, ?> createStringConverter( Class<?> sourceType) { if (Double.class.isAssignableFrom(sourceType)) { - return new LegacyStringToDoubleConverter(); + return new StringToDoubleConverter(); } else if (Float.class.isAssignableFrom(sourceType)) { - return new LegacyStringToFloatConverter(); + return new StringToFloatConverter(); } else if (Integer.class.isAssignableFrom(sourceType)) { - return new LegacyStringToIntegerConverter(); + return new StringToIntegerConverter(); } else if (Long.class.isAssignableFrom(sourceType)) { - return new LegacyStringToLongConverter(); + return new StringToLongConverter(); } else if (BigDecimal.class.isAssignableFrom(sourceType)) { - return new LegacyStringToBigDecimalConverter(); + return new StringToBigDecimalConverter(); } else if (Boolean.class.isAssignableFrom(sourceType)) { - return new LegacyStringToBooleanConverter(); + return new StringToBooleanConverter(); } else if (Date.class.isAssignableFrom(sourceType)) { - return new LegacyStringToDateConverter(); + return new StringToDateConverter(); } else if (Enum.class.isAssignableFrom(sourceType)) { - return new LegacyStringToEnumConverter(); + return new StringToEnumConverter(); } else if (BigInteger.class.isAssignableFrom(sourceType)) { - return new LegacyStringToBigIntegerConverter(); + return new StringToBigIntegerConverter(); } else if (Short.class.isAssignableFrom(sourceType)) { - return new LegacyStringToShortConverter(); + return new StringToShortConverter(); } else if (Byte.class.isAssignableFrom(sourceType)) { - return new LegacyStringToByteConverter(); + return new StringToByteConverter(); } else { return null; } diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyReverseConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java index 7a4a968b99..cbbf62ad6c 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyReverseConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java @@ -19,7 +19,7 @@ package com.vaadin.v7.data.util.converter; import java.util.Locale; /** - * A converter that wraps another {@link LegacyConverter} and reverses source + * A converter that wraps another {@link Converter} and reverses source * and target types. * * @param <MODEL> @@ -30,10 +30,10 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ -public class LegacyReverseConverter<PRESENTATION, MODEL> - implements LegacyConverter<PRESENTATION, MODEL> { +public class ReverseConverter<PRESENTATION, MODEL> + implements Converter<PRESENTATION, MODEL> { - private LegacyConverter<MODEL, PRESENTATION> realConverter; + private Converter<MODEL, PRESENTATION> realConverter; /** * Creates a converter from source to target based on a converter that @@ -42,8 +42,8 @@ public class LegacyReverseConverter<PRESENTATION, MODEL> * @param converter * The converter to use in a reverse fashion */ - public LegacyReverseConverter( - LegacyConverter<MODEL, PRESENTATION> converter) { + public ReverseConverter( + Converter<MODEL, PRESENTATION> converter) { this.realConverter = converter; } @@ -56,7 +56,7 @@ public class LegacyReverseConverter<PRESENTATION, MODEL> @Override public MODEL convertToModel(PRESENTATION value, Class<? extends MODEL> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { return realConverter.convertToPresentation(value, targetType, locale); } @@ -70,7 +70,7 @@ public class LegacyReverseConverter<PRESENTATION, MODEL> @Override public PRESENTATION convertToPresentation(MODEL value, Class<? extends PRESENTATION> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { return realConverter.convertToModel(value, targetType, locale); } diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToBigDecimalConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java index 60374d4255..ff8649b7d8 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToBigDecimalConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java @@ -34,8 +34,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.2 */ -public class LegacyStringToBigDecimalConverter - extends LegacyAbstractStringToNumberConverter<BigDecimal> { +public class StringToBigDecimalConverter + extends AbstractStringToNumberConverter<BigDecimal> { @Override protected NumberFormat getFormat(Locale locale) { NumberFormat numberFormat = super.getFormat(locale); @@ -49,7 +49,7 @@ public class LegacyStringToBigDecimalConverter @Override public BigDecimal convertToModel(String value, Class<? extends BigDecimal> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { return (BigDecimal) convertToNumber(value, BigDecimal.class, locale); } diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToBigIntegerConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java index 76cd77d86f..d645fd35ad 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToBigIntegerConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java @@ -35,8 +35,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.4 */ -public class LegacyStringToBigIntegerConverter - extends LegacyAbstractStringToNumberConverter<BigInteger> { +public class StringToBigIntegerConverter + extends AbstractStringToNumberConverter<BigInteger> { @Override protected NumberFormat getFormat(Locale locale) { @@ -51,7 +51,7 @@ public class LegacyStringToBigIntegerConverter @Override public BigInteger convertToModel(String value, Class<? extends BigInteger> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { BigDecimal bigDecimalValue = (BigDecimal) convertToNumber(value, BigDecimal.class, locale); diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToBooleanConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java index f43144f56b..c8ebea6e5b 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToBooleanConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java @@ -33,8 +33,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ -public class LegacyStringToBooleanConverter - implements LegacyConverter<String, Boolean> { +public class StringToBooleanConverter + implements Converter<String, Boolean> { private final String trueString; @@ -45,7 +45,7 @@ public class LegacyStringToBooleanConverter * "false" * */ - public LegacyStringToBooleanConverter() { + public StringToBooleanConverter() { this(Boolean.TRUE.toString(), Boolean.FALSE.toString()); } @@ -58,7 +58,7 @@ public class LegacyStringToBooleanConverter * @param trueString * string representation for <code>true</code> */ - public LegacyStringToBooleanConverter(String trueString, + public StringToBooleanConverter(String trueString, String falseString) { this.trueString = trueString; this.falseString = falseString; diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToByteConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java index 5d24211286..e915a95550 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToByteConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java @@ -30,8 +30,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.4 */ -public class LegacyStringToByteConverter - extends LegacyAbstractStringToNumberConverter<Byte> { +public class StringToByteConverter + extends AbstractStringToNumberConverter<Byte> { /** * Returns the format used by diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToCollectionConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java index f4475ad4a3..708cc13fe8 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToCollectionConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java @@ -38,11 +38,11 @@ import java.util.Locale; * * @author Vaadin Ltd */ -public class LegacyStringToCollectionConverter - implements LegacyConverter<String, Collection> { +public class StringToCollectionConverter + implements Converter<String, Collection> { private final String delimiter; - private final LegacyConverter<String, ?> tokenConverter; + private final Converter<String, ?> tokenConverter; private final Class<?> tokenType; private final CollectionFactory factory; @@ -50,7 +50,7 @@ public class LegacyStringToCollectionConverter * Creates converter with <code>", "</code> as delimiter and {@link String} * as token model type in collection. */ - public LegacyStringToCollectionConverter() { + public StringToCollectionConverter() { this(", ", null, String.class); } @@ -61,7 +61,7 @@ public class LegacyStringToCollectionConverter * @param delimiter * custom delimiter */ - public LegacyStringToCollectionConverter(String delimiter) { + public StringToCollectionConverter(String delimiter) { this(delimiter, null, String.class); } @@ -77,8 +77,8 @@ public class LegacyStringToCollectionConverter * @param tokenType * expected token model type */ - public LegacyStringToCollectionConverter( - LegacyConverter<String, ?> tokenConverter, Class<?> tokenType) { + public StringToCollectionConverter( + Converter<String, ?> tokenConverter, Class<?> tokenType) { this(", ", tokenConverter, tokenType); } @@ -96,8 +96,8 @@ public class LegacyStringToCollectionConverter * @param delimiter * delimiter in presentation string */ - public LegacyStringToCollectionConverter(String delimiter, - LegacyConverter<String, ?> tokenConverter, Class<?> tokenClass) { + public StringToCollectionConverter(String delimiter, + Converter<String, ?> tokenConverter, Class<?> tokenClass) { this(delimiter, tokenConverter, tokenClass, new DefaultCollectionFactory()); } @@ -118,8 +118,8 @@ public class LegacyStringToCollectionConverter * @param factory * factory to create resulting collection */ - public LegacyStringToCollectionConverter(String delimiter, - LegacyConverter<String, ?> tokenConverter, Class<?> tokenClass, + public StringToCollectionConverter(String delimiter, + Converter<String, ?> tokenConverter, Class<?> tokenClass, CollectionFactory factory) { if (delimiter == null || delimiter.isEmpty()) { throw new IllegalArgumentException( @@ -144,7 +144,7 @@ public class LegacyStringToCollectionConverter @Override public Collection convertToModel(String value, Class<? extends Collection> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { if (value == null) { return null; } @@ -152,7 +152,7 @@ public class LegacyStringToCollectionConverter int index = value.indexOf(delimiter); int previous = 0; Collection result = factory.createCollection(targetType); - LegacyConverter converter = tokenConverter; + Converter converter = tokenConverter; while (index != -1) { collectToken(value.substring(previous, index), result, converter, locale); @@ -166,12 +166,12 @@ public class LegacyStringToCollectionConverter @Override public String convertToPresentation(Collection value, Class<? extends String> targetType, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { if (value == null) { return null; } StringBuilder builder = new StringBuilder(); - LegacyConverter converter = tokenConverter; + Converter converter = tokenConverter; for (Iterator<?> iterator = value.iterator(); iterator.hasNext();) { if (converter == null) { builder.append(iterator.next()); @@ -189,7 +189,7 @@ public class LegacyStringToCollectionConverter } private void collectToken(String token, Collection collection, - LegacyConverter converter, Locale locale) { + Converter converter, Locale locale) { if (converter == null) { collection.add(token); } else { diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToDateConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java index 8987f525f2..7d7f5b96aa 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToDateConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java @@ -34,8 +34,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ -public class LegacyStringToDateConverter - implements LegacyConverter<String, Date> { +public class StringToDateConverter + implements Converter<String, Date> { /** * Returns the format used by @@ -67,7 +67,7 @@ public class LegacyStringToDateConverter @Override public Date convertToModel(String value, Class<? extends Date> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { if (targetType != getModelType()) { throw new ConversionException( "Converter only supports " + getModelType().getName() @@ -101,7 +101,7 @@ public class LegacyStringToDateConverter @Override public String convertToPresentation(Date value, Class<? extends String> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { if (value == null) { return null; } diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToDoubleConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java index a1cdf53f51..1da06aa834 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToDoubleConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java @@ -33,8 +33,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ -public class LegacyStringToDoubleConverter - extends LegacyAbstractStringToNumberConverter<Double> { +public class StringToDoubleConverter + extends AbstractStringToNumberConverter<Double> { /* * (non-Javadoc) diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToEnumConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java index 5b51fc5bfc..d753b1e73f 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToEnumConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java @@ -36,8 +36,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.4 */ -public class LegacyStringToEnumConverter - implements LegacyConverter<String, Enum> { +public class StringToEnumConverter + implements Converter<String, Enum> { @Override public Enum convertToModel(String value, Class<? extends Enum> targetType, diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToFloatConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java index 49f1a19c84..e37cf89784 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToFloatConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java @@ -33,8 +33,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ -public class LegacyStringToFloatConverter - extends LegacyAbstractStringToNumberConverter<Float> { +public class StringToFloatConverter + extends AbstractStringToNumberConverter<Float> { /* * (non-Javadoc) diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToIntegerConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java index 52e57ee180..82dcf7e6b8 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToIntegerConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java @@ -30,8 +30,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ -public class LegacyStringToIntegerConverter - extends LegacyAbstractStringToNumberConverter<Integer> { +public class StringToIntegerConverter + extends AbstractStringToNumberConverter<Integer> { /** * Returns the format used by diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToLongConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java index 6ce152f8db..29c129c3fd 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToLongConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java @@ -30,8 +30,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.2 */ -public class LegacyStringToLongConverter - extends LegacyAbstractStringToNumberConverter<Long> { +public class StringToLongConverter + extends AbstractStringToNumberConverter<Long> { /** * Returns the format used by diff --git a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToShortConverter.java b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java index 8f05fea8a3..71408eb53e 100644 --- a/server/src/main/java/com/vaadin/v7/data/util/converter/LegacyStringToShortConverter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java @@ -30,8 +30,8 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.4 */ -public class LegacyStringToShortConverter - extends LegacyAbstractStringToNumberConverter<Short> { +public class StringToShortConverter + extends AbstractStringToNumberConverter<Short> { /** * Returns the format used by diff --git a/server/src/main/java/com/vaadin/data/util/filter/AbstractJunctionFilter.java b/server/src/main/java/com/vaadin/v7/data/util/filter/AbstractJunctionFilter.java index 0922657cac..17b708a22c 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/AbstractJunctionFilter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/AbstractJunctionFilter.java @@ -13,13 +13,13 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import com.vaadin.data.Container.Filter; +import com.vaadin.v7.data.Container.Filter; /** * Abstract base class for filters that are composed of multiple sub-filters. diff --git a/server/src/main/java/com/vaadin/data/util/filter/And.java b/server/src/main/java/com/vaadin/v7/data/util/filter/And.java index f930d09ca8..b7b5a18f3d 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/And.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/And.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; -import com.vaadin.data.Container.Filter; -import com.vaadin.data.Item; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Container.Filter; /** * A compound {@link Filter} that accepts an item if all of its filters accept diff --git a/server/src/main/java/com/vaadin/data/util/filter/Between.java b/server/src/main/java/com/vaadin/v7/data/util/filter/Between.java index 9b81ef610d..ec0e468554 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/Between.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/Between.java @@ -13,13 +13,13 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; import java.util.Arrays; -import com.vaadin.data.Container.Filter; -import com.vaadin.data.Item; import com.vaadin.shared.util.SharedUtil; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Container.Filter; public class Between implements Filter { diff --git a/server/src/main/java/com/vaadin/data/util/filter/Compare.java b/server/src/main/java/com/vaadin/v7/data/util/filter/Compare.java index c2c8f23777..5b945ff411 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/Compare.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/Compare.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; -import com.vaadin.data.Container.Filter; -import com.vaadin.data.Item; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.Container.Filter; /** * Simple container filter comparing an item property value against a given diff --git a/server/src/main/java/com/vaadin/data/util/filter/IsNull.java b/server/src/main/java/com/vaadin/v7/data/util/filter/IsNull.java index 3e5fb985fe..0a7e115255 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/IsNull.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/IsNull.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; -import com.vaadin.data.Container.Filter; -import com.vaadin.data.Item; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.Container.Filter; /** * Simple container filter checking whether an item property value is null. diff --git a/server/src/main/java/com/vaadin/data/util/filter/Like.java b/server/src/main/java/com/vaadin/v7/data/util/filter/Like.java index 71d6ee5ec5..5d92271afe 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/Like.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/Like.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; -import com.vaadin.data.Container.Filter; -import com.vaadin.data.Item; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Container.Filter; public class Like implements Filter { private final Object propertyId; diff --git a/server/src/main/java/com/vaadin/data/util/filter/Not.java b/server/src/main/java/com/vaadin/v7/data/util/filter/Not.java index 566ad9cc56..d0680eb481 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/Not.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/Not.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; -import com.vaadin.data.Container.Filter; -import com.vaadin.data.Item; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Container.Filter; /** * Negating filter that accepts the items rejected by another filter. diff --git a/server/src/main/java/com/vaadin/data/util/filter/Or.java b/server/src/main/java/com/vaadin/v7/data/util/filter/Or.java index fffa2242d0..5062e6d987 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/Or.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/Or.java @@ -13,10 +13,10 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; -import com.vaadin.data.Container.Filter; -import com.vaadin.data.Item; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Container.Filter; /** * A compound {@link Filter} that accepts an item if any of its filters accept diff --git a/server/src/main/java/com/vaadin/data/util/filter/SimpleStringFilter.java b/server/src/main/java/com/vaadin/v7/data/util/filter/SimpleStringFilter.java index 51f9e19b61..b3f7d032e1 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/SimpleStringFilter.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/SimpleStringFilter.java @@ -13,11 +13,11 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; -import com.vaadin.data.Container.Filter; -import com.vaadin.data.Item; -import com.vaadin.data.Property; +import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.Container.Filter; /** * Simple string filter for matching items that start with or contain a diff --git a/server/src/main/java/com/vaadin/data/util/filter/UnsupportedFilterException.java b/server/src/main/java/com/vaadin/v7/data/util/filter/UnsupportedFilterException.java index 507c1a8163..68e18da32a 100644 --- a/server/src/main/java/com/vaadin/data/util/filter/UnsupportedFilterException.java +++ b/server/src/main/java/com/vaadin/v7/data/util/filter/UnsupportedFilterException.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.util.filter; +package com.vaadin.v7.data.util.filter; import java.io.Serializable; diff --git a/server/src/main/java/com/vaadin/v7/ui/LegacyAbstractField.java b/server/src/main/java/com/vaadin/v7/ui/AbstractField.java index dec8f9fef7..33f262d581 100644 --- a/server/src/main/java/com/vaadin/v7/ui/LegacyAbstractField.java +++ b/server/src/main/java/com/vaadin/v7/ui/AbstractField.java @@ -30,8 +30,6 @@ import java.util.logging.Logger; import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Element; -import com.vaadin.data.Buffered; -import com.vaadin.data.Property; import com.vaadin.event.Action; import com.vaadin.event.ShortcutAction; import com.vaadin.event.ShortcutListener; @@ -44,24 +42,26 @@ import com.vaadin.ui.AbstractComponent; import com.vaadin.ui.Component; import com.vaadin.ui.declarative.DesignAttributeHandler; import com.vaadin.ui.declarative.DesignContext; +import com.vaadin.v7.data.Buffered; +import com.vaadin.v7.data.Property; import com.vaadin.v7.data.Validatable; import com.vaadin.v7.data.Validator; import com.vaadin.v7.data.Validator.InvalidValueException; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException; -import com.vaadin.v7.data.util.converter.LegacyConverterUtil; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.Converter.ConversionException; +import com.vaadin.v7.data.util.converter.ConverterUtil; /** * <p> * Abstract field component for implementing buffered property editors. The * field may hold an internal value, or it may be connected to any data source - * that implements the {@link com.vaadin.data.Property}interface. + * that implements the {@link com.vaadin.v7.data.Property}interface. * <code>LegacyAbstractField</code> implements that interface itself, too, so * accessing the Property value represented by it is straightforward. * </p> * * <p> - * LegacyAbstractField also provides the {@link com.vaadin.data.Buffered} + * LegacyAbstractField also provides the {@link com.vaadin.v7.data.Buffered} * interface for buffering the data source value. By default the LegacyField is * in write through-mode and {@link #setWriteThrough(boolean)}should be called * to enable buffering. @@ -83,8 +83,8 @@ import com.vaadin.v7.data.util.converter.LegacyConverterUtil; */ @SuppressWarnings("serial") @Deprecated -public abstract class LegacyAbstractField<T> extends AbstractComponent - implements LegacyField<T>, Property.ReadOnlyStatusChangeListener, +public abstract class AbstractField<T> extends AbstractComponent + implements Field<T>, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Action.ShortcutNotifier { /* Private members */ @@ -98,7 +98,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * A converter used to convert from the data model type to the field type * and vice versa. */ - private LegacyConverter<T, Object> converter = null; + private Converter<T, Object> converter = null; /** * Connected data-source. */ @@ -228,7 +228,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent /** * Tests if the invalid data is committed to datasource. * - * @see com.vaadin.data.BufferedValidatable#isInvalidCommitted() + * @see com.vaadin.v7.data.BufferedValidatable#isInvalidCommitted() */ @Override public boolean isInvalidCommitted() { @@ -238,7 +238,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent /** * Sets if the invalid data should be committed to datasource. * - * @see com.vaadin.data.BufferedValidatable#setInvalidCommitted(boolean) + * @see com.vaadin.v7.data.BufferedValidatable#setInvalidCommitted(boolean) */ @Override public void setInvalidCommitted(boolean isCommitted) { @@ -425,7 +425,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent */ @Override public void setValue(T newFieldValue) throws Property.ReadOnlyException, - LegacyConverter.ConversionException { + Converter.ConversionException { setValue(newFieldValue, false); } @@ -437,7 +437,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * @param repaintIsNotNeeded * True iff caller is sure that repaint is not needed. * @throws Property.ReadOnlyException - * @throws LegacyConverter.ConversionException + * @throws Converter.ConversionException * @throws InvalidValueException */ protected void setValue(T newFieldValue, boolean repaintIsNotNeeded) { @@ -455,12 +455,12 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * @param ignoreReadOnly * True iff if the read-only check should be ignored * @throws Property.ReadOnlyException - * @throws LegacyConverter.ConversionException + * @throws Converter.ConversionException * @throws InvalidValueException */ protected void setValue(T newFieldValue, boolean repaintIsNotNeeded, boolean ignoreReadOnly) throws Property.ReadOnlyException, - LegacyConverter.ConversionException, InvalidValueException { + Converter.ConversionException, InvalidValueException { if (!SharedUtil.equals(newFieldValue, getInternalValue())) { @@ -584,13 +584,13 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * * <p> * If the data source implements - * {@link com.vaadin.data.Property.ValueChangeNotifier} and/or - * {@link com.vaadin.data.Property.ReadOnlyStatusChangeNotifier}, the field + * {@link com.vaadin.v7.data.Property.ValueChangeNotifier} and/or + * {@link com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier}, the field * registers itself as a listener and updates itself according to the events * it receives. To avoid memory leaks caused by references to a field no * longer in use, the listener registrations are removed on - * {@link LegacyAbstractField#detach() detach} and re-added on - * {@link LegacyAbstractField#attach() attach}. + * {@link AbstractField#detach() detach} and re-added on + * {@link AbstractField#attach() attach}. * </p> * * <p> @@ -621,7 +621,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent // Check if the current converter is compatible. if (newDataSource != null - && !LegacyConverterUtil.canConverterPossiblyHandle( + && !ConverterUtil.canConverterPossiblyHandle( getConverter(), getType(), newDataSource.getType())) { // There is no converter set or there is no way the current // converter can be compatible. @@ -678,7 +678,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * from */ public void setConverter(Class<?> datamodelType) { - LegacyConverter<T, ?> c = (LegacyConverter<T, ?>) LegacyConverterUtil + Converter<T, ?> c = (Converter<T, ?>) ConverterUtil .getConverter(getType(), datamodelType, getSession()); setConverter(c); } @@ -690,7 +690,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * The data source value to convert. * @return The converted value that is compatible with the UI type or the * original value if its type is compatible and no converter is set. - * @throws LegacyConverter.ConversionException + * @throws Converter.ConversionException * if there is no converter and the type is not compatible with * the data source type. */ @@ -705,12 +705,12 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * The data source value to convert. * @return The converted value that is compatible with the UI type or the * original value if its type is compatible and no converter is set. - * @throws LegacyConverter.ConversionException + * @throws Converter.ConversionException * if there is no converter and the type is not compatible with * the data source type. */ private T convertFromModel(Object newValue, Locale locale) { - return LegacyConverterUtil.convertFromModel(newValue, getType(), + return ConverterUtil.convertFromModel(newValue, getType(), getConverter(), locale); } @@ -721,12 +721,12 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * The value to convert. Typically returned by * {@link #getFieldValue()} * @return The converted value that is compatible with the data source type. - * @throws LegacyConverter.ConversionException + * @throws Converter.ConversionException * if there is no converter and the type is not compatible with * the data source type. */ private Object convertToModel(T fieldValue) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { return convertToModel(fieldValue, getLocale()); } @@ -739,15 +739,15 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * @param locale * The locale to use for the conversion * @return The converted value that is compatible with the data source type. - * @throws LegacyConverter.ConversionException + * @throws Converter.ConversionException * if there is no converter and the type is not compatible with * the data source type. */ private Object convertToModel(T fieldValue, Locale locale) - throws LegacyConverter.ConversionException { + throws Converter.ConversionException { Class<?> modelType = getModelType(); try { - return LegacyConverterUtil.convertToModel(fieldValue, + return ConverterUtil.convertToModel(fieldValue, (Class<Object>) modelType, getConverter(), locale); } catch (ConversionException e) { throw new ConversionException(getConversionError(modelType, e), e); @@ -805,7 +805,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * Returns the current value (as returned by {@link #getValue()}) converted * to the data source type. * <p> - * This returns the same as {@link LegacyAbstractField#getValue()} if no + * This returns the same as {@link AbstractField#getValue()} if no * converter has been set. The value is not necessarily the same as the data * source value e.g. if the field is in buffered mode and has been modified. * </p> @@ -1091,7 +1091,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent */ @Override public void addValueChangeListener(Property.ValueChangeListener listener) { - addListener(LegacyAbstractField.ValueChangeEvent.class, listener, + addListener(AbstractField.ValueChangeEvent.class, listener, VALUE_CHANGE_METHOD); // ensure "automatic immediate handling" works markAsDirty(); @@ -1099,7 +1099,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent /** * @deprecated As of 7.0, replaced by - * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)} + * {@link #addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)} **/ @Override @Deprecated @@ -1115,7 +1115,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent @Override public void removeValueChangeListener( Property.ValueChangeListener listener) { - removeListener(LegacyAbstractField.ValueChangeEvent.class, listener, + removeListener(AbstractField.ValueChangeEvent.class, listener, VALUE_CHANGE_METHOD); // ensure "automatic immediate handling" works markAsDirty(); @@ -1123,7 +1123,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent /** * @deprecated As of 7.0, replaced by - * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)} + * {@link #removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)} **/ @Override @Deprecated @@ -1136,7 +1136,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * validated before the event is created. */ protected void fireValueChange(boolean repaintIsNotNeeded) { - fireEvent(new LegacyAbstractField.ValueChangeEvent(this)); + fireEvent(new AbstractField.ValueChangeEvent(this)); if (!repaintIsNotNeeded) { markAsDirty(); } @@ -1194,7 +1194,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * @param source * the Source of the event. */ - public ReadOnlyStatusChangeEvent(LegacyAbstractField source) { + public ReadOnlyStatusChangeEvent(AbstractField source) { super(source); } @@ -1223,7 +1223,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent /** * @deprecated As of 7.0, replaced by - * {@link #addReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)} + * {@link #addReadOnlyStatusChangeListener(com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener)} **/ @Override @Deprecated @@ -1245,7 +1245,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent /** * @deprecated As of 7.0, replaced by - * {@link #removeReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)} + * {@link #removeReadOnlyStatusChangeListener(com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener)} **/ @Override @Deprecated @@ -1258,7 +1258,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * is validated before the event is created. */ protected void fireReadOnlyStatusChange() { - fireEvent(new LegacyAbstractField.ReadOnlyStatusChangeEvent(this)); + fireEvent(new AbstractField.ReadOnlyStatusChangeEvent(this)); } /** @@ -1584,7 +1584,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent /** * A ready-made {@link ShortcutListener} that focuses the given - * {@link Focusable} (usually a {@link LegacyField}) when the keyboard + * {@link Focusable} (usually a {@link Field}) when the keyboard * shortcut is invoked. * */ @@ -1685,7 +1685,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * * @return The converter or null if none is set. */ - public LegacyConverter<T, Object> getConverter() { + public Converter<T, Object> getConverter() { return converter; } @@ -1697,8 +1697,8 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent * @param converter * The new converter to use. */ - public void setConverter(LegacyConverter<T, ?> converter) { - this.converter = (LegacyConverter<T, Object>) converter; + public void setConverter(Converter<T, ?> converter) { + this.converter = (Converter<T, Object>) converter; markAsDirty(); } @@ -1796,7 +1796,7 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent @Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); - LegacyAbstractField def = (LegacyAbstractField) designContext + AbstractField def = (AbstractField) designContext .getDefaultInstance(this); Attributes attr = design.attributes(); // handle readonly @@ -1805,6 +1805,6 @@ public abstract class LegacyAbstractField<T> extends AbstractComponent } private static final Logger getLogger() { - return Logger.getLogger(LegacyAbstractField.class.getName()); + return Logger.getLogger(AbstractField.class.getName()); } } diff --git a/server/src/main/java/com/vaadin/v7/ui/LegacyAbstractTextField.java b/server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java index 31f794f8c9..3f2e62afff 100644 --- a/server/src/main/java/com/vaadin/v7/ui/LegacyAbstractTextField.java +++ b/server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java @@ -40,8 +40,8 @@ import com.vaadin.ui.declarative.DesignAttributeHandler; import com.vaadin.ui.declarative.DesignContext; @Deprecated -public abstract class LegacyAbstractTextField - extends LegacyAbstractField<String> implements BlurNotifier, +public abstract class AbstractTextField + extends AbstractField<String> implements BlurNotifier, FocusNotifier, TextChangeNotifier, LegacyComponent { /** @@ -95,7 +95,7 @@ public abstract class LegacyAbstractTextField */ private boolean changingVariables; - protected LegacyAbstractTextField() { + protected AbstractTextField() { super(); } @@ -250,7 +250,7 @@ public abstract class LegacyAbstractTextField * </p> * * @return the String Textual representation for null strings. - * @see LegacyTextField#isNullSettingAllowed() + * @see TextField#isNullSettingAllowed() */ public String getNullRepresentation() { return nullRepresentation; @@ -274,7 +274,7 @@ public abstract class LegacyAbstractTextField * * @return boolean Should the null-string represenation be always converted * to null-values. - * @see LegacyTextField#getNullRepresentation() + * @see TextField#getNullRepresentation() */ public boolean isNullSettingAllowed() { return nullSettingAllowed; @@ -295,7 +295,7 @@ public abstract class LegacyAbstractTextField * * @param nullRepresentation * Textual representation for null strings. - * @see LegacyTextField#setNullSettingAllowed(boolean) + * @see TextField#setNullSettingAllowed(boolean) */ public void setNullRepresentation(String nullRepresentation) { this.nullRepresentation = nullRepresentation; @@ -321,7 +321,7 @@ public abstract class LegacyAbstractTextField * @param nullSettingAllowed * Should the null-string representation always be converted to * null-values. - * @see LegacyTextField#getNullRepresentation() + * @see TextField#getNullRepresentation() */ public void setNullSettingAllowed(boolean nullSettingAllowed) { this.nullSettingAllowed = nullSettingAllowed; @@ -601,15 +601,15 @@ public abstract class LegacyAbstractTextField private String curText; private int cursorPosition; - private TextChangeEventImpl(final LegacyAbstractTextField tf) { + private TextChangeEventImpl(final AbstractTextField tf) { super(tf); curText = tf.getCurrentTextContent(); cursorPosition = tf.getCursorPosition(); } @Override - public LegacyAbstractTextField getComponent() { - return (LegacyAbstractTextField) super.getComponent(); + public AbstractTextField getComponent() { + return (AbstractTextField) super.getComponent(); } @Override @@ -804,7 +804,7 @@ public abstract class LegacyAbstractTextField @Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); - LegacyAbstractTextField def = (LegacyAbstractTextField) designContext + AbstractTextField def = (AbstractTextField) designContext .getDefaultInstance(this); Attributes attr = design.attributes(); DesignAttributeHandler.writeAttribute("maxlength", attr, getMaxLength(), diff --git a/server/src/main/java/com/vaadin/v7/ui/LegacyCheckBox.java b/server/src/main/java/com/vaadin/v7/ui/CheckBox.java index 4696e104a3..84488bc875 100644 --- a/server/src/main/java/com/vaadin/v7/ui/LegacyCheckBox.java +++ b/server/src/main/java/com/vaadin/v7/ui/CheckBox.java @@ -21,7 +21,6 @@ import java.util.Collection; import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Element; -import com.vaadin.data.Property; import com.vaadin.event.FieldEvents.BlurEvent; import com.vaadin.event.FieldEvents.BlurListener; import com.vaadin.event.FieldEvents.FocusAndBlurServerRpcImpl; @@ -32,8 +31,9 @@ import com.vaadin.shared.ui.checkbox.CheckBoxServerRpc; import com.vaadin.shared.ui.checkbox.CheckBoxState; import com.vaadin.ui.declarative.DesignAttributeHandler; import com.vaadin.ui.declarative.DesignContext; +import com.vaadin.v7.data.Property; -public class LegacyCheckBox extends LegacyAbstractField<Boolean> { +public class CheckBox extends AbstractField<Boolean> { private CheckBoxServerRpc rpc = new CheckBoxServerRpc() { @@ -52,7 +52,7 @@ public class LegacyCheckBox extends LegacyAbstractField<Boolean> { * * See #11028, #10030. */ - getUI().getConnectorTracker().getDiffState(LegacyCheckBox.this) + getUI().getConnectorTracker().getDiffState(CheckBox.this) .put("checked", checked); final Boolean oldValue = getValue(); @@ -70,14 +70,14 @@ public class LegacyCheckBox extends LegacyAbstractField<Boolean> { this) { @Override protected void fireEvent(Event event) { - LegacyCheckBox.this.fireEvent(event); + CheckBox.this.fireEvent(event); } }; /** * Creates a new checkbox. */ - public LegacyCheckBox() { + public CheckBox() { registerRpc(rpc); registerRpc(focusBlurRpc); setValue(Boolean.FALSE); @@ -89,7 +89,7 @@ public class LegacyCheckBox extends LegacyAbstractField<Boolean> { * @param caption * the Checkbox caption. */ - public LegacyCheckBox(String caption) { + public CheckBox(String caption) { this(); setCaption(caption); } @@ -102,7 +102,7 @@ public class LegacyCheckBox extends LegacyAbstractField<Boolean> { * @param initialState * the initial state of the checkbox */ - public LegacyCheckBox(String caption, boolean initialState) { + public CheckBox(String caption, boolean initialState) { this(caption); setValue(initialState); } @@ -114,7 +114,7 @@ public class LegacyCheckBox extends LegacyAbstractField<Boolean> { * the Initial state of the switch-button. * @param dataSource */ - public LegacyCheckBox(String caption, Property<?> dataSource) { + public CheckBox(String caption, Property<?> dataSource) { this(caption); setPropertyDataSource(dataSource); } @@ -248,7 +248,7 @@ public class LegacyCheckBox extends LegacyAbstractField<Boolean> { @Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); - LegacyCheckBox def = (LegacyCheckBox) designContext + CheckBox def = (CheckBox) designContext .getDefaultInstance(this); Attributes attr = design.attributes(); DesignAttributeHandler.writeAttribute("checked", attr, getValue(), diff --git a/server/src/main/java/com/vaadin/legacy/ui/LegacyCustomField.java b/server/src/main/java/com/vaadin/v7/ui/CustomField.java index 4ef634e69b..f55b3307a3 100644 --- a/server/src/main/java/com/vaadin/legacy/ui/LegacyCustomField.java +++ b/server/src/main/java/com/vaadin/v7/ui/CustomField.java @@ -14,22 +14,19 @@ * the License. */ -package com.vaadin.legacy.ui; +package com.vaadin.v7.ui; import java.io.Serializable; import java.util.Iterator; -import com.vaadin.data.Property; import com.vaadin.ui.Component; import com.vaadin.ui.HasComponents; -import com.vaadin.v7.ui.LegacyAbstractField; -import com.vaadin.v7.ui.LegacyField; +import com.vaadin.v7.data.Property; /** - * A {@link LegacyField} whose UI content can be constructed by the user, - * enabling the creation of e.g. form fields by composing Vaadin components. - * Customization of both the visual presentation and the logic of the field is - * possible. + * A {@link Field} whose UI content can be constructed by the user, enabling the + * creation of e.g. form fields by composing Vaadin components. Customization of + * both the visual presentation and the logic of the field is possible. * * Subclasses must implement {@link #getType()} and {@link #initContent()}. * @@ -48,7 +45,7 @@ import com.vaadin.v7.ui.LegacyField; * * @since 7.0 */ -public abstract class LegacyCustomField<T> extends LegacyAbstractField<T> +public abstract class CustomField<T> extends AbstractField<T> implements HasComponents { /** @@ -65,14 +62,14 @@ public abstract class LegacyCustomField<T> extends LegacyAbstractField<T> * before the component can be used. * </p> */ - public LegacyCustomField() { + public CustomField() { // expand horizontally by default setWidth(100, Unit.PERCENTAGE); } /** - * Constructs the content and notifies it that the {@link LegacyCustomField} - * is attached to a window. + * Constructs the content and notifies it that the {@link CustomField} is + * attached to a window. * * @see com.vaadin.ui.Component#attach() */ @@ -102,11 +99,11 @@ public abstract class LegacyCustomField<T> extends LegacyAbstractField<T> /** * Create the content component or layout for the field. Subclasses of - * {@link LegacyCustomField} should implement this method. + * {@link CustomField} should implement this method. * * Note that this method is called when the CustomField is attached to a * layout or when {@link #getContent()} is called explicitly for the first - * time. It is only called once for a {@link LegacyCustomField}. + * time. It is only called once for a {@link CustomField}. * * @return {@link Component} representing the UI of the CustomField */ diff --git a/server/src/main/java/com/vaadin/v7/ui/LegacyField.java b/server/src/main/java/com/vaadin/v7/ui/Field.java index 79b4a6f3fc..0756dfaf90 100644 --- a/server/src/main/java/com/vaadin/v7/ui/LegacyField.java +++ b/server/src/main/java/com/vaadin/v7/ui/Field.java @@ -16,19 +16,19 @@ package com.vaadin.v7.ui; -import com.vaadin.data.BufferedValidatable; import com.vaadin.data.HasRequired; import com.vaadin.data.HasValue.ValueChange; -import com.vaadin.data.Property; import com.vaadin.ui.Component; import com.vaadin.ui.Component.Focusable; +import com.vaadin.v7.data.BufferedValidatable; +import com.vaadin.v7.data.Property; /** * LegacyField interface is implemented by all legacy field components that have * a value that the user can change through the user interface. * * LegacyField components are built upon the framework defined in the - * LegacyField interface and the {@link com.vaadin.LegacyAbstractField} base + * LegacyField interface and the {@link com.vaadin.AbstractField} base * class. * * The LegacyField interface inherits the {@link com.vaadin.ui.Component} @@ -47,7 +47,7 @@ import com.vaadin.ui.Component.Focusable; * extend {@link com.vaadin.ui.AbstractField} instead. */ @Deprecated -public interface LegacyField<T> extends Component, BufferedValidatable, +public interface Field<T> extends Component, BufferedValidatable, Property<T>, Property.ValueChangeNotifier, Property.ValueChangeListener, Property.Editor, Focusable, HasRequired { /** @@ -110,7 +110,7 @@ public interface LegacyField<T> extends Component, BufferedValidatable, * @param source * the field that caused the event. */ - public ValueChangeEvent(LegacyField source) { + public ValueChangeEvent(Field source) { super(source); } diff --git a/server/src/main/java/com/vaadin/ui/LegacyWindow.java b/server/src/main/java/com/vaadin/v7/ui/LegacyWindow.java index a6771da379..c313dcb627 100644 --- a/server/src/main/java/com/vaadin/ui/LegacyWindow.java +++ b/server/src/main/java/com/vaadin/v7/ui/LegacyWindow.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.ui; +package com.vaadin.v7.ui; import java.net.MalformedURLException; import java.net.URL; @@ -24,6 +24,11 @@ import com.vaadin.server.Page.BrowserWindowResizeListener; import com.vaadin.server.Resource; import com.vaadin.server.VaadinRequest; import com.vaadin.shared.ui.BorderStyle; +import com.vaadin.ui.Component; +import com.vaadin.ui.ComponentContainer; +import com.vaadin.ui.Link; +import com.vaadin.ui.UI; +import com.vaadin.ui.VerticalLayout; /** * Helper class to emulate the main window from Vaadin 6 using UIs. This class diff --git a/server/src/main/java/com/vaadin/v7/ui/LegacyPasswordField.java b/server/src/main/java/com/vaadin/v7/ui/PasswordField.java index 35916959c8..787e024cc6 100644 --- a/server/src/main/java/com/vaadin/v7/ui/LegacyPasswordField.java +++ b/server/src/main/java/com/vaadin/v7/ui/PasswordField.java @@ -18,21 +18,21 @@ package com.vaadin.v7.ui; import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Element; -import com.vaadin.data.Property; import com.vaadin.ui.declarative.DesignAttributeHandler; import com.vaadin.ui.declarative.DesignContext; +import com.vaadin.v7.data.Property; /** * A field that is used to enter secret text information like passwords. The * entered text is not displayed on the screen. */ @Deprecated -public class LegacyPasswordField extends LegacyAbstractTextField { +public class PasswordField extends AbstractTextField { /** * Constructs an empty PasswordField. */ - public LegacyPasswordField() { + public PasswordField() { setValue(""); } @@ -42,7 +42,7 @@ public class LegacyPasswordField extends LegacyAbstractTextField { * @param dataSource * the property data source for the field */ - public LegacyPasswordField(Property dataSource) { + public PasswordField(Property dataSource) { setPropertyDataSource(dataSource); } @@ -54,7 +54,7 @@ public class LegacyPasswordField extends LegacyAbstractTextField { * @param dataSource * the property data source for the field */ - public LegacyPasswordField(String caption, Property dataSource) { + public PasswordField(String caption, Property dataSource) { this(dataSource); setCaption(caption); } @@ -67,7 +67,7 @@ public class LegacyPasswordField extends LegacyAbstractTextField { * @param value * the value for the field */ - public LegacyPasswordField(String caption, String value) { + public PasswordField(String caption, String value) { setValue(value); setCaption(caption); } @@ -78,7 +78,7 @@ public class LegacyPasswordField extends LegacyAbstractTextField { * @param caption * the caption for the field */ - public LegacyPasswordField(String caption) { + public PasswordField(String caption) { this(); setCaption(caption); } @@ -108,7 +108,7 @@ public class LegacyPasswordField extends LegacyAbstractTextField { @Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); - LegacyAbstractTextField def = (LegacyAbstractTextField) designContext + AbstractTextField def = (AbstractTextField) designContext .getDefaultInstance(this); Attributes attr = design.attributes(); DesignAttributeHandler.writeAttribute("value", attr, getValue(), diff --git a/server/src/main/java/com/vaadin/v7/ui/LegacyTextField.java b/server/src/main/java/com/vaadin/v7/ui/TextField.java index 49da438660..0bd9511a71 100644 --- a/server/src/main/java/com/vaadin/v7/ui/LegacyTextField.java +++ b/server/src/main/java/com/vaadin/v7/ui/TextField.java @@ -19,9 +19,9 @@ package com.vaadin.v7.ui; import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Element; -import com.vaadin.data.Property; import com.vaadin.ui.declarative.DesignAttributeHandler; import com.vaadin.ui.declarative.DesignContext; +import com.vaadin.v7.data.Property; /** * <p> @@ -32,9 +32,9 @@ import com.vaadin.ui.declarative.DesignContext; * * <p> * Since <code>TextField</code> extends <code>LegacyAbstractField</code> it - * implements the {@link com.vaadin.data.Buffered} interface. A + * implements the {@link com.vaadin.v7.data.Buffered} interface. A * <code>TextField</code> is in write-through mode by default, so - * {@link com.vaadin.v7.ui.LegacyAbstractField#setWriteThrough(boolean)} + * {@link com.vaadin.v7.ui.AbstractField#setWriteThrough(boolean)} * must be called to enable buffering. * </p> * @@ -43,12 +43,12 @@ import com.vaadin.ui.declarative.DesignContext; */ @SuppressWarnings("serial") @Deprecated -public class LegacyTextField extends LegacyAbstractTextField { +public class TextField extends AbstractTextField { /** * Constructs an empty <code>TextField</code> with no caption. */ - public LegacyTextField() { + public TextField() { clear(); } @@ -58,7 +58,7 @@ public class LegacyTextField extends LegacyAbstractTextField { * @param caption * the caption <code>String</code> for the editor. */ - public LegacyTextField(String caption) { + public TextField(String caption) { this(); setCaption(caption); } @@ -70,7 +70,7 @@ public class LegacyTextField extends LegacyAbstractTextField { * @param dataSource * the Property to be edited with this editor. */ - public LegacyTextField(Property dataSource) { + public TextField(Property dataSource) { setPropertyDataSource(dataSource); } @@ -83,7 +83,7 @@ public class LegacyTextField extends LegacyAbstractTextField { * @param dataSource * the Property to be edited with this editor. */ - public LegacyTextField(String caption, Property dataSource) { + public TextField(String caption, Property dataSource) { this(dataSource); setCaption(caption); } @@ -92,7 +92,7 @@ public class LegacyTextField extends LegacyAbstractTextField { * Constructs a new <code>TextField</code> with the given caption and * initial text contents. The editor constructed this way will not be bound * to a Property unless - * {@link com.vaadin.data.Property.Viewer#setPropertyDataSource(Property)} + * {@link com.vaadin.v7.data.Property.Viewer#setPropertyDataSource(Property)} * is called to bind it. * * @param caption @@ -100,7 +100,7 @@ public class LegacyTextField extends LegacyAbstractTextField { * @param value * the initial text content of the editor. */ - public LegacyTextField(String caption, String value) { + public TextField(String caption, String value) { setValue(value); setCaption(caption); } @@ -131,7 +131,7 @@ public class LegacyTextField extends LegacyAbstractTextField { @Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); - LegacyAbstractTextField def = (LegacyAbstractTextField) designContext + AbstractTextField def = (AbstractTextField) designContext .getDefaultInstance(this); Attributes attr = design.attributes(); DesignAttributeHandler.writeAttribute("value", attr, getValue(), diff --git a/server/src/test/java/com/vaadin/tests/VaadinClasses.java b/server/src/test/java/com/vaadin/tests/VaadinClasses.java index e5397c8b47..ad1119a8ad 100644 --- a/server/src/test/java/com/vaadin/tests/VaadinClasses.java +++ b/server/src/test/java/com/vaadin/tests/VaadinClasses.java @@ -29,7 +29,7 @@ import com.vaadin.ui.UI; import com.vaadin.ui.VerticalSplitPanel; import com.vaadin.ui.Window; import com.vaadin.ui.themes.BaseTheme; -import com.vaadin.v7.ui.LegacyField; +import com.vaadin.v7.ui.Field; @SuppressWarnings("deprecation") public class VaadinClasses { @@ -63,9 +63,9 @@ public class VaadinClasses { } } - public static List<Class<? extends LegacyField>> getFields() { + public static List<Class<? extends Field>> getFields() { try { - return findClasses(LegacyField.class, "com.vaadin.ui"); + return findClasses(Field.class, "com.vaadin.ui"); } catch (IOException e) { e.printStackTrace(); return null; diff --git a/server/src/test/java/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java index e727687228..7b5773b070 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/AnyEnumToStringConverterTest.java @@ -22,17 +22,17 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import com.vaadin.data.util.ObjectProperty; import com.vaadin.tests.data.bean.AnotherTestEnum; import com.vaadin.tests.data.bean.TestEnum; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyReverseConverter; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.util.ObjectProperty; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.ReverseConverter; +import com.vaadin.v7.ui.TextField; public class AnyEnumToStringConverterTest { public class AnyEnumToStringConverter - implements LegacyConverter<Enum, String> { + implements Converter<Enum, String> { public AnyEnumToStringConverter() { } @@ -40,7 +40,7 @@ public class AnyEnumToStringConverterTest { @Override public String convertToModel(Enum value, Class<? extends String> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { if (value == null) { return null; } @@ -51,7 +51,7 @@ public class AnyEnumToStringConverterTest { @Override public Enum convertToPresentation(String value, Class<? extends Enum> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { if (value == null) { return null; } @@ -107,8 +107,8 @@ public class AnyEnumToStringConverterTest { @Test public void stringToEnumWithField() { - LegacyTextField tf = new LegacyTextField(); - tf.setConverter(new LegacyReverseConverter(converter)); + TextField tf = new TextField(); + tf.setConverter(new ReverseConverter(converter)); tf.setPropertyDataSource(new ObjectProperty(AnotherTestEnum.TWO)); Assert.assertEquals(AnotherTestEnum.TWO.toString(), tf.getValue()); tf.setValue(AnotherTestEnum.ONE.toString()); diff --git a/server/src/test/java/com/vaadin/tests/data/converter/ConverterFactoryTest.java b/server/src/test/java/com/vaadin/tests/data/converter/ConverterFactoryTest.java index 41886edc62..be3bf0db97 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/ConverterFactoryTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/ConverterFactoryTest.java @@ -22,26 +22,26 @@ import org.junit.Test; import com.vaadin.server.VaadinSession; import com.vaadin.tests.util.AlwaysLockedVaadinSession; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyDefaultConverterFactory; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.DefaultConverterFactory; +import com.vaadin.v7.ui.TextField; public class ConverterFactoryTest { public static class ConvertTo42 - implements LegacyConverter<String, Integer> { + implements Converter<String, Integer> { @Override public Integer convertToModel(String value, Class<? extends Integer> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { return 42; } @Override public String convertToPresentation(Integer value, Class<? extends String> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { return "42"; } @@ -58,12 +58,12 @@ public class ConverterFactoryTest { } public static class ConverterFactory42 - extends LegacyDefaultConverterFactory { + extends DefaultConverterFactory { @Override - public <PRESENTATION, MODEL> LegacyConverter<PRESENTATION, MODEL> createConverter( + public <PRESENTATION, MODEL> Converter<PRESENTATION, MODEL> createConverter( Class<PRESENTATION> presentationType, Class<MODEL> modelType) { if (modelType == Integer.class) { - return (LegacyConverter<PRESENTATION, MODEL>) new ConvertTo42(); + return (Converter<PRESENTATION, MODEL>) new ConvertTo42(); } return super.createConverter(presentationType, modelType); @@ -78,7 +78,7 @@ public class ConverterFactoryTest { appWithCustomIntegerConverter .setConverterFactory(new ConverterFactory42()); - LegacyTextField tf = new LegacyTextField("", "123") { + TextField tf = new TextField("", "123") { @Override public VaadinSession getSession() { return appWithCustomIntegerConverter; @@ -98,7 +98,7 @@ public class ConverterFactoryTest { .setConverterFactory(new ConverterFactory42()); VaadinSession.setCurrent(appWithCustomIntegerConverter); - LegacyTextField tf = new LegacyTextField("", "123"); + TextField tf = new TextField("", "123"); tf.setConverter(Integer.class); // The application converter always returns 42. Current application is // null @@ -113,7 +113,7 @@ public class ConverterFactoryTest { .setConverterFactory(new ConverterFactory42()); VaadinSession.setCurrent(new AlwaysLockedVaadinSession(null)); - LegacyTextField tf = new LegacyTextField("", "123") { + TextField tf = new TextField("", "123") { @Override public VaadinSession getSession() { return fieldAppWithCustomIntegerConverter; diff --git a/server/src/test/java/com/vaadin/tests/data/converter/DateToLongConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/DateToLongConverterTest.java index ff64465282..e8932b9600 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/DateToLongConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/DateToLongConverterTest.java @@ -5,11 +5,11 @@ import java.util.Date; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyDateToLongConverter; +import com.vaadin.v7.data.util.converter.DateToLongConverter; public class DateToLongConverterTest { - LegacyDateToLongConverter converter = new LegacyDateToLongConverter(); + DateToLongConverter converter = new DateToLongConverter(); @Test public void testNullConversion() { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/DateToSqlDateConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/DateToSqlDateConverterTest.java index 87b2ab6e85..607d71b70e 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/DateToSqlDateConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/DateToSqlDateConverterTest.java @@ -6,11 +6,11 @@ import java.util.Locale; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyDateToSqlDateConverter; +import com.vaadin.v7.data.util.converter.DateToSqlDateConverter; public class DateToSqlDateConverterTest { - LegacyDateToSqlDateConverter converter = new LegacyDateToSqlDateConverter(); + DateToSqlDateConverter converter = new DateToSqlDateConverter(); @Test public void testNullConversion() { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java b/server/src/test/java/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java index f5e8213e80..518ca1936f 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/DefaultConverterFactoryTest.java @@ -23,11 +23,11 @@ import java.util.Locale; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyDefaultConverterFactory; +import com.vaadin.v7.data.util.converter.DefaultConverterFactory; public class DefaultConverterFactoryTest { - private LegacyDefaultConverterFactory factory = new LegacyDefaultConverterFactory(); + private DefaultConverterFactory factory = new DefaultConverterFactory(); @Test public void stringToBigDecimal() { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java index 87080e1151..627ab7943d 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/SpecificEnumToStringConverterTest.java @@ -22,17 +22,17 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import com.vaadin.data.util.ObjectProperty; import com.vaadin.tests.data.bean.AnotherTestEnum; import com.vaadin.tests.data.bean.TestEnum; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyReverseConverter; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.util.ObjectProperty; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.ReverseConverter; +import com.vaadin.v7.ui.TextField; public class SpecificEnumToStringConverterTest { public class SpecificEnumToStringConverter - implements LegacyConverter<Enum, String> { + implements Converter<Enum, String> { private Class<? extends Enum> enumClass; @@ -43,7 +43,7 @@ public class SpecificEnumToStringConverterTest { @Override public String convertToModel(Enum value, Class<? extends String> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { if (value == null) { return null; } @@ -54,7 +54,7 @@ public class SpecificEnumToStringConverterTest { @Override public Enum convertToPresentation(String value, Class<? extends Enum> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException { + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { if (value == null) { return null; } @@ -111,8 +111,8 @@ public class SpecificEnumToStringConverterTest { @Test public void stringToEnumWithField() { - LegacyTextField tf = new LegacyTextField(); - tf.setConverter(new LegacyReverseConverter(anotherTestEnumConverter)); + TextField tf = new TextField(); + tf.setConverter(new ReverseConverter(anotherTestEnumConverter)); tf.setPropertyDataSource(new ObjectProperty(AnotherTestEnum.TWO)); Assert.assertEquals(AnotherTestEnum.TWO.toString(), tf.getValue()); tf.setValue(AnotherTestEnum.ONE.toString()); diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java index 9fdd6f01b4..ff57849bf8 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToBigDecimalConverterTest.java @@ -21,11 +21,11 @@ import java.util.Locale; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyStringToBigDecimalConverter; +import com.vaadin.v7.data.util.converter.StringToBigDecimalConverter; public class StringToBigDecimalConverterTest { - LegacyStringToBigDecimalConverter converter = new LegacyStringToBigDecimalConverter(); + StringToBigDecimalConverter converter = new StringToBigDecimalConverter(); @Test public void testNullConversion() { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java index e40abf162a..db0edfce71 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToBigIntegerConverterTest.java @@ -21,11 +21,11 @@ import java.util.Locale; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyStringToBigIntegerConverter; +import com.vaadin.v7.data.util.converter.StringToBigIntegerConverter; public class StringToBigIntegerConverterTest { - LegacyStringToBigIntegerConverter converter = new LegacyStringToBigIntegerConverter(); + StringToBigIntegerConverter converter = new StringToBigIntegerConverter(); @Test public void testNullConversion() { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java index 1225b59f23..9889036f7d 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToBooleanConverterTest.java @@ -7,14 +7,14 @@ import java.util.Locale; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyStringToBooleanConverter; +import com.vaadin.v7.data.util.converter.StringToBooleanConverter; public class StringToBooleanConverterTest { - LegacyStringToBooleanConverter converter = new LegacyStringToBooleanConverter(); - LegacyStringToBooleanConverter yesNoConverter = new LegacyStringToBooleanConverter( + StringToBooleanConverter converter = new StringToBooleanConverter(); + StringToBooleanConverter yesNoConverter = new StringToBooleanConverter( "yes", "no"); - LegacyStringToBooleanConverter localeConverter = new LegacyStringToBooleanConverter() { + StringToBooleanConverter localeConverter = new StringToBooleanConverter() { @Override public String getFalseString(Locale locale) { Date d = new Date(3000000000000L); diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToByteConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToByteConverterTest.java index dcbab5de06..a28d16797f 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToByteConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToByteConverterTest.java @@ -3,15 +3,15 @@ package com.vaadin.tests.data.converter; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException; -import com.vaadin.v7.data.util.converter.LegacyReverseConverter; -import com.vaadin.v7.data.util.converter.LegacyStringToByteConverter; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.Converter.ConversionException; +import com.vaadin.v7.data.util.converter.ReverseConverter; +import com.vaadin.v7.data.util.converter.StringToByteConverter; public class StringToByteConverterTest { - LegacyStringToByteConverter converter = new LegacyStringToByteConverter(); - LegacyConverter<Byte, String> reverseConverter = new LegacyReverseConverter<Byte, String>( + StringToByteConverter converter = new StringToByteConverter(); + Converter<Byte, String> reverseConverter = new ReverseConverter<Byte, String>( converter); @Test diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java index 3befeaffdf..d21f6c5803 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToCollectionConverterTest.java @@ -29,13 +29,13 @@ import java.util.Vector; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyStringToCollectionConverter; -import com.vaadin.v7.data.util.converter.LegacyStringToCollectionConverter.CollectionFactory; -import com.vaadin.v7.data.util.converter.LegacyStringToEnumConverter; -import com.vaadin.v7.data.util.converter.LegacyStringToIntegerConverter; +import com.vaadin.v7.data.util.converter.StringToCollectionConverter; +import com.vaadin.v7.data.util.converter.StringToCollectionConverter.CollectionFactory; +import com.vaadin.v7.data.util.converter.StringToEnumConverter; +import com.vaadin.v7.data.util.converter.StringToIntegerConverter; /** - * Tests for {@link LegacyStringToCollectionConverter}. + * Tests for {@link StringToCollectionConverter}. * * @author Vaadin Ltd */ @@ -43,7 +43,7 @@ public class StringToCollectionConverterTest { @Test public void convertToModel_defaultCtor() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter(); + StringToCollectionConverter converter = new StringToCollectionConverter(); Collection<?> model = converter.convertToModel("a, b, c", List.class, null); Assert.assertTrue("Unexpected model class", model instanceof ArrayList); @@ -55,7 +55,7 @@ public class StringToCollectionConverterTest { @Test public void convertToModel_customDelimiter() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter( + StringToCollectionConverter converter = new StringToCollectionConverter( "x"); Collection<?> model = converter.convertToModel("axbxc", List.class, null); @@ -68,8 +68,8 @@ public class StringToCollectionConverterTest { @Test public void convertToModel_customConverter() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter( - ",", new LegacyStringToIntegerConverter(), Integer.class); + StringToCollectionConverter converter = new StringToCollectionConverter( + ",", new StringToIntegerConverter(), Integer.class); Collection<?> model = converter.convertToModel("6,2,5", List.class, null); Assert.assertTrue("Unexpected model class", model instanceof ArrayList); @@ -81,8 +81,8 @@ public class StringToCollectionConverterTest { @Test public void convertToModel_setAsCollection() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter( - " ", new LegacyStringToEnumConverter(), TestEnum.class); + StringToCollectionConverter converter = new StringToCollectionConverter( + " ", new StringToEnumConverter(), TestEnum.class); Collection<?> model = converter.convertToModel("Z X Y", Set.class, null); Assert.assertTrue("Unexpected model class", model instanceof HashSet); @@ -102,7 +102,7 @@ public class StringToCollectionConverterTest { return new Vector(); } }; - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter( + StringToCollectionConverter converter = new StringToCollectionConverter( ", ", null, String.class, factory); Collection<?> model = converter.convertToModel("a, b, c", Collection.class, null); @@ -115,7 +115,7 @@ public class StringToCollectionConverterTest { @Test public void convertToPresentation_default() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter(); + StringToCollectionConverter converter = new StringToCollectionConverter(); String presentation = converter.convertToPresentation( Arrays.asList("a", "b", "c"), String.class, null); @@ -124,7 +124,7 @@ public class StringToCollectionConverterTest { @Test public void convertToPresentation_customDelimiter() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter( + StringToCollectionConverter converter = new StringToCollectionConverter( "x"); String presentation = converter.convertToPresentation( Arrays.asList("a", "b", "c"), String.class, null); @@ -134,8 +134,8 @@ public class StringToCollectionConverterTest { @Test public void convertToPresentation_customConverter() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter( - ",", new LegacyStringToEnumConverter(), TestEnum.class); + StringToCollectionConverter converter = new StringToCollectionConverter( + ",", new StringToEnumConverter(), TestEnum.class); String presentation = converter.convertToPresentation( Arrays.asList(TestEnum.Z, TestEnum.Y), String.class, null); @@ -144,7 +144,7 @@ public class StringToCollectionConverterTest { @Test public void convertToModel_singleItem() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter(); + StringToCollectionConverter converter = new StringToCollectionConverter(); Collection<?> model = converter.convertToModel("a", List.class, null); Iterator<?> iterator = model.iterator(); Assert.assertEquals("Incorrect fist token", "a", iterator.next()); @@ -154,14 +154,14 @@ public class StringToCollectionConverterTest { @Test public void convertToModel_null() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter(); + StringToCollectionConverter converter = new StringToCollectionConverter(); Assert.assertNull(converter.convertToModel(null, ArrayList.class, Locale.ENGLISH)); } @Test public void convertToPresentation_null() { - LegacyStringToCollectionConverter converter = new LegacyStringToCollectionConverter(); + StringToCollectionConverter converter = new StringToCollectionConverter(); Assert.assertNull(converter.convertToPresentation(null, String.class, Locale.ENGLISH)); } diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToDateConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToDateConverterTest.java index 3a5fbde5e7..b6f8214f36 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToDateConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToDateConverterTest.java @@ -6,11 +6,11 @@ import java.util.Locale; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyStringToDateConverter; +import com.vaadin.v7.data.util.converter.StringToDateConverter; public class StringToDateConverterTest { - LegacyStringToDateConverter converter = new LegacyStringToDateConverter(); + StringToDateConverter converter = new StringToDateConverter(); @Test public void testNullConversion() { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToDoubleConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToDoubleConverterTest.java index 427606e942..d3e9831b4b 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToDoubleConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToDoubleConverterTest.java @@ -3,11 +3,11 @@ package com.vaadin.tests.data.converter; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyStringToDoubleConverter; +import com.vaadin.v7.data.util.converter.StringToDoubleConverter; public class StringToDoubleConverterTest { - LegacyStringToDoubleConverter converter = new LegacyStringToDoubleConverter(); + StringToDoubleConverter converter = new StringToDoubleConverter(); @Test public void testNullConversion() { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToEnumConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToEnumConverterTest.java index 270958dd9d..4e7131e956 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToEnumConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToEnumConverterTest.java @@ -3,10 +3,10 @@ package com.vaadin.tests.data.converter; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException; -import com.vaadin.v7.data.util.converter.LegacyReverseConverter; -import com.vaadin.v7.data.util.converter.LegacyStringToEnumConverter; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.Converter.ConversionException; +import com.vaadin.v7.data.util.converter.ReverseConverter; +import com.vaadin.v7.data.util.converter.StringToEnumConverter; public class StringToEnumConverterTest { @@ -32,8 +32,8 @@ public class StringToEnumConverterTest { } } - LegacyStringToEnumConverter converter = new LegacyStringToEnumConverter(); - LegacyConverter<Enum, String> reverseConverter = new LegacyReverseConverter<Enum, String>( + StringToEnumConverter converter = new StringToEnumConverter(); + Converter<Enum, String> reverseConverter = new ReverseConverter<Enum, String>( converter); private String convertToString(Enum value) { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToFloatConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToFloatConverterTest.java index fee3612a88..e6768e30d9 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToFloatConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToFloatConverterTest.java @@ -3,11 +3,11 @@ package com.vaadin.tests.data.converter; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyStringToFloatConverter; +import com.vaadin.v7.data.util.converter.StringToFloatConverter; public class StringToFloatConverterTest { - LegacyStringToFloatConverter converter = new LegacyStringToFloatConverter(); + StringToFloatConverter converter = new StringToFloatConverter(); @Test public void testNullConversion() { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java index c1955d87f8..3d1f6985d2 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToIntegerConverterTest.java @@ -3,12 +3,12 @@ package com.vaadin.tests.data.converter; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException; -import com.vaadin.v7.data.util.converter.LegacyStringToIntegerConverter; +import com.vaadin.v7.data.util.converter.Converter.ConversionException; +import com.vaadin.v7.data.util.converter.StringToIntegerConverter; public class StringToIntegerConverterTest { - LegacyStringToIntegerConverter converter = new LegacyStringToIntegerConverter(); + StringToIntegerConverter converter = new StringToIntegerConverter(); @Test public void testNullConversion() { diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToLongConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToLongConverterTest.java index c1a749326d..77f1167769 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToLongConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToLongConverterTest.java @@ -5,14 +5,14 @@ import java.util.Locale; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyReverseConverter; -import com.vaadin.v7.data.util.converter.LegacyStringToLongConverter; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.ReverseConverter; +import com.vaadin.v7.data.util.converter.StringToLongConverter; public class StringToLongConverterTest { - LegacyStringToLongConverter converter = new LegacyStringToLongConverter(); - LegacyConverter<Long, String> reverseConverter = new LegacyReverseConverter<Long, String>( + StringToLongConverter converter = new StringToLongConverter(); + Converter<Long, String> reverseConverter = new ReverseConverter<Long, String>( converter); @Test diff --git a/server/src/test/java/com/vaadin/tests/data/converter/StringToShortConverterTest.java b/server/src/test/java/com/vaadin/tests/data/converter/StringToShortConverterTest.java index 5c29c39452..ca5c257f80 100644 --- a/server/src/test/java/com/vaadin/tests/data/converter/StringToShortConverterTest.java +++ b/server/src/test/java/com/vaadin/tests/data/converter/StringToShortConverterTest.java @@ -3,15 +3,15 @@ package com.vaadin.tests.data.converter; import org.junit.Assert; import org.junit.Test; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException; -import com.vaadin.v7.data.util.converter.LegacyReverseConverter; -import com.vaadin.v7.data.util.converter.LegacyStringToShortConverter; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.Converter.ConversionException; +import com.vaadin.v7.data.util.converter.ReverseConverter; +import com.vaadin.v7.data.util.converter.StringToShortConverter; public class StringToShortConverterTest { - LegacyStringToShortConverter converter = new LegacyStringToShortConverter(); - LegacyConverter<Short, String> reverseConverter = new LegacyReverseConverter<Short, String>( + StringToShortConverter converter = new StringToShortConverter(); + Converter<Short, String> reverseConverter = new ReverseConverter<Short, String>( converter); @Test diff --git a/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java b/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java index 3f304b6eb2..4c957f7491 100644 --- a/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java +++ b/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java @@ -42,7 +42,7 @@ import com.vaadin.server.ThemeResource; import com.vaadin.shared.ApplicationConstants; import com.vaadin.shared.util.SharedUtil; import com.vaadin.ui.declarative.DesignFormatter; -import com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException; +import com.vaadin.v7.data.util.converter.Converter.ConversionException; /** * Various tests related to formatter. diff --git a/server/src/test/java/com/vaadin/tests/server/AbstractPropertyListenersTest.java b/server/src/test/java/com/vaadin/tests/server/AbstractPropertyListenersTest.java index 232d26d1d6..854f3666ac 100644 --- a/server/src/test/java/com/vaadin/tests/server/AbstractPropertyListenersTest.java +++ b/server/src/test/java/com/vaadin/tests/server/AbstractPropertyListenersTest.java @@ -2,13 +2,13 @@ package com.vaadin.tests.server; import org.junit.Test; -import com.vaadin.data.Property.ReadOnlyStatusChangeEvent; -import com.vaadin.data.Property.ReadOnlyStatusChangeListener; -import com.vaadin.data.Property.ValueChangeEvent; -import com.vaadin.data.Property.ValueChangeListener; -import com.vaadin.data.util.AbstractProperty; -import com.vaadin.data.util.ObjectProperty; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; +import com.vaadin.v7.data.Property.ReadOnlyStatusChangeEvent; +import com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener; +import com.vaadin.v7.data.Property.ValueChangeEvent; +import com.vaadin.v7.data.Property.ValueChangeListener; +import com.vaadin.v7.data.util.AbstractProperty; +import com.vaadin.v7.data.util.ObjectProperty; public class AbstractPropertyListenersTest extends AbstractListenerMethodsTestBase { diff --git a/server/src/test/java/com/vaadin/tests/server/EventRouterTest.java b/server/src/test/java/com/vaadin/tests/server/EventRouterTest.java index 920b2a7915..8c88257da4 100644 --- a/server/src/test/java/com/vaadin/tests/server/EventRouterTest.java +++ b/server/src/test/java/com/vaadin/tests/server/EventRouterTest.java @@ -2,9 +2,9 @@ package com.vaadin.tests.server; import org.junit.Test; -import com.vaadin.data.Property.ValueChangeEvent; -import com.vaadin.data.Property.ValueChangeListener; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.Property.ValueChangeEvent; +import com.vaadin.v7.data.Property.ValueChangeListener; +import com.vaadin.v7.ui.TextField; public class EventRouterTest { @@ -12,7 +12,7 @@ public class EventRouterTest { @Test public void testAddInEventListener() { - final LegacyTextField tf = new LegacyTextField(); + final TextField tf = new TextField(); final ValueChangeListener outer = new ValueChangeListener() { diff --git a/server/src/test/java/com/vaadin/tests/server/ExtensionTest.java b/server/src/test/java/com/vaadin/tests/server/ExtensionTest.java index df50893420..80c2b12fc1 100644 --- a/server/src/test/java/com/vaadin/tests/server/ExtensionTest.java +++ b/server/src/test/java/com/vaadin/tests/server/ExtensionTest.java @@ -20,7 +20,7 @@ import org.junit.Test; import com.vaadin.server.AbstractClientConnector; import com.vaadin.server.AbstractExtension; import com.vaadin.ui.Label; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.ui.TextField; public class ExtensionTest { @@ -33,7 +33,7 @@ public class ExtensionTest { @Test(expected = IllegalArgumentException.class) public void testRemoveExtensionFromWrongConnector() { Label l = new Label(); - LegacyTextField t = new LegacyTextField(); + TextField t = new TextField(); t.removeExtension(new DummyExtension(l)); } diff --git a/server/src/test/java/com/vaadin/tests/server/PropertyFormatterTest.java b/server/src/test/java/com/vaadin/tests/server/PropertyFormatterTest.java index cc67c40dbb..775018642a 100644 --- a/server/src/test/java/com/vaadin/tests/server/PropertyFormatterTest.java +++ b/server/src/test/java/com/vaadin/tests/server/PropertyFormatterTest.java @@ -6,8 +6,8 @@ import java.util.Date; import org.junit.Test; -import com.vaadin.data.util.ObjectProperty; -import com.vaadin.data.util.PropertyFormatter; +import com.vaadin.v7.data.util.ObjectProperty; +import com.vaadin.v7.data.util.PropertyFormatter; @SuppressWarnings("unchecked") public class PropertyFormatterTest { diff --git a/server/src/test/java/com/vaadin/tests/server/PropertysetItemListenersTest.java b/server/src/test/java/com/vaadin/tests/server/PropertysetItemListenersTest.java index ee5f36323e..883130db32 100644 --- a/server/src/test/java/com/vaadin/tests/server/PropertysetItemListenersTest.java +++ b/server/src/test/java/com/vaadin/tests/server/PropertysetItemListenersTest.java @@ -1,9 +1,9 @@ package com.vaadin.tests.server; -import com.vaadin.data.Item.PropertySetChangeEvent; -import com.vaadin.data.Item.PropertySetChangeListener; -import com.vaadin.data.util.PropertysetItem; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; +import com.vaadin.v7.data.Item.PropertySetChangeEvent; +import com.vaadin.v7.data.Item.PropertySetChangeListener; +import com.vaadin.v7.data.util.PropertysetItem; public class PropertysetItemListenersTest extends AbstractListenerMethodsTestBase { diff --git a/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java b/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java index e96f3d36f3..ba2bccfb78 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java @@ -23,13 +23,13 @@ import org.junit.Test; import com.vaadin.tests.VaadinClasses; import com.vaadin.ui.Slider; -import com.vaadin.v7.ui.LegacyField; +import com.vaadin.v7.ui.Field; public class FieldDefaultValuesTest { @Test public void testFieldsHaveDefaultValueAfterClear() throws Exception { - for (LegacyField<?> field : createFields()) { + for (Field<?> field : createFields()) { Object originalValue = field.getValue(); field.clear(); @@ -45,7 +45,7 @@ public class FieldDefaultValuesTest { @Test public void testFieldsAreEmptyAfterClear() throws Exception { - for (LegacyField<?> field : createFields()) { + for (Field<?> field : createFields()) { field.clear(); if (field instanceof Slider) { @@ -63,11 +63,11 @@ public class FieldDefaultValuesTest { } @SuppressWarnings("rawtypes") - private static List<LegacyField<?>> createFields() + private static List<Field<?>> createFields() throws InstantiationException, IllegalAccessException { - List<LegacyField<?>> fieldInstances = new ArrayList<LegacyField<?>>(); + List<Field<?>> fieldInstances = new ArrayList<Field<?>>(); - for (Class<? extends LegacyField> fieldType : VaadinClasses + for (Class<? extends Field> fieldType : VaadinClasses .getFields()) { fieldInstances.add(fieldType.newInstance()); } diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java index 6efd37ff45..478f1bf54e 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValidatorsTest.java @@ -9,11 +9,11 @@ import org.easymock.EasyMock; import org.junit.Test; import com.vaadin.v7.data.Validator; -import com.vaadin.v7.ui.LegacyAbstractField; +import com.vaadin.v7.ui.AbstractField; public class AbsFieldValidatorsTest { - LegacyAbstractField<Object> field = new LegacyAbstractField<Object>() { + AbstractField<Object> field = new AbstractField<Object>() { @Override public Class getType() { return Object.class; diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java index bb4cc33040..c022aed3da 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionErrorTest.java @@ -5,15 +5,15 @@ import static org.junit.Assert.fail; import org.junit.Assert; import org.junit.Test; -import com.vaadin.data.util.MethodProperty; import com.vaadin.tests.data.bean.Address; import com.vaadin.tests.data.bean.Country; import com.vaadin.tests.data.bean.Person; import com.vaadin.tests.data.bean.Sex; import com.vaadin.v7.data.Validator.InvalidValueException; -import com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException; -import com.vaadin.v7.data.util.converter.LegacyStringToIntegerConverter; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.util.converter.Converter.ConversionException; +import com.vaadin.v7.data.util.MethodProperty; +import com.vaadin.v7.data.util.converter.StringToIntegerConverter; +import com.vaadin.v7.ui.TextField; public class AbsFieldValueConversionErrorTest { @@ -23,8 +23,8 @@ public class AbsFieldValueConversionErrorTest { @Test public void testValidateConversionErrorParameters() { - LegacyTextField tf = new LegacyTextField(); - tf.setConverter(new LegacyStringToIntegerConverter()); + TextField tf = new TextField(); + tf.setConverter(new StringToIntegerConverter()); tf.setPropertyDataSource(new MethodProperty<String>(paulaBean, "age")); tf.setConversionError("(Type: {0}) Converter exception message: {1}"); tf.setValue("abc"); @@ -41,8 +41,8 @@ public class AbsFieldValueConversionErrorTest { @Test public void testConvertToModelConversionErrorParameters() { - LegacyTextField tf = new LegacyTextField(); - tf.setConverter(new LegacyStringToIntegerConverter()); + TextField tf = new TextField(); + tf.setConverter(new StringToIntegerConverter()); tf.setPropertyDataSource(new MethodProperty<String>(paulaBean, "age")); tf.setConversionError("(Type: {0}) Converter exception message: {1}"); tf.setValue("abc"); @@ -59,8 +59,8 @@ public class AbsFieldValueConversionErrorTest { @Test public void testNullConversionMessages() { - LegacyTextField tf = new LegacyTextField(); - tf.setConverter(new LegacyStringToIntegerConverter()); + TextField tf = new TextField(); + tf.setConverter(new StringToIntegerConverter()); tf.setPropertyDataSource(new MethodProperty<String>(paulaBean, "age")); tf.setConversionError(null); tf.setValue("abc"); @@ -75,8 +75,8 @@ public class AbsFieldValueConversionErrorTest { @Test public void testDefaultConversionErrorMessage() { - LegacyTextField tf = new LegacyTextField(); - tf.setConverter(new LegacyStringToIntegerConverter()); + TextField tf = new TextField(); + tf.setConverter(new StringToIntegerConverter()); tf.setPropertyDataSource(new MethodProperty<String>(paulaBean, "age")); tf.setValue("abc"); diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java index 4193aa9141..235cfdb93e 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversionsTest.java @@ -8,18 +8,18 @@ import java.util.Locale; import org.junit.Assert; import org.junit.Test; -import com.vaadin.data.util.MethodProperty; -import com.vaadin.data.util.ObjectProperty; import com.vaadin.server.VaadinSession; import com.vaadin.tests.data.bean.Address; import com.vaadin.tests.data.bean.Country; import com.vaadin.tests.data.bean.Person; import com.vaadin.tests.data.bean.Sex; import com.vaadin.tests.util.AlwaysLockedVaadinSession; -import com.vaadin.v7.data.util.converter.LegacyConverter; -import com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException; -import com.vaadin.v7.data.util.converter.LegacyStringToIntegerConverter; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.util.MethodProperty; +import com.vaadin.v7.data.util.ObjectProperty; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.data.util.converter.Converter.ConversionException; +import com.vaadin.v7.data.util.converter.StringToIntegerConverter; +import com.vaadin.v7.ui.TextField; public class AbsFieldValueConversionsTest { @@ -35,7 +35,7 @@ public class AbsFieldValueConversionsTest { @Test public void testWithoutConversion() { - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); tf.setPropertyDataSource( new MethodProperty<String>(paulaBean, "firstName")); assertEquals("Paula", tf.getValue()); @@ -49,7 +49,7 @@ public class AbsFieldValueConversionsTest { @Test public void testNonmodifiedBufferedFieldConversion() { VaadinSession.setCurrent(new AlwaysLockedVaadinSession(null)); - LegacyTextField tf = new LegacyTextField("salary"); + TextField tf = new TextField("salary"); tf.setBuffered(true); tf.setLocale(new Locale("en", "US")); ObjectProperty<Integer> ds = new ObjectProperty<Integer>(123456789); @@ -66,7 +66,7 @@ public class AbsFieldValueConversionsTest { @Test public void testModifiedBufferedFieldConversion() { VaadinSession.setCurrent(new AlwaysLockedVaadinSession(null)); - LegacyTextField tf = new LegacyTextField("salary"); + TextField tf = new TextField("salary"); tf.setBuffered(true); tf.setLocale(new Locale("en", "US")); ObjectProperty<Integer> ds = new ObjectProperty<Integer>(123456789); @@ -85,8 +85,8 @@ public class AbsFieldValueConversionsTest { @Test public void testStringIdentityConversion() { - LegacyTextField tf = new LegacyTextField(); - tf.setConverter(new LegacyConverter<String, String>() { + TextField tf = new TextField(); + tf.setConverter(new Converter<String, String>() { @Override public String convertToModel(String value, @@ -122,9 +122,9 @@ public class AbsFieldValueConversionsTest { @Test public void testIntegerStringConversion() { - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); - tf.setConverter(new LegacyStringToIntegerConverter()); + tf.setConverter(new StringToIntegerConverter()); tf.setPropertyDataSource(new MethodProperty<Integer>(paulaBean, "age")); assertEquals(34, tf.getPropertyDataSource().getValue()); assertEquals("34", tf.getValue()); @@ -140,7 +140,7 @@ public class AbsFieldValueConversionsTest { public void testChangeReadOnlyFieldLocale() { VaadinSession.setCurrent(new AlwaysLockedVaadinSession(null)); - LegacyTextField tf = new LegacyTextField("salary"); + TextField tf = new TextField("salary"); tf.setLocale(new Locale("en", "US")); ObjectProperty<Integer> ds = new ObjectProperty<Integer>(123456789); ds.setReadOnly(true); @@ -171,7 +171,7 @@ public class AbsFieldValueConversionsTest { public void testNumberDoubleConverterChange() { final VaadinSession a = new AlwaysLockedVaadinSession(null); VaadinSession.setCurrent(a); - LegacyTextField tf = new LegacyTextField() { + TextField tf = new TextField() { @Override public VaadinSession getSession() { return a; @@ -184,10 +184,10 @@ public class AbsFieldValueConversionsTest { assertEquals(490, tf.getPropertyDataSource().getValue()); assertEquals("490", tf.getValue()); - LegacyConverter c1 = tf.getConverter(); + Converter c1 = tf.getConverter(); tf.setPropertyDataSource(new MethodProperty<Number>(nb, "number")); - LegacyConverter c2 = tf.getConverter(); + Converter c2 = tf.getConverter(); assertTrue( "StringToInteger converter is ok for integer types and should stay even though property is changed", c1 == c2); @@ -198,10 +198,10 @@ public class AbsFieldValueConversionsTest { @Test public void testNullConverter() { - LegacyTextField tf = new LegacyTextField("foo"); - tf.setConverter(new LegacyStringToIntegerConverter()); + TextField tf = new TextField("foo"); + tf.setConverter(new StringToIntegerConverter()); tf.setPropertyDataSource(new ObjectProperty<Integer>(12)); - tf.setConverter((LegacyConverter) null); + tf.setConverter((Converter) null); try { Object v = tf.getConvertedValue(); System.out.println(v); diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldReadOnlyTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldReadOnlyTest.java index 8fe1cc89db..775ef29292 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldReadOnlyTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/AbstractFieldReadOnlyTest.java @@ -5,15 +5,15 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; -import com.vaadin.data.Property.ReadOnlyStatusChangeEvent; -import com.vaadin.data.Property.ReadOnlyStatusChangeListener; -import com.vaadin.data.util.MethodProperty; import com.vaadin.tests.data.bean.Address; import com.vaadin.tests.data.bean.Country; import com.vaadin.tests.data.bean.Person; import com.vaadin.tests.data.bean.Sex; import com.vaadin.ui.Label; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.Property.ReadOnlyStatusChangeEvent; +import com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener; +import com.vaadin.v7.data.util.MethodProperty; +import com.vaadin.v7.ui.TextField; public class AbstractFieldReadOnlyTest { @@ -23,7 +23,7 @@ public class AbstractFieldReadOnlyTest { @Test public void testReadOnlyProperty() { - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); tf.setPropertyDataSource( new MethodProperty<String>(paulaBean, "firstName")); assertFalse(tf.isReadOnly()); @@ -34,7 +34,7 @@ public class AbstractFieldReadOnlyTest { @Test public void testReadOnlyEventFromProperty() { final Label valueStore = new Label(""); - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); tf.addReadOnlyStatusChangeListener(new ReadOnlyStatusChangeListener() { @Override public void readOnlyStatusChange(ReadOnlyStatusChangeEvent event) { diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java index 61c94cd061..a355e7ebfa 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/DefaultConverterFactoryTest.java @@ -7,14 +7,14 @@ import java.util.Locale; import org.junit.Test; -import com.vaadin.data.util.MethodProperty; import com.vaadin.server.VaadinSession; import com.vaadin.tests.data.bean.Address; import com.vaadin.tests.data.bean.Country; import com.vaadin.tests.data.bean.Person; import com.vaadin.tests.data.bean.Sex; import com.vaadin.tests.util.AlwaysLockedVaadinSession; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.util.MethodProperty; +import com.vaadin.v7.ui.TextField; public class DefaultConverterFactoryTest { @@ -87,7 +87,7 @@ public class DefaultConverterFactoryTest { VaadinSession sess = new AlwaysLockedVaadinSession(null); VaadinSession.setCurrent(sess); - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); tf.setLocale(new Locale("en", "US")); tf.setPropertyDataSource( new MethodProperty<Integer>(new FloatBean(12f, 23f), "f2")); @@ -103,7 +103,7 @@ public class DefaultConverterFactoryTest { VaadinSession sess = new AlwaysLockedVaadinSession(null); VaadinSession.setCurrent(sess); - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); tf.setLocale(new Locale("en", "US")); tf.setPropertyDataSource(new MethodProperty<Integer>( new LongBean(12, 1982739187238L), "l2")); @@ -118,7 +118,7 @@ public class DefaultConverterFactoryTest { public void testDefaultNumberConversion() { VaadinSession app = new AlwaysLockedVaadinSession(null); VaadinSession.setCurrent(app); - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); tf.setLocale(new Locale("en", "US")); tf.setPropertyDataSource( new MethodProperty<Integer>(paulaBean, "salary")); diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java index a3fa5a7af6..d956fc95a0 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetachTest.java @@ -4,21 +4,21 @@ import static org.junit.Assert.assertEquals; import org.junit.Test; -import com.vaadin.data.Property; -import com.vaadin.data.util.AbstractProperty; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinSession; import com.vaadin.tests.util.AlwaysLockedVaadinSession; import com.vaadin.ui.UI; -import com.vaadin.v7.data.util.converter.LegacyConverter.ConversionException; -import com.vaadin.v7.ui.LegacyAbstractField; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.util.AbstractProperty; +import com.vaadin.v7.data.util.converter.Converter.ConversionException; +import com.vaadin.v7.ui.AbstractField; public class RemoveListenersOnDetachTest { int numValueChanges = 0; int numReadOnlyChanges = 0; - LegacyAbstractField field = new LegacyAbstractField() { + AbstractField field = new AbstractField() { final private VaadinSession application = new AlwaysLockedVaadinSession( null); private UI uI = new UI() { diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java index f501daf54b..f6924e9b0a 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldListenersTest.java @@ -9,26 +9,26 @@ import com.vaadin.event.FieldEvents.FocusListener; import com.vaadin.event.FieldEvents.TextChangeEvent; import com.vaadin.event.FieldEvents.TextChangeListener; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.ui.TextField; public class AbstractTextFieldListenersTest extends AbstractListenerMethodsTestBase { @Test public void testTextChangeListenerAddGetRemove() throws Exception { - testListenerAddGetRemove(LegacyTextField.class, TextChangeEvent.class, + testListenerAddGetRemove(TextField.class, TextChangeEvent.class, TextChangeListener.class); } @Test public void testFocusListenerAddGetRemove() throws Exception { - testListenerAddGetRemove(LegacyTextField.class, FocusEvent.class, + testListenerAddGetRemove(TextField.class, FocusEvent.class, FocusListener.class); } @Test public void testBlurListenerAddGetRemove() throws Exception { - testListenerAddGetRemove(LegacyTextField.class, BlurEvent.class, + testListenerAddGetRemove(TextField.class, BlurEvent.class, BlurListener.class); } } diff --git a/server/src/test/java/com/vaadin/tests/server/component/button/ButtonClickTest.java b/server/src/test/java/com/vaadin/tests/server/component/button/ButtonClickTest.java index 6283ccf6af..3d6a6136dc 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/button/ButtonClickTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/button/ButtonClickTest.java @@ -3,11 +3,11 @@ package com.vaadin.tests.server.component.button; import org.junit.Assert; import org.junit.Test; -import com.vaadin.data.util.ObjectProperty; import com.vaadin.server.VaadinRequest; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; +import com.vaadin.v7.data.util.ObjectProperty; import com.vaadin.ui.UI; /** diff --git a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/DefaultAlignmentTest.java b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/DefaultAlignmentTest.java index 4e7d5c1e79..0cb6f850d3 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/DefaultAlignmentTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/DefaultAlignmentTest.java @@ -7,7 +7,7 @@ import org.junit.Test; import com.vaadin.ui.Alignment; import com.vaadin.ui.GridLayout; import com.vaadin.ui.Label; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.ui.TextField; public class DefaultAlignmentTest { @@ -21,7 +21,7 @@ public class DefaultAlignmentTest { @Test public void testDefaultAlignment() { Label label = new Label("A label"); - LegacyTextField tf = new LegacyTextField("A TextField"); + TextField tf = new TextField("A TextField"); gridLayout.addComponent(label); gridLayout.addComponent(tf); Assert.assertEquals(Alignment.TOP_LEFT, @@ -33,7 +33,7 @@ public class DefaultAlignmentTest { @Test public void testAlteredDefaultAlignment() { Label label = new Label("A label"); - LegacyTextField tf = new LegacyTextField("A TextField"); + TextField tf = new TextField("A TextField"); gridLayout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); gridLayout.addComponent(label); gridLayout.addComponent(tf); diff --git a/server/src/test/java/com/vaadin/tests/server/component/label/LabelConvertersTest.java b/server/src/test/java/com/vaadin/tests/server/component/label/LabelConvertersTest.java index b22cbfde2f..3c80f11b36 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/label/LabelConvertersTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/label/LabelConvertersTest.java @@ -22,13 +22,13 @@ import static org.junit.Assert.fail; import org.junit.Before; import org.junit.Test; -import com.vaadin.data.Property; -import com.vaadin.data.util.MethodProperty; import com.vaadin.server.VaadinSession; import com.vaadin.tests.data.bean.Person; import com.vaadin.tests.util.AlwaysLockedVaadinSession; import com.vaadin.ui.Label; import com.vaadin.util.CurrentInstance; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.util.MethodProperty; public class LabelConvertersTest { @Before diff --git a/server/src/test/java/com/vaadin/tests/server/component/label/LabelListenersTest.java b/server/src/test/java/com/vaadin/tests/server/component/label/LabelListenersTest.java index 9fe345ea85..212187e7ec 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/label/LabelListenersTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/label/LabelListenersTest.java @@ -9,11 +9,11 @@ import static org.easymock.EasyMock.verify; import org.easymock.EasyMock; import org.junit.Test; -import com.vaadin.data.Property; -import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.tests.server.component.AbstractListenerMethodsTestBase; import com.vaadin.ui.Label; import com.vaadin.ui.Label.ValueChangeEvent; +import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.Property.ValueChangeListener; public class LabelListenersTest extends AbstractListenerMethodsTestBase { @@ -32,7 +32,7 @@ public class LabelListenersTest extends AbstractListenerMethodsTestBase { ValueChangeListener.class); // record mockListener.valueChange( - anyObject(com.vaadin.data.Property.ValueChangeEvent.class)); + anyObject(com.vaadin.v7.data.Property.ValueChangeEvent.class)); // test underTest.addValueChangeListener(mockListener); @@ -55,7 +55,7 @@ public class LabelListenersTest extends AbstractListenerMethodsTestBase { ValueChangeListener.class); // record mockListener.valueChange( - anyObject(com.vaadin.data.Property.ValueChangeEvent.class)); + anyObject(com.vaadin.v7.data.Property.ValueChangeEvent.class)); expect(mockProperty.getType()).andReturn(String.class).atLeastOnce(); expect(mockProperty.getValue()).andReturn("Any").atLeastOnce(); diff --git a/server/src/test/java/com/vaadin/tests/server/component/orderedlayout/DefaultAlignmentTest.java b/server/src/test/java/com/vaadin/tests/server/component/orderedlayout/DefaultAlignmentTest.java index f0e21992d7..38d7924437 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/orderedlayout/DefaultAlignmentTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/orderedlayout/DefaultAlignmentTest.java @@ -9,7 +9,7 @@ import com.vaadin.ui.Alignment; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Label; import com.vaadin.ui.VerticalLayout; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.ui.TextField; public class DefaultAlignmentTest { @@ -34,7 +34,7 @@ public class DefaultAlignmentTest { public void testDefaultAlignment(AbstractOrderedLayout layout) { Label label = new Label("A label"); - LegacyTextField tf = new LegacyTextField("A TextField"); + TextField tf = new TextField("A TextField"); layout.addComponent(label); layout.addComponent(tf); Assert.assertEquals(Alignment.TOP_LEFT, @@ -55,7 +55,7 @@ public class DefaultAlignmentTest { public void testAlteredDefaultAlignment(AbstractOrderedLayout layout) { Label label = new Label("A label"); - LegacyTextField tf = new LegacyTextField("A TextField"); + TextField tf = new TextField("A TextField"); layout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); layout.addComponent(label); layout.addComponent(tf); diff --git a/server/src/test/java/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponentsTest.java b/server/src/test/java/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponentsTest.java index 2a88bb3208..d4b6baa503 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponentsTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/ui/LegacyUIAddRemoveComponentsTest.java @@ -9,7 +9,7 @@ import org.junit.Test; import com.vaadin.server.VaadinRequest; import com.vaadin.ui.Component; import com.vaadin.ui.Label; -import com.vaadin.ui.LegacyWindow; +import com.vaadin.v7.ui.LegacyWindow; public class LegacyUIAddRemoveComponentsTest { diff --git a/server/src/test/java/com/vaadin/tests/server/component/window/AddRemoveSubWindowTest.java b/server/src/test/java/com/vaadin/tests/server/component/window/AddRemoveSubWindowTest.java index 7fa8665c01..9ec970faba 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/window/AddRemoveSubWindowTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/window/AddRemoveSubWindowTest.java @@ -9,9 +9,9 @@ import org.junit.Test; import com.vaadin.server.LegacyApplication; import com.vaadin.server.VaadinSession; import com.vaadin.tests.util.AlwaysLockedVaadinSession; -import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.UI; import com.vaadin.ui.Window; +import com.vaadin.v7.ui.LegacyWindow; public class AddRemoveSubWindowTest { diff --git a/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java b/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java index 52c8f61466..36057e935f 100644 --- a/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java +++ b/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java @@ -3,11 +3,11 @@ package com.vaadin.tests.server.components; import org.easymock.EasyMock; import org.junit.Test; -import com.vaadin.data.Property.ValueChangeEvent; -import com.vaadin.data.Property.ValueChangeListener; -import com.vaadin.data.Property.ValueChangeNotifier; -import com.vaadin.data.util.ObjectProperty; -import com.vaadin.v7.ui.LegacyAbstractField; +import com.vaadin.v7.data.Property.ValueChangeEvent; +import com.vaadin.v7.data.Property.ValueChangeListener; +import com.vaadin.v7.data.Property.ValueChangeNotifier; +import com.vaadin.v7.data.util.ObjectProperty; +import com.vaadin.v7.ui.AbstractField; /** * Base class for tests for checking that value change listeners for fields are @@ -18,15 +18,15 @@ import com.vaadin.v7.ui.LegacyAbstractField; * * Subclasses should implement {@link #setValue()} and call * <code>super.setValue(LegacyAbstractField)</code>. Also, subclasses should - * typically override {@link #setValue(LegacyAbstractField)} to set the field + * typically override {@link #setValue(AbstractField)} to set the field * value via <code>changeVariables()</code>. */ public abstract class AbstractFieldValueChangeTestBase<T> { - private LegacyAbstractField<T> field; + private AbstractField<T> field; private ValueChangeListener listener; - protected void setUp(LegacyAbstractField<T> field) { + protected void setUp(AbstractField<T> field) { this.field = field; listener = EasyMock.createStrictMock(ValueChangeListener.class); @@ -116,14 +116,14 @@ public abstract class AbstractFieldValueChangeTestBase<T> { EasyMock.verify(listener); } - protected LegacyAbstractField<T> getField() { + protected AbstractField<T> getField() { return field; } /** * Override in subclasses to set value with changeVariables(). */ - protected void setValue(LegacyAbstractField<T> field) { + protected void setValue(AbstractField<T> field) { field.setValue((T) "newValue"); } diff --git a/server/src/test/java/com/vaadin/tests/server/components/TextFieldValueChangeTest.java b/server/src/test/java/com/vaadin/tests/server/components/TextFieldValueChangeTest.java index 4f2fc60bfe..971e075b2e 100644 --- a/server/src/test/java/com/vaadin/tests/server/components/TextFieldValueChangeTest.java +++ b/server/src/test/java/com/vaadin/tests/server/components/TextFieldValueChangeTest.java @@ -8,10 +8,10 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import com.vaadin.data.Property.ValueChangeEvent; -import com.vaadin.data.util.ObjectProperty; -import com.vaadin.v7.ui.LegacyAbstractField; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.Property.ValueChangeEvent; +import com.vaadin.v7.data.util.ObjectProperty; +import com.vaadin.v7.ui.AbstractField; +import com.vaadin.v7.ui.TextField; /** * Check that the value change listener for a text field is triggered exactly @@ -24,7 +24,7 @@ public class TextFieldValueChangeTest @Before public void setUp() { - super.setUp(new LegacyTextField()); + super.setUp(new TextField()); } /** @@ -39,10 +39,10 @@ public class TextFieldValueChangeTest } @Override - protected void setValue(LegacyAbstractField<String> field) { + protected void setValue(AbstractField<String> field) { Map<String, Object> variables = new HashMap<String, Object>(); variables.put("text", "newValue"); - ((LegacyTextField) field).changeVariables(field, variables); + ((TextField) field).changeVariables(field, variables); } /** diff --git a/server/src/test/java/com/vaadin/tests/server/components/WindowTest.java b/server/src/test/java/com/vaadin/tests/server/components/WindowTest.java index ed22870b59..2cd9236458 100644 --- a/server/src/test/java/com/vaadin/tests/server/components/WindowTest.java +++ b/server/src/test/java/com/vaadin/tests/server/components/WindowTest.java @@ -7,12 +7,12 @@ import org.easymock.EasyMock; import org.junit.Before; import org.junit.Test; -import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.Window; import com.vaadin.ui.Window.CloseEvent; import com.vaadin.ui.Window.CloseListener; import com.vaadin.ui.Window.ResizeEvent; import com.vaadin.ui.Window.ResizeListener; +import com.vaadin.v7.ui.LegacyWindow; public class WindowTest { diff --git a/server/src/test/java/com/vaadin/ui/AbsFieldDataSourceLocaleChangeTest.java b/server/src/test/java/com/vaadin/ui/AbsFieldDataSourceLocaleChangeTest.java index 1844495f6d..96212ac085 100644 --- a/server/src/test/java/com/vaadin/ui/AbsFieldDataSourceLocaleChangeTest.java +++ b/server/src/test/java/com/vaadin/ui/AbsFieldDataSourceLocaleChangeTest.java @@ -10,8 +10,8 @@ import org.junit.Test; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinSession; import com.vaadin.tests.util.AlwaysLockedVaadinSession; -import com.vaadin.v7.data.util.converter.LegacyStringToIntegerConverter; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.util.converter.StringToIntegerConverter; +import com.vaadin.v7.ui.TextField; public class AbsFieldDataSourceLocaleChangeTest { @@ -35,9 +35,9 @@ public class AbsFieldDataSourceLocaleChangeTest { @Test public void localeChangesOnAttach() { - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); - tf.setConverter(new LegacyStringToIntegerConverter() { + tf.setConverter(new StringToIntegerConverter() { @Override protected NumberFormat getFormat(Locale locale) { if (locale == null) { diff --git a/server/src/test/java/com/vaadin/ui/LabelDataSourceTest.java b/server/src/test/java/com/vaadin/ui/LabelDataSourceTest.java index 5853efd01d..e164534918 100644 --- a/server/src/test/java/com/vaadin/ui/LabelDataSourceTest.java +++ b/server/src/test/java/com/vaadin/ui/LabelDataSourceTest.java @@ -21,10 +21,10 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import com.vaadin.data.util.ObjectProperty; import com.vaadin.server.VaadinSession; import com.vaadin.tests.util.AlwaysLockedVaadinSession; import com.vaadin.tests.util.MockUI; +import com.vaadin.v7.data.util.ObjectProperty; public class LabelDataSourceTest { diff --git a/server/src/test/java/com/vaadin/ui/TextFieldTest.java b/server/src/test/java/com/vaadin/ui/TextFieldTest.java index 9093b40bea..dbd2e82fdf 100644 --- a/server/src/test/java/com/vaadin/ui/TextFieldTest.java +++ b/server/src/test/java/com/vaadin/ui/TextFieldTest.java @@ -18,20 +18,20 @@ package com.vaadin.ui; import org.junit.Assert; import org.junit.Test; -import com.vaadin.data.util.ObjectProperty; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.v7.data.util.ObjectProperty; +import com.vaadin.v7.ui.TextField; public class TextFieldTest { @Test public void initiallyEmpty() { - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); Assert.assertTrue(tf.isEmpty()); } @Test public void emptyAfterClearUsingPDS() { - LegacyTextField tf = new LegacyTextField( + TextField tf = new TextField( new ObjectProperty<String>("foo")); Assert.assertFalse(tf.isEmpty()); tf.clear(); @@ -40,7 +40,7 @@ public class TextFieldTest { @Test public void emptyAfterClear() { - LegacyTextField tf = new LegacyTextField(); + TextField tf = new TextField(); tf.setValue("foobar"); Assert.assertFalse(tf.isEmpty()); tf.clear(); |