Skip to content

Commit

Permalink
Move old Sort related classes into compatibility module. (#7999)
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis authored and tsuoanttila committed Dec 15, 2016
1 parent ca049c8 commit 6185ad5
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 31 deletions.
Expand Up @@ -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;
Expand All @@ -28,6 +28,7 @@
* @since 7.4
* @author Vaadin Ltd
*/
@Deprecated
public class Sort implements Serializable {

private final Sort previous;
Expand Down
Expand Up @@ -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;

Expand All @@ -26,6 +26,7 @@
* @since 7.4
* @author Vaadin Ltd
*/
@Deprecated
public class SortOrder implements Serializable {

private final Object propertyId;
Expand Down
Expand Up @@ -27,11 +27,11 @@
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;

/**
Expand Down
Expand Up @@ -17,8 +17,8 @@

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;
Expand Down
Expand Up @@ -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
Expand All @@ -31,6 +31,7 @@
* @since 7.4
* @author Vaadin Ltd
*/
@Deprecated
public class SortEvent extends Component.Event {

private final List<SortOrder> sortOrder;
Expand Down Expand Up @@ -76,6 +77,7 @@ public boolean isUserOriginated() {
* Listener for sort order change events.
*/
@FunctionalInterface
@Deprecated
public interface SortListener extends Serializable {
/**
* Called when the sort order has changed.
Expand All @@ -90,6 +92,7 @@ public interface SortListener extends Serializable {
* 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
Expand All @@ -107,10 +110,7 @@ public interface SortNotifier extends Serializable {
*
* @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);
}
}
10 changes: 5 additions & 5 deletions compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
Expand Up @@ -42,16 +42,11 @@
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;
Expand Down Expand Up @@ -90,6 +85,8 @@
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;
Expand All @@ -100,8 +97,11 @@
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;
Expand Down
Expand Up @@ -23,13 +23,13 @@
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;
Expand Down
Expand Up @@ -23,12 +23,12 @@
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 {
Expand Down
Expand Up @@ -31,8 +31,8 @@
* @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.
Expand Down
Expand Up @@ -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;
Expand All @@ -26,6 +24,8 @@
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;
Expand Down
Expand Up @@ -18,12 +18,12 @@
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;

/*
Expand Down
Expand Up @@ -29,10 +29,6 @@
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;
Expand All @@ -49,11 +45,15 @@
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;
Expand Down
Expand Up @@ -15,14 +15,14 @@
*/
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;
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;

Expand Down

0 comments on commit 6185ad5

Please sign in to comment.