Skip to content

Commit

Permalink
Mark all server compatibility classes deprecated (#144).
Browse files Browse the repository at this point in the history
Change-Id: Iba0a35d5ea9a97b0020f506f610630471c59748b
  • Loading branch information
Denis Anisimov committed Sep 23, 2016
1 parent 78130f1 commit cef5b51
Show file tree
Hide file tree
Showing 185 changed files with 763 additions and 256 deletions.
Expand Up @@ -46,6 +46,7 @@
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface Buffered extends Serializable {

/**
Expand Down Expand Up @@ -115,6 +116,7 @@ public interface Buffered extends Serializable {
* @since 3.0
*/
@SuppressWarnings("serial")
@Deprecated
public class SourceException extends RuntimeException
implements Serializable, ErrorMessageProducer {

Expand Down
Expand Up @@ -28,6 +28,7 @@
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface BufferedValidatable
extends Buffered, Validatable, Serializable {

Expand Down
Expand Up @@ -37,6 +37,7 @@
* <p>
*
*/
@Deprecated
public interface Collapsible extends Hierarchical, Ordered {

/**
Expand Down
Expand Up @@ -80,6 +80,7 @@
* @author Vaadin Ltd
* @since 3.0
*/
@Deprecated
public interface Container extends Serializable {

/**
Expand Down Expand Up @@ -301,6 +302,7 @@ public boolean removeContainerProperty(Object propertyId)
* {@link Sortable} for more information.
* </p>
*/
@Deprecated
public interface Ordered extends Container {

/**
Expand Down Expand Up @@ -424,6 +426,7 @@ public Item addItemAfter(Object previousItemId, Object newItemId)
* change the internal order of items in the container.
* </p>
*/
@Deprecated
public interface Sortable extends Ordered {

/**
Expand Down Expand Up @@ -468,6 +471,7 @@ public interface Sortable extends Ordered {
* position based on sorting.
* </p>
*/
@Deprecated
public interface Indexed extends Ordered {

/**
Expand Down Expand Up @@ -588,6 +592,7 @@ public Item addItemAt(int index, Object newItemId)
*
* @since 7.4
*/
@Deprecated
public interface ItemAddEvent extends ItemSetChangeEvent {

/**
Expand Down Expand Up @@ -618,6 +623,7 @@ public interface ItemAddEvent extends ItemSetChangeEvent {
*
* @since 7.4
*/
@Deprecated
public interface ItemRemoveEvent extends ItemSetChangeEvent {
/**
* Gets the item id of the first removed item.
Expand Down Expand Up @@ -655,6 +661,7 @@ public interface ItemRemoveEvent extends ItemSetChangeEvent {
* unable to have children.
* </ul>
*/
@Deprecated
public interface Hierarchical extends Container {

/**
Expand Down Expand Up @@ -849,6 +856,7 @@ public boolean removeItem(Object itemId)
*
* @since 5.0 (renamed from Filterable to SimpleFilterable in 6.6)
*/
@Deprecated
public interface SimpleFilterable extends Container, Serializable {

/**
Expand Down Expand Up @@ -913,6 +921,7 @@ public void addContainerFilter(Object propertyId, String filterString,
*
* @since 6.6
*/
@Deprecated
public interface Filter extends Serializable {

/**
Expand Down Expand Up @@ -985,6 +994,7 @@ public boolean passesFilter(Object itemId, Item item)
*
* @since 6.6
*/
@Deprecated
public interface Filterable extends Container, Serializable {
/**
* Adds a filter for the container.
Expand Down Expand Up @@ -1026,6 +1036,7 @@ public void addContainerFilter(Filter filter)
* Interface implemented by viewer classes capable of using a Container as a
* data source.
*/
@Deprecated
public interface Viewer extends Serializable {

/**
Expand Down Expand Up @@ -1057,6 +1068,7 @@ public interface Viewer extends Serializable {
* internally.
* </p>
*/
@Deprecated
public interface Editor extends Container.Viewer, Serializable {

}
Expand All @@ -1069,6 +1081,7 @@ public interface Editor extends Container.Viewer, Serializable {
*
* A simple property value change is not an item set change.
*/
@Deprecated
public interface ItemSetChangeEvent extends Serializable {

/**
Expand All @@ -1085,6 +1098,7 @@ public interface ItemSetChangeEvent extends Serializable {
* An item set change refers to addition, removal or reordering of items in
* the container. A simple property value change is not an item set change.
*/
@Deprecated
public interface ItemSetChangeListener extends Serializable {

/**
Expand Down Expand Up @@ -1115,6 +1129,7 @@ public interface ItemSetChangeListener extends Serializable {
* be able to implement an interface.
* </p>
*/
@Deprecated
public interface ItemSetChangeNotifier extends Serializable {

/**
Expand Down Expand Up @@ -1161,6 +1176,7 @@ public void removeItemSetChangeListener(
* items in the container and their property values are not property set
* changes.
*/
@Deprecated
public interface PropertySetChangeEvent extends Serializable {

/**
Expand All @@ -1180,6 +1196,7 @@ public interface PropertySetChangeEvent extends Serializable {
* concerning the set of items in the container and their property values
* are not property set changes.
*/
@Deprecated
public interface PropertySetChangeListener extends Serializable {

/**
Expand Down Expand Up @@ -1217,6 +1234,7 @@ public void containerPropertySetChange(
* be able to implement an interface.
* </p>
*/
@Deprecated
public interface PropertySetChangeNotifier extends Serializable {

/**
Expand Down
Expand Up @@ -28,6 +28,7 @@
*
* @since 7.0
*/
@Deprecated
public class ContainerHelpers implements Serializable {

/**
Expand Down Expand Up @@ -83,7 +84,7 @@ public static List<?> getItemIdsUsingGetIdByIndex(int startIndex,
endIndex = container.size();
}

ArrayList<Object> rangeOfIds = new ArrayList<Object>();
ArrayList<Object> rangeOfIds = new ArrayList<>();
for (int i = startIndex; i < endIndex; i++) {
Object idByIndex = container.getIdByIndex(i);
if (idByIndex == null) {
Expand Down
Expand Up @@ -29,6 +29,7 @@
* @author Vaadin Ltd
* @since 3.0
*/
@Deprecated
public interface Item extends Serializable {

/**
Expand Down Expand Up @@ -89,6 +90,7 @@ public boolean removeItemProperty(Object id)
* Interface implemented by viewer classes capable of using an Item as a
* data source.
*/
@Deprecated
public interface Viewer extends Serializable {

/**
Expand Down Expand Up @@ -116,6 +118,7 @@ public interface Viewer extends Serializable {
* restrict the class from editing the contents of an internally.
* </p>
*/
@Deprecated
public interface Editor extends Item.Viewer, Serializable {

}
Expand All @@ -130,6 +133,7 @@ public interface Editor extends Item.Viewer, Serializable {
* this event.
* </p>
*/
@Deprecated
public interface PropertySetChangeEvent extends Serializable {

/**
Expand All @@ -144,6 +148,7 @@ public interface PropertySetChangeEvent extends Serializable {
* The listener interface for receiving <code>PropertySetChangeEvent</code>
* objects.
*/
@Deprecated
public interface PropertySetChangeListener extends Serializable {

/**
Expand All @@ -169,6 +174,7 @@ public interface PropertySetChangeListener extends Serializable {
* be able to implement an interface.
* </p>
*/
@Deprecated
public interface PropertySetChangeNotifier extends Serializable {

/**
Expand Down
Expand Up @@ -48,6 +48,7 @@
* @author Vaadin Ltd
* @since 3.0
*/
@Deprecated
public interface Property<T> extends Serializable {

/**
Expand Down Expand Up @@ -125,6 +126,7 @@ public interface Property<T> extends Serializable {
* @author Vaadin Ltd
* @since 7.0
*/
@Deprecated
public interface Transactional<T> extends Property<T> {

/**
Expand Down Expand Up @@ -178,6 +180,7 @@ public interface Transactional<T> extends Property<T> {
* @since 3.0
*/
@SuppressWarnings("serial")
@Deprecated
public class ReadOnlyException extends RuntimeException {

/**
Expand Down Expand Up @@ -206,6 +209,7 @@ public ReadOnlyException(String msg) {
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface Viewer extends Serializable {

/**
Expand Down Expand Up @@ -238,6 +242,7 @@ public interface Viewer extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface Editor extends Property.Viewer, Serializable {

}
Expand All @@ -251,6 +256,7 @@ public interface Editor extends Property.Viewer, Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface ValueChangeEvent extends Serializable {

/**
Expand All @@ -268,6 +274,7 @@ public interface ValueChangeEvent extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface ValueChangeListener extends Serializable {

/**
Expand Down Expand Up @@ -296,6 +303,7 @@ public interface ValueChangeListener extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface ValueChangeNotifier extends Serializable {

/**
Expand Down Expand Up @@ -340,6 +348,7 @@ public void removeValueChangeListener(
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface ReadOnlyStatusChangeEvent extends Serializable {

/**
Expand All @@ -357,6 +366,7 @@ public interface ReadOnlyStatusChangeEvent extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface ReadOnlyStatusChangeListener extends Serializable {

/**
Expand Down Expand Up @@ -387,6 +397,7 @@ public void readOnlyStatusChange(
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface ReadOnlyStatusChangeNotifier extends Serializable {

/**
Expand Down
Expand Up @@ -30,6 +30,7 @@
* @since 3.0
* @see com.vaadin.v7.data.Validator
*/
@Deprecated
public interface Validatable extends Serializable {

/**
Expand Down
Expand Up @@ -53,6 +53,7 @@
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
public interface Validator extends Serializable {

/**
Expand All @@ -79,6 +80,7 @@ public interface Validator extends Serializable {
* @author Vaadin Ltd.
* @since 3.0
*/
@Deprecated
@SuppressWarnings("serial")
public class InvalidValueException extends RuntimeException
implements ErrorMessageProducer {
Expand Down Expand Up @@ -188,6 +190,7 @@ public ErrorMessage getErrorMessage() {
* @since 5.3.0
*/
@SuppressWarnings("serial")
@Deprecated
public class EmptyValueException extends Validator.InvalidValueException {

public EmptyValueException(String message) {
Expand Down
Expand Up @@ -26,6 +26,7 @@
import com.vaadin.v7.data.validator.BeanValidator;
import com.vaadin.v7.ui.Field;

@Deprecated
public class BeanFieldGroup<T> extends FieldGroup {

private final Class<T> beanType;
Expand All @@ -35,7 +36,7 @@ public class BeanFieldGroup<T> extends FieldGroup {

public BeanFieldGroup(Class<T> beanType) {
this.beanType = beanType;
this.defaultValidators = new HashMap<Field<?>, BeanValidator>();
this.defaultValidators = new HashMap<>();
}

@Override
Expand Down Expand Up @@ -116,7 +117,7 @@ public void setItemDataSource(T bean) {
if (bean == null) {
setItemDataSource((Item) null);
} else {
setItemDataSource(new BeanItem<T>(bean, beanType));
setItemDataSource(new BeanItem<>(bean, beanType));
}
}

Expand Down Expand Up @@ -259,7 +260,7 @@ public static <T> BeanFieldGroup<T> bindFieldsBuffered(T bean,
private static <T> BeanFieldGroup<T> createAndBindFields(T bean,
Object objectWithMemberFields, boolean buffered) {
@SuppressWarnings("unchecked")
BeanFieldGroup<T> beanFieldGroup = new BeanFieldGroup<T>(
BeanFieldGroup<T> beanFieldGroup = new BeanFieldGroup<>(
(Class<T>) bean.getClass());
beanFieldGroup.setItemDataSource(bean);
beanFieldGroup.setBuffered(buffered);
Expand Down

0 comments on commit cef5b51

Please sign in to comment.