diff options
author | Denis <denis@vaadin.com> | 2016-12-15 17:03:07 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2016-12-15 17:03:07 +0200 |
commit | 6185ad5d4e8d81fe9e59580b48343ec9d74bc8dc (patch) | |
tree | 739fd9fd0bca3e6b9f41b71f6e1d36be0c4b9c52 | |
parent | ca049c845d26a7106699715071b5cc9df0425c73 (diff) | |
download | vaadin-framework-6185ad5d4e8d81fe9e59580b48343ec9d74bc8dc.tar.gz vaadin-framework-6185ad5d4e8d81fe9e59580b48343ec9d74bc8dc.zip |
Move old Sort related classes into compatibility module. (#7999)
Fixes vaadin/framework8-issues#563
13 files changed, 33 insertions, 31 deletions
diff --git a/server/src/main/java/com/vaadin/data/sort/Sort.java b/compatibility-server/src/main/java/com/vaadin/v7/data/sort/Sort.java index fe082149e9..701c7d317e 100644 --- a/server/src/main/java/com/vaadin/data/sort/Sort.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/sort/Sort.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.sort; +package com.vaadin.v7.data.sort; import java.io.Serializable; import java.util.ArrayList; @@ -28,6 +28,7 @@ import com.vaadin.shared.data.sort.SortDirection; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class Sort implements Serializable { private final Sort previous; diff --git a/server/src/main/java/com/vaadin/data/sort/SortOrder.java b/compatibility-server/src/main/java/com/vaadin/v7/data/sort/SortOrder.java index 16efda3628..4d8e297ca7 100644 --- a/server/src/main/java/com/vaadin/data/sort/SortOrder.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/sort/SortOrder.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.data.sort; +package com.vaadin.v7.data.sort; import java.io.Serializable; @@ -26,6 +26,7 @@ import com.vaadin.shared.data.sort.SortDirection; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class SortOrder implements Serializable { private final Object propertyId; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/GeneratedPropertyContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/GeneratedPropertyContainer.java index f27b651b50..ac0c44d8f1 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/GeneratedPropertyContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/GeneratedPropertyContainer.java @@ -27,11 +27,11 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import com.vaadin.data.sort.SortOrder; import com.vaadin.shared.data.sort.SortDirection; import com.vaadin.v7.data.Container; import com.vaadin.v7.data.Item; import com.vaadin.v7.data.Property; +import com.vaadin.v7.data.sort.SortOrder; import com.vaadin.v7.data.util.filter.UnsupportedFilterException; /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyValueGenerator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyValueGenerator.java index e49da158f8..ce5e6738e9 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyValueGenerator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyValueGenerator.java @@ -17,8 +17,8 @@ package com.vaadin.v7.data.util; import java.io.Serializable; -import com.vaadin.data.sort.SortOrder; import com.vaadin.v7.data.Container.Filter; +import com.vaadin.v7.data.sort.SortOrder; import com.vaadin.v7.data.Item; import com.vaadin.v7.data.Property; import com.vaadin.v7.data.util.filter.UnsupportedFilterException; diff --git a/server/src/main/java/com/vaadin/event/SortEvent.java b/compatibility-server/src/main/java/com/vaadin/v7/event/SortEvent.java index c69daa695e..044b42b10f 100644 --- a/server/src/main/java/com/vaadin/event/SortEvent.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/event/SortEvent.java @@ -13,14 +13,14 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.event; +package com.vaadin.v7.event; import java.io.Serializable; import java.util.List; -import com.vaadin.data.sort.SortOrder; import com.vaadin.shared.Registration; import com.vaadin.ui.Component; +import com.vaadin.v7.data.sort.SortOrder; /** * Event describing a change in sorting of a {@link Container}. Fired by @@ -31,6 +31,7 @@ import com.vaadin.ui.Component; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class SortEvent extends Component.Event { private final List<SortOrder> sortOrder; @@ -76,6 +77,7 @@ public class SortEvent extends Component.Event { * Listener for sort order change events. */ @FunctionalInterface + @Deprecated public interface SortListener extends Serializable { /** * Called when the sort order has changed. @@ -90,6 +92,7 @@ public class SortEvent extends Component.Event { * The interface for adding and removing listeners for {@link SortEvent * SortEvents}. */ + @Deprecated public interface SortNotifier extends Serializable { /** * Adds a sort order change listener that gets notified when the sort @@ -107,10 +110,7 @@ public class SortEvent extends Component.Event { * * @param listener * the sort order change listener to remove - * @deprecated use a {@link Registration} returned by - * {@link #addSortListener(SortListener)} */ - @Deprecated public void removeSortListener(SortListener listener); } } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java index e48e58824f..75915e1bc6 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java @@ -42,16 +42,11 @@ import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; -import com.vaadin.data.sort.Sort; -import com.vaadin.data.sort.SortOrder; import com.vaadin.event.ContextClickEvent; import com.vaadin.event.FieldEvents.BlurEvent; import com.vaadin.event.FieldEvents.BlurListener; import com.vaadin.event.FieldEvents.FocusEvent; import com.vaadin.event.FieldEvents.FocusListener; -import com.vaadin.event.SortEvent; -import com.vaadin.event.SortEvent.SortListener; -import com.vaadin.event.SortEvent.SortNotifier; import com.vaadin.server.AbstractClientConnector; import com.vaadin.server.AbstractExtension; import com.vaadin.server.EncodeResult; @@ -90,6 +85,8 @@ import com.vaadin.v7.data.Validator.InvalidValueException; import com.vaadin.v7.data.fieldgroup.DefaultFieldGroupFieldFactory; import com.vaadin.v7.data.fieldgroup.FieldGroup; import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException; +import com.vaadin.v7.data.sort.Sort; +import com.vaadin.v7.data.sort.SortOrder; import com.vaadin.v7.data.fieldgroup.FieldGroupFieldFactory; import com.vaadin.v7.data.util.IndexedContainer; import com.vaadin.v7.data.util.converter.Converter; @@ -100,8 +97,11 @@ import com.vaadin.v7.event.ItemClickEvent; import com.vaadin.v7.event.ItemClickEvent.ItemClickListener; import com.vaadin.v7.event.ItemClickEvent.ItemClickNotifier; import com.vaadin.v7.event.SelectionEvent; +import com.vaadin.v7.event.SortEvent; import com.vaadin.v7.event.SelectionEvent.SelectionListener; import com.vaadin.v7.event.SelectionEvent.SelectionNotifier; +import com.vaadin.v7.event.SortEvent.SortListener; +import com.vaadin.v7.event.SortEvent.SortNotifier; import com.vaadin.v7.server.communication.data.DataGenerator; import com.vaadin.v7.server.communication.data.RpcDataProviderExtension; import com.vaadin.v7.shared.ui.grid.ColumnResizeMode; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/GeneratedPropertyContainerTest.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/GeneratedPropertyContainerTest.java index 6196af79d4..ef4aac49f5 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/GeneratedPropertyContainerTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/GeneratedPropertyContainerTest.java @@ -23,13 +23,13 @@ import static org.junit.Assert.fail; import org.junit.Before; import org.junit.Test; -import com.vaadin.data.sort.SortOrder; import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.Container.Indexed; import com.vaadin.v7.data.Container.ItemSetChangeEvent; import com.vaadin.v7.data.Container.ItemSetChangeListener; import com.vaadin.v7.data.Container.PropertySetChangeEvent; import com.vaadin.v7.data.Container.PropertySetChangeListener; +import com.vaadin.v7.data.sort.SortOrder; import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.GeneratedPropertyContainer.GeneratedPropertyItem; import com.vaadin.v7.data.util.filter.Compare; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/sort/SortTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/sort/SortTest.java index b0100d46a3..cc209c025e 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/sort/SortTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/sort/SortTest.java @@ -23,12 +23,12 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import com.vaadin.data.sort.Sort; -import com.vaadin.data.sort.SortOrder; -import com.vaadin.event.SortEvent; -import com.vaadin.event.SortEvent.SortListener; import com.vaadin.shared.data.sort.SortDirection; +import com.vaadin.v7.data.sort.Sort; +import com.vaadin.v7.data.sort.SortOrder; import com.vaadin.v7.data.util.IndexedContainer; +import com.vaadin.v7.event.SortEvent; +import com.vaadin.v7.event.SortEvent.SortListener; import com.vaadin.v7.ui.Grid; public class SortTest { diff --git a/server/src/main/java/com/vaadin/ui/components/grid/SortOrderProvider.java b/server/src/main/java/com/vaadin/ui/components/grid/SortOrderProvider.java index 046719e978..2851b9d100 100644 --- a/server/src/main/java/com/vaadin/ui/components/grid/SortOrderProvider.java +++ b/server/src/main/java/com/vaadin/ui/components/grid/SortOrderProvider.java @@ -31,8 +31,8 @@ import com.vaadin.ui.Grid.Column; * @author Vaadin Ltd */ @FunctionalInterface -public interface SortOrderProvider - extends SerializableFunction<SortDirection, Stream<SortOrder<String>>> { +public interface SortOrderProvider extends + SerializableFunction<SortDirection, Stream<SortOrder<String>>> { /** * Generates the sort orders when rows are sorted by a column. diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridGeneratedProperties.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridGeneratedProperties.java index 9b101b2e81..42f22ffd59 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridGeneratedProperties.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridGeneratedProperties.java @@ -15,8 +15,6 @@ */ package com.vaadin.v7.tests.components.grid; -import com.vaadin.data.sort.Sort; -import com.vaadin.data.sort.SortOrder; import com.vaadin.server.VaadinRequest; import com.vaadin.shared.data.sort.SortDirection; import com.vaadin.tests.components.AbstractReindeerTestUI; @@ -26,6 +24,8 @@ import com.vaadin.ui.Button.ClickListener; import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.Container.Filterable; import com.vaadin.v7.data.Container.Indexed; +import com.vaadin.v7.data.sort.Sort; +import com.vaadin.v7.data.sort.SortOrder; import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.v7.data.util.IndexedContainer; diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java index cc7dc5a93a..dac2939997 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridSortIndicator.java @@ -18,12 +18,12 @@ package com.vaadin.v7.tests.components.grid; import java.util.ArrayList; import java.util.List; -import com.vaadin.data.sort.SortOrder; -import com.vaadin.event.SortEvent; -import com.vaadin.event.SortEvent.SortListener; import com.vaadin.server.VaadinRequest; import com.vaadin.shared.data.sort.SortDirection; import com.vaadin.tests.components.AbstractReindeerTestUI; +import com.vaadin.v7.data.sort.SortOrder; +import com.vaadin.v7.event.SortEvent; +import com.vaadin.v7.event.SortEvent.SortListener; import com.vaadin.v7.ui.Grid; /* diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java index 5c5acf0054..fa56567f19 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java @@ -29,10 +29,6 @@ import java.util.Map; import java.util.Random; import com.vaadin.annotations.Theme; -import com.vaadin.data.sort.Sort; -import com.vaadin.data.sort.SortOrder; -import com.vaadin.event.SortEvent; -import com.vaadin.event.SortEvent.SortListener; import com.vaadin.shared.data.sort.SortDirection; import com.vaadin.tests.components.AbstractComponentTest; import com.vaadin.ui.Button; @@ -49,11 +45,15 @@ import com.vaadin.v7.data.Property; import com.vaadin.v7.data.Property.ValueChangeEvent; import com.vaadin.v7.data.Property.ValueChangeListener; import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException; +import com.vaadin.v7.data.sort.Sort; +import com.vaadin.v7.data.sort.SortOrder; import com.vaadin.v7.data.util.IndexedContainer; import com.vaadin.v7.event.ItemClickEvent; import com.vaadin.v7.event.ItemClickEvent.ItemClickListener; import com.vaadin.v7.event.SelectionEvent; import com.vaadin.v7.event.SelectionEvent.SelectionListener; +import com.vaadin.v7.event.SortEvent; +import com.vaadin.v7.event.SortEvent.SortListener; import com.vaadin.v7.shared.ui.grid.ColumnResizeMode; import com.vaadin.v7.shared.ui.grid.GridStaticCellType; import com.vaadin.v7.shared.ui.grid.HeightMode; diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridSortingIndicators.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridSortingIndicators.java index 142e22e5c7..e2b3a2bda3 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridSortingIndicators.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridSortingIndicators.java @@ -15,7 +15,6 @@ */ package com.vaadin.v7.tests.components.grid.basicfeatures; -import com.vaadin.data.sort.Sort; import com.vaadin.server.VaadinRequest; import com.vaadin.shared.data.sort.SortDirection; import com.vaadin.tests.components.AbstractReindeerTestUI; @@ -23,6 +22,7 @@ import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.v7.data.Container; import com.vaadin.v7.data.Item; +import com.vaadin.v7.data.sort.Sort; import com.vaadin.v7.data.util.IndexedContainer; import com.vaadin.v7.ui.Grid; |