diff options
author | Denis Anisimov <denis@vaadin.com> | 2016-09-22 15:28:36 +0300 |
---|---|---|
committer | Denis Anisimov <denis@vaadin.com> | 2016-09-23 10:48:21 +0000 |
commit | cef5b51d3ff0792ab0a8a8423549dbff79e3027b (patch) | |
tree | c9bbb66e27efcbc4e2a23329435857c5ebb8e564 /compatibility-server/src/main/java/com/vaadin | |
parent | 78130f1884d8ee7e55d0c19578c5088de2a34bba (diff) | |
download | vaadin-framework-cef5b51d3ff0792ab0a8a8423549dbff79e3027b.tar.gz vaadin-framework-cef5b51d3ff0792ab0a8a8423549dbff79e3027b.zip |
Mark all server compatibility classes deprecated (#144).
Change-Id: Iba0a35d5ea9a97b0020f506f610630471c59748b
Diffstat (limited to 'compatibility-server/src/main/java/com/vaadin')
184 files changed, 639 insertions, 256 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java index 025a43fbba..2bd55555b3 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Buffered.java @@ -46,6 +46,7 @@ import com.vaadin.v7.data.Validator.InvalidValueException; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated public interface Buffered extends Serializable { /** @@ -115,6 +116,7 @@ public interface Buffered extends Serializable { * @since 3.0 */ @SuppressWarnings("serial") + @Deprecated public class SourceException extends RuntimeException implements Serializable, ErrorMessageProducer { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java b/compatibility-server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java index ea0b3c0ebd..bbae982d1a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/BufferedValidatable.java @@ -28,6 +28,7 @@ import java.io.Serializable; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated public interface BufferedValidatable extends Buffered, Validatable, Serializable { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Collapsible.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Collapsible.java index a5d63c5a50..d48e8344c9 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Collapsible.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Collapsible.java @@ -37,6 +37,7 @@ import com.vaadin.v7.data.Container.Ordered; * <p> * */ +@Deprecated public interface Collapsible extends Hierarchical, Ordered { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java index 81a78378d7..5a73d360e4 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java @@ -80,6 +80,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException; * @author Vaadin Ltd * @since 3.0 */ +@Deprecated public interface Container extends Serializable { /** @@ -301,6 +302,7 @@ public interface Container extends Serializable { * {@link Sortable} for more information. * </p> */ + @Deprecated public interface Ordered extends Container { /** @@ -424,6 +426,7 @@ public interface Container extends Serializable { * change the internal order of items in the container. * </p> */ + @Deprecated public interface Sortable extends Ordered { /** @@ -468,6 +471,7 @@ public interface Container extends Serializable { * position based on sorting. * </p> */ + @Deprecated public interface Indexed extends Ordered { /** @@ -588,6 +592,7 @@ public interface Container extends Serializable { * * @since 7.4 */ + @Deprecated public interface ItemAddEvent extends ItemSetChangeEvent { /** @@ -618,6 +623,7 @@ public interface Container extends Serializable { * * @since 7.4 */ + @Deprecated public interface ItemRemoveEvent extends ItemSetChangeEvent { /** * Gets the item id of the first removed item. @@ -655,6 +661,7 @@ public interface Container extends Serializable { * unable to have children. * </ul> */ + @Deprecated public interface Hierarchical extends Container { /** @@ -849,6 +856,7 @@ public interface Container extends Serializable { * * @since 5.0 (renamed from Filterable to SimpleFilterable in 6.6) */ + @Deprecated public interface SimpleFilterable extends Container, Serializable { /** @@ -913,6 +921,7 @@ public interface Container extends Serializable { * * @since 6.6 */ + @Deprecated public interface Filter extends Serializable { /** @@ -985,6 +994,7 @@ public interface Container extends Serializable { * * @since 6.6 */ + @Deprecated public interface Filterable extends Container, Serializable { /** * Adds a filter for the container. @@ -1026,6 +1036,7 @@ public interface Container extends Serializable { * Interface implemented by viewer classes capable of using a Container as a * data source. */ + @Deprecated public interface Viewer extends Serializable { /** @@ -1057,6 +1068,7 @@ public interface Container extends Serializable { * internally. * </p> */ + @Deprecated public interface Editor extends Container.Viewer, Serializable { } @@ -1069,6 +1081,7 @@ public interface Container extends Serializable { * * A simple property value change is not an item set change. */ + @Deprecated public interface ItemSetChangeEvent extends Serializable { /** @@ -1085,6 +1098,7 @@ public interface Container 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 { /** @@ -1115,6 +1129,7 @@ public interface Container extends Serializable { * be able to implement an interface. * </p> */ + @Deprecated public interface ItemSetChangeNotifier extends Serializable { /** @@ -1161,6 +1176,7 @@ public interface Container extends Serializable { * items in the container and their property values are not property set * changes. */ + @Deprecated public interface PropertySetChangeEvent extends Serializable { /** @@ -1180,6 +1196,7 @@ public interface Container 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 { /** @@ -1217,6 +1234,7 @@ public interface Container extends Serializable { * be able to implement an interface. * </p> */ + @Deprecated public interface PropertySetChangeNotifier extends Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java b/compatibility-server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java index c782f33133..1f324c86d7 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/ContainerHelpers.java @@ -28,6 +28,7 @@ import com.vaadin.v7.data.Container.Indexed; * * @since 7.0 */ +@Deprecated public class ContainerHelpers implements Serializable { /** @@ -83,7 +84,7 @@ public class ContainerHelpers implements Serializable { 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) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Item.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Item.java index d90cdca3f7..b8c0b0c347 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Item.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Item.java @@ -29,6 +29,7 @@ import java.util.Collection; * @author Vaadin Ltd * @since 3.0 */ +@Deprecated public interface Item extends Serializable { /** @@ -89,6 +90,7 @@ public interface Item extends Serializable { * Interface implemented by viewer classes capable of using an Item as a * data source. */ + @Deprecated public interface Viewer extends Serializable { /** @@ -116,6 +118,7 @@ public interface Item extends Serializable { * restrict the class from editing the contents of an internally. * </p> */ + @Deprecated public interface Editor extends Item.Viewer, Serializable { } @@ -130,6 +133,7 @@ public interface Item extends Serializable { * this event. * </p> */ + @Deprecated public interface PropertySetChangeEvent extends Serializable { /** @@ -144,6 +148,7 @@ public interface Item extends Serializable { * The listener interface for receiving <code>PropertySetChangeEvent</code> * objects. */ + @Deprecated public interface PropertySetChangeListener extends Serializable { /** @@ -169,6 +174,7 @@ public interface Item extends Serializable { * be able to implement an interface. * </p> */ + @Deprecated public interface PropertySetChangeNotifier extends Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Property.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Property.java index 21129a64f9..d99f1dd844 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Property.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Property.java @@ -48,6 +48,7 @@ import java.io.Serializable; * @author Vaadin Ltd * @since 3.0 */ +@Deprecated public interface Property<T> extends Serializable { /** @@ -125,6 +126,7 @@ public interface Property<T> extends Serializable { * @author Vaadin Ltd * @since 7.0 */ + @Deprecated public interface Transactional<T> extends Property<T> { /** @@ -178,6 +180,7 @@ public interface Property<T> extends Serializable { * @since 3.0 */ @SuppressWarnings("serial") + @Deprecated public class ReadOnlyException extends RuntimeException { /** @@ -206,6 +209,7 @@ public interface Property<T> extends Serializable { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface Viewer extends Serializable { /** @@ -238,6 +242,7 @@ public interface Property<T> extends Serializable { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface Editor extends Property.Viewer, Serializable { } @@ -251,6 +256,7 @@ public interface Property<T> extends Serializable { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface ValueChangeEvent extends Serializable { /** @@ -268,6 +274,7 @@ public interface Property<T> extends Serializable { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface ValueChangeListener extends Serializable { /** @@ -296,6 +303,7 @@ public interface Property<T> extends Serializable { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface ValueChangeNotifier extends Serializable { /** @@ -340,6 +348,7 @@ public interface Property<T> extends Serializable { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface ReadOnlyStatusChangeEvent extends Serializable { /** @@ -357,6 +366,7 @@ public interface Property<T> extends Serializable { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface ReadOnlyStatusChangeListener extends Serializable { /** @@ -387,6 +397,7 @@ public interface Property<T> extends Serializable { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface ReadOnlyStatusChangeNotifier extends Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Validatable.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Validatable.java index 5c75d594ba..6da32d852a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Validatable.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Validatable.java @@ -30,6 +30,7 @@ import java.util.Collection; * @since 3.0 * @see com.vaadin.v7.data.Validator */ +@Deprecated public interface Validatable extends Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java index a6ad0331ed..9d7e6032fc 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Validator.java @@ -53,6 +53,7 @@ import com.vaadin.server.VaadinServlet; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated public interface Validator extends Serializable { /** @@ -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 { @@ -188,6 +190,7 @@ public interface Validator extends Serializable { * @since 5.3.0 */ @SuppressWarnings("serial") + @Deprecated public class EmptyValueException extends Validator.InvalidValueException { public EmptyValueException(String message) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java index 839d90344c..f5d70fbee0 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java @@ -26,6 +26,7 @@ import com.vaadin.v7.data.util.BeanItem; 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; @@ -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 @@ -116,7 +117,7 @@ public class BeanFieldGroup<T> extends FieldGroup { if (bean == null) { setItemDataSource((Item) null); } else { - setItemDataSource(new BeanItem<T>(bean, beanType)); + setItemDataSource(new BeanItem<>(bean, beanType)); } } @@ -259,7 +260,7 @@ public class BeanFieldGroup<T> extends FieldGroup { 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); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/Caption.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/Caption.java index 0042cd8113..a2512de33b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/Caption.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/Caption.java @@ -22,6 +22,7 @@ import java.lang.annotation.Target; @Target({ ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) +@Deprecated public @interface Caption { String value(); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java index f488a03747..0fd03c21ad 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactory.java @@ -43,6 +43,7 @@ import com.vaadin.v7.ui.TextField; * * @author Vaadin Ltd */ +@Deprecated public class DefaultFieldGroupFieldFactory implements FieldGroupFieldFactory { private static final DefaultFieldGroupFieldFactory INSTANCE = new DefaultFieldGroupFieldFactory(); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java index 924ded1654..50ad9a843a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java @@ -51,6 +51,7 @@ import com.vaadin.v7.ui.Field; * @author Vaadin Ltd * @since 7.0 */ +@Deprecated public class FieldGroup implements Serializable { private Item itemDataSource; @@ -59,9 +60,9 @@ public class FieldGroup implements Serializable { private boolean enabled = true; private boolean readOnly = false; - private HashMap<Object, Field<?>> propertyIdToField = new HashMap<Object, Field<?>>(); - private LinkedHashMap<Field<?>, Object> fieldToPropertyId = new LinkedHashMap<Field<?>, Object>(); - private List<CommitHandler> commitHandlers = new ArrayList<CommitHandler>(); + private HashMap<Object, Field<?>> propertyIdToField = new HashMap<>(); + private LinkedHashMap<Field<?>, Object> fieldToPropertyId = new LinkedHashMap<>(); + private List<CommitHandler> commitHandlers = new ArrayList<>(); /** * The field factory used by builder methods. @@ -281,7 +282,7 @@ public class FieldGroup implements Serializable { */ protected <T> Property.Transactional<T> wrapInTransactionalProperty( Property<T> itemProperty) { - return new TransactionalPropertyWrapper<T>(itemProperty); + return new TransactionalPropertyWrapper<>(itemProperty); } private void throwIfFieldIsNull(Field<?> field, Object propertyId) { @@ -440,9 +441,9 @@ public class FieldGroup implements Serializable { */ public Collection<Object> getUnboundPropertyIds() { if (getItemDataSource() == null) { - return new ArrayList<Object>(); + return new ArrayList<>(); } - List<Object> unboundPropertyIds = new ArrayList<Object>(); + List<Object> unboundPropertyIds = new ArrayList<>(); unboundPropertyIds.addAll(getItemDataSource().getItemPropertyIds()); unboundPropertyIds.removeAll(propertyIdToField.keySet()); return unboundPropertyIds; @@ -495,7 +496,7 @@ public class FieldGroup implements Serializable { * commits succeeded */ private Map<Field<?>, InvalidValueException> commitFields() { - Map<Field<?>, InvalidValueException> invalidValueExceptions = new HashMap<Field<?>, InvalidValueException>(); + Map<Field<?>, InvalidValueException> invalidValueExceptions = new HashMap<>(); for (Field<?> f : fieldToPropertyId.keySet()) { try { @@ -514,6 +515,7 @@ public class FieldGroup implements Serializable { * * @since 7.4 */ + @Deprecated public static class FieldGroupInvalidValueException extends InvalidValueException { private Map<Field<?>, InvalidValueException> invalidValueExceptions; @@ -691,6 +693,7 @@ public class FieldGroup implements Serializable { * of the commit and cause the commit to be aborted by throwing a * {@link CommitException}. */ + @Deprecated public interface CommitHandler extends Serializable { /** * Called before changes are committed to the field and the item is @@ -723,6 +726,7 @@ public class FieldGroup implements Serializable { * FIXME javadoc * */ + @Deprecated public static class CommitEvent implements Serializable { private FieldGroup fieldBinder; @@ -1047,6 +1051,7 @@ public class FieldGroup implements Serializable { * fields did not pass validation * */ + @Deprecated public static class CommitException extends Exception { private FieldGroup fieldGroup; @@ -1086,7 +1091,7 @@ public class FieldGroup implements Serializable { return ((FieldGroupInvalidValueException) getCause()) .getInvalidFields(); } - return new HashMap<Field<?>, InvalidValueException>(); + return new HashMap<>(); } /** @@ -1101,6 +1106,7 @@ public class FieldGroup implements Serializable { } + @Deprecated public static class BindException extends RuntimeException { public BindException(String message) { @@ -1113,6 +1119,7 @@ public class FieldGroup implements Serializable { } + @Deprecated public static class SearchException extends RuntimeException { public SearchException(String message) { @@ -1226,7 +1233,7 @@ public class FieldGroup implements Serializable { */ protected static List<java.lang.reflect.Field> getFieldsInDeclareOrder( Class searchClass) { - ArrayList<java.lang.reflect.Field> memberFieldInOrder = new ArrayList<java.lang.reflect.Field>(); + ArrayList<java.lang.reflect.Field> memberFieldInOrder = new ArrayList<>(); while (searchClass != null) { for (java.lang.reflect.Field memberField : searchClass diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java index c6b1d18962..cf9c4d8fcc 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java @@ -26,6 +26,7 @@ import com.vaadin.v7.ui.Field; * @author Vaadin Ltd. * @since 7.0 */ +@Deprecated public interface FieldGroupFieldFactory extends Serializable { /** * Creates a field based on the data type that we want to edit diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java index 3f9bbcdb20..f9b22074f0 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java @@ -57,6 +57,7 @@ import com.vaadin.v7.ui.Field; */ @Target({ ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) +@Deprecated public @interface PropertyId { String value(); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java index ce984572c2..86197c5279 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java @@ -60,6 +60,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException; * * @since 6.5 */ +@Deprecated public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> extends AbstractInMemoryContainer<IDTYPE, String, BeanItem<BEANTYPE>> implements Filterable, SimpleFilterable, Sortable, ValueChangeListener, @@ -78,6 +79,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> * * @since 6.5 */ + @Deprecated public static interface BeanIdResolver<IDTYPE, BEANTYPE> extends Serializable { /** @@ -95,6 +97,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> * The bean must have a getter for the property, and the getter must return * an object of type IDTYPE. */ + @Deprecated protected class PropertyBasedBeanIdResolver implements BeanIdResolver<IDTYPE, BEANTYPE> { @@ -141,7 +144,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> * Maps all item ids in the container (including filtered) to their * corresponding BeanItem. */ - private final Map<IDTYPE, BeanItem<BEANTYPE>> itemIdToItem = new HashMap<IDTYPE, BeanItem<BEANTYPE>>(); + private final Map<IDTYPE, BeanItem<BEANTYPE>> itemIdToItem = new HashMap<>(); /** * The type of the beans in the container. @@ -193,7 +196,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> * @return created {@link BeanItem} or null if bean is null */ protected BeanItem<BEANTYPE> createBeanItem(BEANTYPE bean) { - return bean == null ? null : new BeanItem<BEANTYPE>(bean, model); + return bean == null ? null : new BeanItem<>(bean, model); } /** @@ -889,7 +892,7 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> .getPropertyDescriptors((Class<Object>) propertyType); for (String subPropertyId : pds.keySet()) { String qualifiedPropertyId = propertyId + "." + subPropertyId; - NestedPropertyDescriptor<BEANTYPE> pd = new NestedPropertyDescriptor<BEANTYPE>( + NestedPropertyDescriptor<BEANTYPE> pd = new NestedPropertyDescriptor<>( qualifiedPropertyId, (Class<BEANTYPE>) type); model.put(qualifiedPropertyId, pd); model.remove(propertyId); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractContainer.java index f57da653a5..8bfd536a8d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractContainer.java @@ -37,6 +37,7 @@ import com.vaadin.v7.data.Container; * * @since 6.6 */ +@Deprecated public abstract class AbstractContainer implements Container { /** @@ -57,6 +58,7 @@ public abstract class AbstractContainer implements Container { * concerned by the change, but subclasses can provide additional * information about the changes. */ + @Deprecated protected static class BasePropertySetChangeEvent extends EventObject implements Container.PropertySetChangeEvent, Serializable { @@ -78,6 +80,7 @@ public abstract class AbstractContainer implements Container { * performed, but subclasses can add provide additional information about * the changes. */ + @Deprecated protected static class BaseItemSetChangeEvent extends EventObject implements Container.ItemSetChangeEvent, Serializable { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java index 78c908f78a..2adb3c9617 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractInMemoryContainer.java @@ -93,6 +93,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException; * * @since 6.6 */ +@Deprecated public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITEMCLASS extends Item> extends AbstractContainer implements ItemSetChangeNotifier, Container.Indexed { @@ -120,7 +121,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE * Filters that are applied to the container to limit the items visible in * it */ - private Set<Filter> filters = new HashSet<Filter>(); + private Set<Filter> filters = new HashSet<>(); /** * The item sorter which is used for sorting the container. @@ -190,6 +191,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE * * @since 7.4 */ + @Deprecated protected static class BaseItemAddEvent extends BaseItemAddOrRemoveEvent implements Container.Indexed.ItemAddEvent { @@ -215,6 +217,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE * * @since 7.4 */ + @Deprecated protected static class BaseItemRemoveEvent extends BaseItemAddOrRemoveEvent implements Container.Indexed.ItemRemoveEvent { @@ -670,7 +673,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE if (getFilters().isEmpty() || propertyId == null) { return Collections.emptyList(); } - List<Filter> removedFilters = new LinkedList<Filter>(); + List<Filter> removedFilters = new LinkedList<>(); for (Iterator<Filter> iterator = getFilters().iterator(); iterator .hasNext();) { Filter f = iterator.next(); @@ -760,7 +763,7 @@ public abstract class AbstractInMemoryContainer<ITEMIDTYPE, PROPERTYIDCLASS, ITE * to implement {@link Sortable#getSortableContainerPropertyIds()}. */ protected Collection<?> getSortablePropertyIds() { - LinkedList<Object> sortables = new LinkedList<Object>(); + LinkedList<Object> sortables = new LinkedList<>(); for (Object propertyId : getContainerPropertyIds()) { Class<?> propertyType = getType(propertyId); if (Comparable.class.isAssignableFrom(propertyType) diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java index 33d22777ad..998c1efc73 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java @@ -30,6 +30,7 @@ import com.vaadin.v7.data.Property; * * @since 6.6 */ +@Deprecated public abstract class AbstractProperty<T> implements Property<T>, Property.ValueChangeNotifier, Property.ReadOnlyStatusChangeNotifier { @@ -75,6 +76,7 @@ public abstract class AbstractProperty<T> implements Property<T>, * An <code>Event</code> object specifying the Property whose read-only * status has been changed. */ + @Deprecated protected static class ReadOnlyStatusChangeEvent extends java.util.EventObject implements Property.ReadOnlyStatusChangeEvent { @@ -111,7 +113,7 @@ public abstract class AbstractProperty<T> implements Property<T>, public void addReadOnlyStatusChangeListener( Property.ReadOnlyStatusChangeListener listener) { if (readOnlyStatusChangeListeners == null) { - readOnlyStatusChangeListeners = new LinkedList<ReadOnlyStatusChangeListener>(); + readOnlyStatusChangeListeners = new LinkedList<>(); } readOnlyStatusChangeListeners.add(listener); } @@ -197,7 +199,7 @@ public abstract class AbstractProperty<T> implements Property<T>, @Override public void addValueChangeListener(ValueChangeListener listener) { if (valueChangeListeners == null) { - valueChangeListeners = new LinkedList<ValueChangeListener>(); + valueChangeListeners = new LinkedList<>(); } valueChangeListeners.add(listener); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java index 0b08264fc5..5b7bdc199a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java @@ -68,6 +68,7 @@ import java.util.Collection; * * @since 6.5 */ +@Deprecated public class BeanContainer<IDTYPE, BEANTYPE> extends AbstractBeanContainer<IDTYPE, BEANTYPE> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java index 78ec807fd1..8bba865ffc 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java @@ -35,6 +35,7 @@ import com.vaadin.data.util.BeanUtil; * @since 3.0 */ @SuppressWarnings("serial") +@Deprecated public class BeanItem<BT> extends PropertysetItem { /** @@ -185,7 +186,7 @@ public class BeanItem<BT> extends PropertysetItem { */ static <BT> LinkedHashMap<String, VaadinPropertyDescriptor<BT>> getPropertyDescriptors( final Class<BT> beanClass) { - final LinkedHashMap<String, VaadinPropertyDescriptor<BT>> pdMap = new LinkedHashMap<String, VaadinPropertyDescriptor<BT>>(); + final LinkedHashMap<String, VaadinPropertyDescriptor<BT>> pdMap = new LinkedHashMap<>(); // Try to introspect, if it fails, we just have an empty Item try { @@ -198,7 +199,7 @@ public class BeanItem<BT> extends PropertysetItem { final Method getMethod = pd.getReadMethod(); if ((getMethod != null) && getMethod.getDeclaringClass() != Object.class) { - VaadinPropertyDescriptor<BT> vaadinPropertyDescriptor = new MethodPropertyDescriptor<BT>( + VaadinPropertyDescriptor<BT> vaadinPropertyDescriptor = new MethodPropertyDescriptor<>( pd.getName(), pd.getPropertyType(), pd.getReadMethod(), pd.getWriteMethod()); pdMap.put(pd.getName(), vaadinPropertyDescriptor); @@ -222,7 +223,7 @@ public class BeanItem<BT> extends PropertysetItem { * not specified */ public void expandProperty(String propertyId, String... subPropertyIds) { - Set<String> subPropertySet = new HashSet<String>( + Set<String> subPropertySet = new HashSet<>( Arrays.asList(subPropertyIds)); if (0 == subPropertyIds.length) { @@ -251,7 +252,7 @@ public class BeanItem<BT> extends PropertysetItem { */ public void addNestedProperty(String nestedPropertyId) { addItemProperty(nestedPropertyId, - new NestedMethodProperty<Object>(getBean(), nestedPropertyId)); + new NestedMethodProperty<>(getBean(), nestedPropertyId)); } /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java index de8d6d1cf0..b5e2f6edda 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java @@ -51,6 +51,7 @@ import java.util.Collection; * * @since 5.4 */ +@Deprecated @SuppressWarnings("serial") public class BeanItemContainer<BEANTYPE> extends AbstractBeanContainer<BEANTYPE, BEANTYPE> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java index 308a1e9fd2..8ea613b662 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerHierarchicalWrapper.java @@ -47,6 +47,7 @@ import com.vaadin.v7.data.Property; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated @SuppressWarnings("serial") public class ContainerHierarchicalWrapper implements Container.Hierarchical, Container.ItemSetChangeNotifier, Container.PropertySetChangeNotifier { @@ -118,10 +119,10 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, // Create initial order if needed if (!hierarchical) { - noChildrenAllowed = new HashSet<Object>(); - parent = new Hashtable<Object, Object>(); - children = new Hashtable<Object, LinkedList<Object>>(); - roots = new LinkedHashSet<Object>(container.getItemIds()); + noChildrenAllowed = new HashSet<>(); + parent = new Hashtable<>(); + children = new Hashtable<>(); + roots = new LinkedHashSet<>(container.getItemIds()); } updateHierarchicalWrapper(); @@ -141,10 +142,10 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, // Recreate hierarchy and data structures if missing if (noChildrenAllowed == null || parent == null || children == null || roots == null) { - noChildrenAllowed = new HashSet<Object>(); - parent = new Hashtable<Object, Object>(); - children = new Hashtable<Object, LinkedList<Object>>(); - roots = new LinkedHashSet<Object>(container.getItemIds()); + noChildrenAllowed = new HashSet<>(); + parent = new Hashtable<>(); + children = new Hashtable<>(); + roots = new LinkedHashSet<>(container.getItemIds()); } // Check that the hierarchy is up-to-date @@ -157,7 +158,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, itemIds); // Calculate the set of all items in the hierarchy - final HashSet<Object> s = new HashSet<Object>(); + final HashSet<Object> s = new HashSet<>(); s.addAll(parent.keySet()); s.addAll(children.keySet()); s.addAll(roots); @@ -182,7 +183,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, Object[] array = roots.toArray(); Arrays.sort(array, basedOnOrderFromWrappedContainer); - roots = new LinkedHashSet<Object>(); + roots = new LinkedHashSet<>(); for (int i = 0; i < array.length; i++) { roots.add(array[i]); } @@ -475,7 +476,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, parent.put(itemId, newParentId); LinkedList<Object> pcl = children.get(newParentId); if (pcl == null) { - pcl = new LinkedList<Object>(); + pcl = new LinkedList<>(); children.put(newParentId, pcl); } pcl.add(itemId); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java index 9ac8038f03..00e580f9c5 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ContainerOrderedWrapper.java @@ -43,6 +43,7 @@ import com.vaadin.v7.data.Property; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated @SuppressWarnings("serial") public class ContainerOrderedWrapper implements Container.Ordered, Container.ItemSetChangeNotifier, Container.PropertySetChangeNotifier { @@ -215,12 +216,12 @@ public class ContainerOrderedWrapper implements Container.Ordered, if (next == null || first == null || last == null || prev == null) { first = null; last = null; - next = new Hashtable<Object, Object>(); - prev = new Hashtable<Object, Object>(); + next = new Hashtable<>(); + prev = new Hashtable<>(); } // Filter out all the missing items - final LinkedList<?> l = new LinkedList<Object>(next.keySet()); + final LinkedList<?> l = new LinkedList<>(next.keySet()); for (final Iterator<?> i = l.iterator(); i.hasNext();) { final Object id = i.next(); if (!container.containsId(id)) { @@ -469,9 +470,9 @@ public class ContainerOrderedWrapper implements Container.Ordered, if (ordered) { return ((Container.Ordered) container).getItemIds(); } else if (first == null) { - return new ArrayList<Object>(); + return new ArrayList<>(); } else { - List<Object> itemIds = new ArrayList<Object>(); + List<Object> itemIds = new ArrayList<>(); itemIds.add(first); Object current = first; while (next.containsKey(current)) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java index 446c2b50ce..7f1fe574c8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java @@ -38,6 +38,7 @@ import com.vaadin.v7.data.Property; * provided a default comparator is used. * */ +@Deprecated public class DefaultItemSorter implements ItemSorter { private java.lang.Object[] sortPropertyIds; @@ -165,8 +166,8 @@ public class DefaultItemSorter implements ItemSorter { this.container = container; // Removes any non-sortable property ids - final List<Object> ids = new ArrayList<Object>(); - final List<Boolean> orders = new ArrayList<Boolean>(); + final List<Object> ids = new ArrayList<>(); + final List<Boolean> orders = new ArrayList<>(); final Collection<?> sortable = container .getSortableContainerPropertyIds(); for (int i = 0; i < propertyId.length; i++) { @@ -191,6 +192,7 @@ public class DefaultItemSorter implements ItemSorter { * compares can be cast to Comparable. * */ + @Deprecated public static class DefaultPropertyValueComparator implements Comparator<Object>, Serializable { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java index 7800a6ff50..f0a2fff8af 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/FilesystemContainer.java @@ -42,6 +42,7 @@ import com.vaadin.v7.data.Property; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated @SuppressWarnings("serial") public class FilesystemContainer implements Container.Hierarchical { @@ -80,7 +81,7 @@ public class FilesystemContainer implements Container.Hierarchical { static { - FILE_PROPERTIES = new ArrayList<String>(); + FILE_PROPERTIES = new ArrayList<>(); FILE_PROPERTIES.add(PROPERTY_NAME); FILE_PROPERTIES.add(PROPERTY_ICON); FILE_PROPERTIES.add(PROPERTY_SIZE); @@ -440,7 +441,7 @@ public class FilesystemContainer implements Container.Hierarchical { public Collection<File> getItemIds() { if (recursive) { - final Collection<File> col = new ArrayList<File>(); + final Collection<File> col = new ArrayList<>(); for (int i = 0; i < roots.length; i++) { addItemIds(col, roots[i]); } @@ -614,6 +615,7 @@ public class FilesystemContainer implements Container.Hierarchical { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public class FileItem implements Item { /** @@ -769,6 +771,7 @@ public class FilesystemContainer implements Container.Hierarchical { * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public class FileExtensionFilter implements FilenameFilter, Serializable { private final String filter; 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 cfa061db02..f27b651b50 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 @@ -59,6 +59,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class GeneratedPropertyContainer extends AbstractContainer implements Container.Indexed, Container.Sortable, Container.Filterable, Container.PropertySetChangeNotifier, Container.ItemSetChangeNotifier { @@ -70,11 +71,12 @@ public class GeneratedPropertyContainer extends AbstractContainer private Filterable filterableContainer = null; /* Removed properties which are hidden but not actually removed */ - private final Set<Object> removedProperties = new HashSet<Object>(); + private final Set<Object> removedProperties = new HashSet<>(); /** * Property implementation for generated properties */ + @Deprecated protected static class GeneratedProperty<T> implements Property<T> { private Item item; @@ -126,6 +128,7 @@ public class GeneratedPropertyContainer extends AbstractContainer * belongs to the wrapped container. To reach that Item use * {@link #getWrappedItem()} */ + @Deprecated public class GeneratedPropertyItem implements Item { private Item wrappedItem; @@ -147,7 +150,7 @@ public class GeneratedPropertyContainer extends AbstractContainer @Override public Collection<?> getItemPropertyIds() { - Set<Object> wrappedProperties = new LinkedHashSet<Object>( + Set<Object> wrappedProperties = new LinkedHashSet<>( wrappedItem.getItemPropertyIds()); wrappedProperties.removeAll(removedProperties); wrappedProperties.addAll(propertyGenerators.keySet()); @@ -217,6 +220,7 @@ public class GeneratedPropertyContainer extends AbstractContainer * event is fired from wrapped container and needs to be reconstructed to * act like it actually came from this container. */ + @Deprecated protected abstract class GeneratedItemAddOrRemoveEvent implements Serializable { @@ -248,6 +252,7 @@ public class GeneratedPropertyContainer extends AbstractContainer } }; + @Deprecated protected class GeneratedItemRemoveEvent extends GeneratedItemAddOrRemoveEvent implements ItemRemoveEvent { @@ -262,6 +267,7 @@ public class GeneratedPropertyContainer extends AbstractContainer } } + @Deprecated protected class GeneratedItemAddEvent extends GeneratedItemAddOrRemoveEvent implements ItemAddEvent { @@ -283,16 +289,17 @@ public class GeneratedPropertyContainer extends AbstractContainer * @param container * underlying indexed container */ + @Deprecated public GeneratedPropertyContainer(Container.Indexed container) { wrappedContainer = container; - propertyGenerators = new HashMap<Object, PropertyValueGenerator<?>>(); + propertyGenerators = new HashMap<>(); if (wrappedContainer instanceof Sortable) { sortableContainer = (Sortable) wrappedContainer; } if (wrappedContainer instanceof Filterable) { - activeFilters = new HashMap<Filter, List<Filter>>(); + activeFilters = new HashMap<>(); filterableContainer = (Filterable) wrappedContainer; } else { activeFilters = null; @@ -376,7 +383,7 @@ public class GeneratedPropertyContainer extends AbstractContainer private <T> Property<T> createProperty(final Item item, final Object propertyId, final Object itemId, final PropertyValueGenerator<T> generator) { - return new GeneratedProperty<T>(item, propertyId, itemId, generator); + return new GeneratedProperty<>(item, propertyId, itemId, generator); } /* Listener functionality */ @@ -433,7 +440,7 @@ public class GeneratedPropertyContainer extends AbstractContainer "Wrapped container is not filterable"); } - List<Filter> addedFilters = new ArrayList<Filter>(); + List<Filter> addedFilters = new ArrayList<>(); for (Entry<?, PropertyValueGenerator<?>> entry : propertyGenerators .entrySet()) { Object property = entry.getKey(); @@ -504,8 +511,8 @@ public class GeneratedPropertyContainer extends AbstractContainer return; } - List<Object> actualSortProperties = new ArrayList<Object>(); - List<Boolean> actualSortDirections = new ArrayList<Boolean>(); + List<Object> actualSortProperties = new ArrayList<>(); + List<Boolean> actualSortDirections = new ArrayList<>(); for (int i = 0; i < propertyId.length; ++i) { Object property = propertyId[i]; @@ -548,7 +555,7 @@ public class GeneratedPropertyContainer extends AbstractContainer return Collections.emptySet(); } - Set<Object> sortablePropertySet = new HashSet<Object>( + Set<Object> sortablePropertySet = new HashSet<>( sortableContainer.getSortableContainerPropertyIds()); for (Entry<?, PropertyValueGenerator<?>> entry : propertyGenerators .entrySet()) { @@ -625,7 +632,7 @@ public class GeneratedPropertyContainer extends AbstractContainer */ @Override public Collection<?> getContainerPropertyIds() { - Set<Object> wrappedProperties = new LinkedHashSet<Object>( + Set<Object> wrappedProperties = new LinkedHashSet<>( wrappedContainer.getContainerPropertyIds()); wrappedProperties.removeAll(removedProperties); wrappedProperties.addAll(propertyGenerators.keySet()); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainer.java index 04940918de..694e256c4d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainer.java @@ -36,6 +36,7 @@ import com.vaadin.v7.data.Item; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated @SuppressWarnings("serial") public class HierarchicalContainer extends IndexedContainer implements Container.Hierarchical { @@ -43,12 +44,12 @@ public class HierarchicalContainer extends IndexedContainer /** * Set of IDs of those contained Items that can't have children. */ - private final HashSet<Object> noChildrenAllowed = new HashSet<Object>(); + private final HashSet<Object> noChildrenAllowed = new HashSet<>(); /** * Mapping from Item ID to parent Item ID. */ - private final HashMap<Object, Object> parent = new HashMap<Object, Object>(); + private final HashMap<Object, Object> parent = new HashMap<>(); /** * Mapping from Item ID to parent Item ID for items included in the filtered @@ -59,7 +60,7 @@ public class HierarchicalContainer extends IndexedContainer /** * Mapping from Item ID to a list of child IDs. */ - private final HashMap<Object, LinkedList<Object>> children = new HashMap<Object, LinkedList<Object>>(); + private final HashMap<Object, LinkedList<Object>> children = new HashMap<>(); /** * Mapping from Item ID to a list of child IDs when filtered @@ -69,7 +70,7 @@ public class HierarchicalContainer extends IndexedContainer /** * List that contains all root elements of the container. */ - private final LinkedList<Object> roots = new LinkedList<Object>(); + private final LinkedList<Object> roots = new LinkedList<>(); /** * List that contains all filtered root elements of the container. @@ -324,7 +325,7 @@ public class HierarchicalContainer extends IndexedContainer if (pcl == null) { // Create an empty list for holding children if one were not // previously created - pcl = new LinkedList<Object>(); + pcl = new LinkedList<>(); children.put(newParentId, pcl); } pcl.add(itemId); @@ -712,14 +713,14 @@ public class HierarchicalContainer extends IndexedContainer } // Reset data structures - filteredRoots = new LinkedList<Object>(); - filteredChildren = new HashMap<Object, LinkedList<Object>>(); - filteredParent = new HashMap<Object, Object>(); + filteredRoots = new LinkedList<>(); + filteredChildren = new HashMap<>(); + filteredParent = new HashMap<>(); if (includeParentsWhenFiltering) { // Filter so that parents for items that match the filter are also // included - HashSet<Object> includedItems = new HashSet<Object>(); + HashSet<Object> includedItems = new HashSet<>(); for (Object rootId : roots) { if (filterIncludingParents(rootId, includedItems)) { filteredRoots.add(rootId); @@ -741,7 +742,7 @@ public class HierarchicalContainer extends IndexedContainer // match super.doFilterContainer(hasFilters); - LinkedHashSet<Object> filteredItemIds = new LinkedHashSet<Object>( + LinkedHashSet<Object> filteredItemIds = new LinkedHashSet<>( getItemIds()); for (Object itemId : filteredItemIds) { @@ -773,7 +774,7 @@ public class HierarchicalContainer extends IndexedContainer LinkedList<Object> parentToChildrenList = filteredChildren .get(parentItemId); if (parentToChildrenList == null) { - parentToChildrenList = new LinkedList<Object>(); + parentToChildrenList = new LinkedList<>(); filteredChildren.put(parentItemId, parentToChildrenList); } filteredParent.put(childItemId, parentItemId); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java index f25842aec9..f9afce4714 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/HierarchicalContainerOrderedWrapper.java @@ -26,6 +26,7 @@ import com.vaadin.v7.data.Container.Hierarchical; * * @see ContainerOrderedWrapper */ +@Deprecated @SuppressWarnings({ "serial" }) public class HierarchicalContainerOrderedWrapper extends ContainerOrderedWrapper implements Hierarchical { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/IndexedContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/IndexedContainer.java index cbec3a2327..57004d0d91 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/IndexedContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/IndexedContainer.java @@ -56,6 +56,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException; * @since 3.0 */ +@Deprecated @SuppressWarnings("serial") // item type is really IndexedContainerItem, but using Item not to show it in // public API @@ -70,23 +71,23 @@ public class IndexedContainer /** * Linked list of ordered Property IDs. */ - private ArrayList<Object> propertyIds = new ArrayList<Object>(); + private ArrayList<Object> propertyIds = new ArrayList<>(); /** * Property ID to type mapping. */ - private Hashtable<Object, Class<?>> types = new Hashtable<Object, Class<?>>(); + private Hashtable<Object, Class<?>> types = new Hashtable<>(); /** * Hash of Items, where each Item is implemented as a mapping from Property * ID to Property value. */ - private Hashtable<Object, Map<Object, Object>> items = new Hashtable<Object, Map<Object, Object>>(); + private Hashtable<Object, Map<Object, Object>> items = new Hashtable<>(); /** * Set of properties that are read-only. */ - private HashSet<Property<?>> readOnlyProperties = new HashSet<Property<?>>(); + private HashSet<Property<?>> readOnlyProperties = new HashSet<>(); /** * List of all Property value change event listeners listening all the @@ -208,7 +209,7 @@ public class IndexedContainer } // store for next rows if (defaultPropertyValues == null) { - defaultPropertyValues = new HashMap<Object, Object>(); + defaultPropertyValues = new HashMap<>(); } defaultPropertyValues.put(propertyId, defaultValue); } @@ -433,7 +434,7 @@ public class IndexedContainer @Override protected void registerNewItem(int index, Object newItemId, Item item) { - Hashtable<Object, Object> t = new Hashtable<Object, Object>(); + Hashtable<Object, Object> t = new Hashtable<>(); items.put(newItemId, t); addDefaultValues(t); } @@ -447,6 +448,7 @@ public class IndexedContainer * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public static class ItemSetChangeEvent extends BaseItemSetChangeEvent { private final int addedItemIndex; @@ -536,7 +538,7 @@ public class IndexedContainer @Override public void addValueChangeListener(Property.ValueChangeListener listener) { if (propertyValueChangeListeners == null) { - propertyValueChangeListeners = new LinkedList<Property.ValueChangeListener>(); + propertyValueChangeListeners = new LinkedList<>(); } propertyValueChangeListeners.add(listener); } @@ -653,19 +655,19 @@ public class IndexedContainer Object itemId, Property.ValueChangeListener listener) { if (listener != null) { if (singlePropertyValueChangeListeners == null) { - singlePropertyValueChangeListeners = new Hashtable<Object, Map<Object, List<Property.ValueChangeListener>>>(); + singlePropertyValueChangeListeners = new Hashtable<>(); } Map<Object, List<Property.ValueChangeListener>> propertySetToListenerListMap = singlePropertyValueChangeListeners .get(propertyId); if (propertySetToListenerListMap == null) { - propertySetToListenerListMap = new Hashtable<Object, List<Property.ValueChangeListener>>(); + propertySetToListenerListMap = new Hashtable<>(); singlePropertyValueChangeListeners.put(propertyId, propertySetToListenerListMap); } List<Property.ValueChangeListener> listenerList = propertySetToListenerListMap .get(itemId); if (listenerList == null) { - listenerList = new LinkedList<Property.ValueChangeListener>(); + listenerList = new LinkedList<>(); propertySetToListenerListMap.put(itemId, listenerList); } listenerList.add(listener); @@ -717,6 +719,7 @@ public class IndexedContainer * * @since 3.0 */ + @Deprecated class IndexedContainerItem implements Item { /** @@ -1098,15 +1101,11 @@ public class IndexedContainer ? (ListSet<Object>) ((ListSet<Object>) getAllItemIds()).clone() : null); nc.setItemSetChangeListeners(getItemSetChangeListeners() != null - ? new LinkedList<Container.ItemSetChangeListener>( - getItemSetChangeListeners()) - : null); + ? new LinkedList<>(getItemSetChangeListeners()) : null); nc.propertyIds = propertyIds != null ? (ArrayList<Object>) propertyIds.clone() : null; nc.setPropertySetChangeListeners(getPropertySetChangeListeners() != null - ? new LinkedList<Container.PropertySetChangeListener>( - getPropertySetChangeListeners()) - : null); + ? new LinkedList<>(getPropertySetChangeListeners()) : null); nc.propertyValueChangeListeners = propertyValueChangeListeners != null ? (LinkedList<Property.ValueChangeListener>) propertyValueChangeListeners .clone() @@ -1132,7 +1131,7 @@ public class IndexedContainer if (items == null) { nc.items = null; } else { - nc.items = new Hashtable<Object, Map<Object, Object>>(); + nc.items = new Hashtable<>(); for (final Iterator<?> i = items.keySet().iterator(); i .hasNext();) { final Object id = i.next(); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java index 9ca21ca137..8c541473e4 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ItemSorter.java @@ -26,6 +26,7 @@ import com.vaadin.v7.data.Container.Sortable; * The <code>ItemSorter</code> interface can be used in <code>Sortable</code> * implementations to provide a custom sorting method. */ +@Deprecated public interface ItemSorter extends Comparator<Object>, Cloneable, Serializable { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ListSet.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ListSet.java index 2fd182238d..7dbb40f1a0 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ListSet.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ListSet.java @@ -32,6 +32,7 @@ import java.util.Iterator; * * This class is subject to change and should not be used outside Vaadin core. */ +@Deprecated public class ListSet<E> extends ArrayList<E> { private HashSet<E> itemSet = null; @@ -39,22 +40,22 @@ public class ListSet<E> extends ArrayList<E> { * Contains a map from an element to the number of duplicates it has. Used * to temporarily allow duplicates in the list. */ - private HashMap<E, Integer> duplicates = new HashMap<E, Integer>(); + private HashMap<E, Integer> duplicates = new HashMap<>(); public ListSet() { super(); - itemSet = new HashSet<E>(); + itemSet = new HashSet<>(); } public ListSet(Collection<? extends E> c) { super(c); - itemSet = new HashSet<E>(c.size()); + itemSet = new HashSet<>(c.size()); itemSet.addAll(c); } public ListSet(int initialCapacity) { super(initialCapacity); - itemSet = new HashSet<E>(initialCapacity); + itemSet = new HashSet<>(initialCapacity); } // Delegate contains operations to the set @@ -184,7 +185,7 @@ public class ListSet<E> extends ArrayList<E> { @Override protected void removeRange(int fromIndex, int toIndex) { - HashSet<E> toRemove = new HashSet<E>(); + HashSet<E> toRemove = new HashSet<>(); for (int idx = fromIndex; idx < toIndex; idx++) { toRemove.add(get(idx)); } @@ -269,7 +270,7 @@ public class ListSet<E> extends ArrayList<E> { @Override public Object clone() { ListSet<E> v = (ListSet<E>) super.clone(); - v.itemSet = new HashSet<E>(itemSet); + v.itemSet = new HashSet<>(itemSet); return v; } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodProperty.java index 86fb0ae40d..1a68b14207 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodProperty.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodProperty.java @@ -59,6 +59,7 @@ import com.vaadin.v7.data.Property; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated @SuppressWarnings("serial") public class MethodProperty<T> extends AbstractProperty<T> { @@ -688,6 +689,7 @@ public class MethodProperty<T> extends AbstractProperty<T> { * @since 3.0 */ @SuppressWarnings("rawtypes") + @Deprecated // Exceptions cannot be parameterized, ever. public static class MethodException extends RuntimeException { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodPropertyDescriptor.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodPropertyDescriptor.java index dfffb5b189..7f98c5dd11 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodPropertyDescriptor.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodPropertyDescriptor.java @@ -33,6 +33,7 @@ import com.vaadin.v7.data.Property; * * @since 6.6 */ +@Deprecated public class MethodPropertyDescriptor<BT> implements VaadinPropertyDescriptor<BT> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedMethodProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedMethodProperty.java index 38bf7300aa..3f9236c4ac 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedMethodProperty.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedMethodProperty.java @@ -42,6 +42,7 @@ import com.vaadin.v7.data.util.MethodProperty.MethodException; * * @since 6.6 */ +@Deprecated public class NestedMethodProperty<T> extends AbstractProperty<T> { // needed for de-serialization @@ -124,7 +125,7 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> { private void initialize(Class<?> beanClass, String propertyName) throws IllegalArgumentException { - List<Method> getMethods = new ArrayList<Method>(); + List<Method> getMethods = new ArrayList<>(); String lastSimplePropertyName = propertyName; Class<?> lastClass = beanClass; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedPropertyDescriptor.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedPropertyDescriptor.java index 7bbf6253a5..e0c4e23d4b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedPropertyDescriptor.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedPropertyDescriptor.java @@ -29,6 +29,7 @@ import com.vaadin.v7.data.Property; * * @since 6.6 */ +@Deprecated public class NestedPropertyDescriptor<BT> implements VaadinPropertyDescriptor<BT> { @@ -49,7 +50,7 @@ public class NestedPropertyDescriptor<BT> public NestedPropertyDescriptor(String name, Class<BT> beanType) throws IllegalArgumentException { this.name = name; - NestedMethodProperty<?> property = new NestedMethodProperty<Object>( + NestedMethodProperty<?> property = new NestedMethodProperty<>( beanType, name); this.propertyType = property.getType(); } @@ -66,7 +67,7 @@ public class NestedPropertyDescriptor<BT> @Override public Property<?> createProperty(BT bean) { - return new NestedMethodProperty<Object>(bean, name); + return new NestedMethodProperty<>(bean, name); } } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ObjectProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ObjectProperty.java index cd9f6c36c7..3f3583ccdd 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/ObjectProperty.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/ObjectProperty.java @@ -26,6 +26,7 @@ import com.vaadin.v7.data.Property; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated @SuppressWarnings("serial") public class ObjectProperty<T> extends AbstractProperty<T> { 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 45fc33ebba..e49da158f8 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 @@ -31,6 +31,7 @@ import com.vaadin.v7.data.util.filter.UnsupportedFilterException; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public abstract class PropertyValueGenerator<T> implements Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java index 092cf3f36e..6663024dd0 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertysetItem.java @@ -35,6 +35,7 @@ import com.vaadin.v7.data.Property; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated @SuppressWarnings("serial") public class PropertysetItem implements Item, Item.PropertySetChangeNotifier, Cloneable { @@ -44,12 +45,12 @@ public class PropertysetItem /** * Mapping from property id to property. */ - private HashMap<Object, Property<?>> map = new HashMap<Object, Property<?>>(); + private HashMap<Object, Property<?>> map = new HashMap<>(); /** * List of all property ids to maintain the order. */ - private LinkedList<Object> list = new LinkedList<Object>(); + private LinkedList<Object> list = new LinkedList<>(); /** * List of property set modification listeners. @@ -204,7 +205,7 @@ public class PropertysetItem public void addPropertySetChangeListener( Item.PropertySetChangeListener listener) { if (propertySetChangeListeners == null) { - propertySetChangeListeners = new LinkedList<PropertySetChangeListener>(); + propertySetChangeListeners = new LinkedList<>(); } propertySetChangeListeners.add(listener); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java index ce5bed8968..031e557164 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/TextFileProperty.java @@ -37,6 +37,7 @@ import java.nio.charset.Charset; * are supported but only fire when setReadOnly(boolean) is explicitly called. * */ +@Deprecated @SuppressWarnings("serial") public class TextFileProperty extends AbstractProperty<String> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/TransactionalPropertyWrapper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/TransactionalPropertyWrapper.java index 21afa4bc92..c73f47c1b8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/TransactionalPropertyWrapper.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/TransactionalPropertyWrapper.java @@ -41,6 +41,7 @@ import com.vaadin.v7.data.Property.ValueChangeNotifier; * * @param <T> */ +@Deprecated public class TransactionalPropertyWrapper<T> extends AbstractProperty<T> implements ValueChangeNotifier, Property.Transactional<T> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/VaadinPropertyDescriptor.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/VaadinPropertyDescriptor.java index 71c562d425..5eb7df4c00 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/VaadinPropertyDescriptor.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/VaadinPropertyDescriptor.java @@ -30,6 +30,7 @@ import com.vaadin.v7.data.Property; * * @since 6.6 */ +@Deprecated public interface VaadinPropertyDescriptor<BT> extends Serializable { /** * Returns the name of the property. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java index bd9392ee01..702090aacd 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/AbstractStringToNumberConverter.java @@ -32,6 +32,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.1 */ +@Deprecated public abstract class AbstractStringToNumberConverter<T> implements Converter<String, T> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java index cad8897c15..881a66ed67 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/Converter.java @@ -129,6 +129,7 @@ public interface Converter<PRESENTATION, MODEL> extends Serializable { * @author Vaadin Ltd * @since 7.0 */ + @Deprecated public static class ConversionException extends RuntimeException { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java index 0a874f465f..a93489a0b4 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ConverterUtil.java @@ -20,6 +20,7 @@ import java.util.Locale; import com.vaadin.server.VaadinSession; +@Deprecated public class ConverterUtil implements Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java index 467b848988..a4130dc255 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToLongConverter.java @@ -25,6 +25,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ +@Deprecated public class DateToLongConverter implements Converter<Date, Long> { /* diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java index 5f25af89a6..315d5dcaab 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java @@ -32,6 +32,7 @@ import java.util.Locale; * @since 7.1 * @author Vaadin Ltd */ +@Deprecated public class DateToSqlDateConverter implements Converter<Date, java.sql.Date> { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java index 17925dc827..6c8cdeb454 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java @@ -35,6 +35,7 @@ import com.vaadin.server.VaadinSession; * @author Vaadin Ltd * @since 7.0 */ +@Deprecated public class DefaultConverterFactory implements ConverterFactory { private final static Logger log = Logger @@ -57,7 +58,7 @@ public class DefaultConverterFactory implements ConverterFactory { if (reverseConverter != null) { log.finest(getClass().getName() + " created a reverse " + reverseConverter.getClass()); - return new ReverseConverter<PRESENTATION, MODEL>(reverseConverter); + return new ReverseConverter<>(reverseConverter); } log.finest(getClass().getName() + " could not find a converter for " diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java index a7f6a3fec2..b0437e5706 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java @@ -30,6 +30,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ +@Deprecated public class ReverseConverter<PRESENTATION, MODEL> implements Converter<PRESENTATION, MODEL> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java index ff8649b7d8..ebd0622ef7 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigDecimalConverter.java @@ -34,6 +34,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.2 */ +@Deprecated public class StringToBigDecimalConverter extends AbstractStringToNumberConverter<BigDecimal> { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java index d645fd35ad..16df9268ec 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBigIntegerConverter.java @@ -35,6 +35,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.4 */ +@Deprecated public class StringToBigIntegerConverter extends AbstractStringToNumberConverter<BigInteger> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java index 3c3fb262e4..bf972867ce 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java @@ -33,6 +33,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ +@Deprecated public class StringToBooleanConverter implements Converter<String, Boolean> { private final String trueString; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java index e915a95550..f26921f62a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToByteConverter.java @@ -30,6 +30,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.4 */ +@Deprecated public class StringToByteConverter extends AbstractStringToNumberConverter<Byte> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java index e217f1ed52..96a35b25ab 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java @@ -38,6 +38,7 @@ import java.util.Locale; * * @author Vaadin Ltd */ +@Deprecated public class StringToCollectionConverter implements Converter<String, Collection> { @@ -202,6 +203,7 @@ public class StringToCollectionConverter * * @author Vaadin Ltd */ + @Deprecated public static class DefaultCollectionFactory implements CollectionFactory { @Override @@ -230,6 +232,7 @@ public class StringToCollectionConverter * * @author Vaadin Ltd */ + @Deprecated public interface CollectionFactory extends Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java index c809a6a8a7..5ab926c54a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java @@ -34,6 +34,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ +@Deprecated public class StringToDateConverter implements Converter<String, Date> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java index 1da06aa834..eda53c2541 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDoubleConverter.java @@ -33,6 +33,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ +@Deprecated public class StringToDoubleConverter extends AbstractStringToNumberConverter<Double> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java index 7562c12517..77ece19896 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java @@ -36,6 +36,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.4 */ +@Deprecated public class StringToEnumConverter implements Converter<String, Enum> { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java index e37cf89784..aeb7092b1b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToFloatConverter.java @@ -33,6 +33,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ +@Deprecated public class StringToFloatConverter extends AbstractStringToNumberConverter<Float> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java index 82dcf7e6b8..ecc381b338 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java @@ -30,6 +30,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ +@Deprecated public class StringToIntegerConverter extends AbstractStringToNumberConverter<Integer> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java index 29c129c3fd..2fee7273b7 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToLongConverter.java @@ -30,6 +30,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.2 */ +@Deprecated public class StringToLongConverter extends AbstractStringToNumberConverter<Long> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java index 71408eb53e..88dfd1e313 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToShortConverter.java @@ -30,6 +30,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.4 */ +@Deprecated public class StringToShortConverter extends AbstractStringToNumberConverter<Short> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/AbstractJunctionFilter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/AbstractJunctionFilter.java index 17b708a22c..da5e3f2d52 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/AbstractJunctionFilter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/AbstractJunctionFilter.java @@ -29,6 +29,7 @@ import com.vaadin.v7.data.Container.Filter; * * @since 6.6 */ +@Deprecated public abstract class AbstractJunctionFilter implements Filter { protected final Collection<Filter> filters; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/And.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/And.java index 53d9e03cb5..a791e1d42a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/And.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/And.java @@ -31,6 +31,7 @@ import com.vaadin.v7.data.Item; * * @since 6.6 */ +@Deprecated public final class And extends AbstractJunctionFilter { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Between.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Between.java index 3599b017ff..d7f4ef8f10 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Between.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Between.java @@ -21,6 +21,7 @@ import com.vaadin.shared.util.SharedUtil; import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.Item; +@Deprecated public class Between implements Filter { private final Object propertyId; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Compare.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Compare.java index 9724dc24b0..2eecad7b43 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Compare.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Compare.java @@ -33,8 +33,10 @@ import com.vaadin.v7.data.Property; * * @since 6.6 */ +@Deprecated public abstract class Compare implements Filter { + @Deprecated public enum Operation { EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL } @@ -54,6 +56,7 @@ public abstract class Compare implements Filter { * * @since 6.6 */ + @Deprecated public static final class Equal extends Compare { /** * Construct a filter that accepts items for which the identified @@ -86,6 +89,7 @@ public abstract class Compare implements Filter { * * @since 6.6 */ + @Deprecated public static final class Greater extends Compare { /** * Construct a filter that accepts items for which the identified @@ -119,6 +123,7 @@ public abstract class Compare implements Filter { * * @since 6.6 */ + @Deprecated public static final class Less extends Compare { /** * Construct a filter that accepts items for which the identified @@ -152,6 +157,7 @@ public abstract class Compare implements Filter { * * @since 6.6 */ + @Deprecated public static final class GreaterOrEqual extends Compare { /** * Construct a filter that accepts items for which the identified @@ -185,6 +191,7 @@ public abstract class Compare implements Filter { * * @since 6.6 */ + @Deprecated public static final class LessOrEqual extends Compare { /** * Construct a filter that accepts items for which the identified diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/IsNull.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/IsNull.java index e9c6fbce97..92551334b4 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/IsNull.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/IsNull.java @@ -26,6 +26,7 @@ import com.vaadin.v7.data.Property; * * @since 6.6 */ +@Deprecated public final class IsNull implements Filter { private final Object propertyId; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Like.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Like.java index 97aa4d1a4d..88d931e066 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Like.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Like.java @@ -18,6 +18,7 @@ package com.vaadin.v7.data.util.filter; import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.Item; +@Deprecated public class Like implements Filter { private final Object propertyId; private final String value; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Not.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Not.java index a5bb000a3f..1c8126f365 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Not.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Not.java @@ -26,6 +26,7 @@ import com.vaadin.v7.data.Item; * * @since 6.6 */ +@Deprecated public final class Not implements Filter { private final Filter filter; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Or.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Or.java index 4782d85052..e4720d69c2 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Or.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/Or.java @@ -31,6 +31,7 @@ import com.vaadin.v7.data.Item; * * @since 6.6 */ +@Deprecated public final class Or extends AbstractJunctionFilter { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/SimpleStringFilter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/SimpleStringFilter.java index c4681f37c9..d75d3719c7 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/SimpleStringFilter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/SimpleStringFilter.java @@ -35,6 +35,7 @@ import com.vaadin.v7.data.Property; * * @since 6.6 */ +@Deprecated public final class SimpleStringFilter implements Filter { final Object propertyId; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/UnsupportedFilterException.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/UnsupportedFilterException.java index 68e18da32a..13759f4c78 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/UnsupportedFilterException.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/filter/UnsupportedFilterException.java @@ -28,6 +28,7 @@ import java.io.Serializable; * * @since 6.6 */ +@Deprecated public class UnsupportedFilterException extends RuntimeException implements Serializable { public UnsupportedFilterException() { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheFlushNotifier.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheFlushNotifier.java index fe9af78922..6c6096a884 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheFlushNotifier.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheFlushNotifier.java @@ -29,13 +29,14 @@ import com.vaadin.v7.data.util.sqlcontainer.query.TableQuery; * CacheFlushNotifier is a simple static notification mechanism to inform other * SQLContainers that the contents of their caches may have become stale. */ +@Deprecated class CacheFlushNotifier implements Serializable { /* * SQLContainer instance reference list and dead reference queue. Used for * the cache flush notification feature. */ - private static List<WeakReference<SQLContainer>> allInstances = new ArrayList<WeakReference<SQLContainer>>(); - private static ReferenceQueue<SQLContainer> deadInstances = new ReferenceQueue<SQLContainer>(); + private static List<WeakReference<SQLContainer>> allInstances = new ArrayList<>(); + private static ReferenceQueue<SQLContainer> deadInstances = new ReferenceQueue<>(); /** * Adds the given SQLContainer to the cache flush notification receiver list @@ -46,7 +47,7 @@ class CacheFlushNotifier implements Serializable { public static void addInstance(SQLContainer c) { removeDeadReferences(); if (c != null) { - allInstances.add(new WeakReference<SQLContainer>(c, deadInstances)); + allInstances.add(new WeakReference<>(c, deadInstances)); } } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheMap.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheMap.java index f986e7db51..5618c26d18 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheMap.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheMap.java @@ -23,6 +23,7 @@ import java.util.Map; * number of items. In SQLContainer this is used for RowItem -cache. Cache size * will be two times the page length parameter of the container. */ +@Deprecated class CacheMap<K, V> extends LinkedHashMap<K, V> { private static final long serialVersionUID = 679999766473555231L; private int cacheLimit = SQLContainer.CACHE_RATIO diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java index d437cc9b33..3440179e6a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java @@ -31,6 +31,7 @@ import com.vaadin.v7.data.util.converter.Converter.ConversionException; * Note that depending on the QueryDelegate in use this does not necessarily map * into an actual column in a database table. */ +@Deprecated final public class ColumnProperty implements Property { private static final long serialVersionUID = -3694463129581802457L; @@ -316,6 +317,7 @@ final public class ColumnProperty implements Property { * be set to <code>null</code>. */ @SuppressWarnings("serial") + @Deprecated public class NotNullableException extends RuntimeException { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/OptimisticLockException.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/OptimisticLockException.java index 887aa9c458..59f6739bc6 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/OptimisticLockException.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/OptimisticLockException.java @@ -30,6 +30,7 @@ import com.vaadin.v7.data.util.sqlcontainer.query.TableQuery; * * @author Jonatan Kronqvist / Vaadin Ltd */ +@Deprecated public class OptimisticLockException extends RuntimeException { private final RowId rowId; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ReadOnlyRowId.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ReadOnlyRowId.java index 2a6cca6fc6..1091d44fb2 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ReadOnlyRowId.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ReadOnlyRowId.java @@ -15,6 +15,7 @@ */ package com.vaadin.v7.data.util.sqlcontainer; +@Deprecated public class ReadOnlyRowId extends RowId { private static final long serialVersionUID = -2626764781642012467L; private final Integer rowNum; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/Reference.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/Reference.java index a80b07aca2..eb9097f9db 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/Reference.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/Reference.java @@ -23,6 +23,7 @@ import java.io.Serializable; * required, but it is recommended to make sure that certain constraints are * followed. */ +@Deprecated @SuppressWarnings("serial") class Reference implements Serializable { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowId.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowId.java index 0181dac2b3..81179fe62b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowId.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowId.java @@ -25,6 +25,7 @@ import java.util.Arrays; * the primary key columns of the identified row. This allows easy equals() * -comparison of RowItems. */ +@Deprecated public class RowId implements Serializable { private static final long serialVersionUID = -3161778404698901258L; protected Object[] id; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java index b8039e1e68..cf92fee19c 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java @@ -28,6 +28,7 @@ import com.vaadin.v7.data.Property; * Note that depending on the QueryDelegate in use this does not necessarily map * into an actual row in a database table. */ +@Deprecated public final class RowItem implements Item { private static final long serialVersionUID = -6228966439127951408L; private SQLContainer container; @@ -74,7 +75,7 @@ public final class RowItem implements Item { @Override public Collection<?> getItemPropertyIds() { - Collection<String> ids = new ArrayList<String>(properties.size()); + Collection<String> ids = new ArrayList<>(properties.size()); for (ColumnProperty cp : properties) { ids.add(cp.getPropertyId()); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java index b2d5b91746..1bb0c1a96a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java @@ -46,6 +46,7 @@ import com.vaadin.v7.data.util.sqlcontainer.query.TableQuery; import com.vaadin.v7.data.util.sqlcontainer.query.generator.MSSQLGenerator; import com.vaadin.v7.data.util.sqlcontainer.query.generator.OracleGenerator; +@Deprecated public class SQLContainer implements Container, Container.Filterable, Container.Indexed, Container.Sortable, Container.ItemSetChangeNotifier { @@ -65,20 +66,20 @@ public class SQLContainer implements Container, Container.Filterable, private int cacheOverlap = pageLength; /** Item and index caches */ - private final Map<Integer, RowId> itemIndexes = new HashMap<Integer, RowId>(); - private final CacheMap<RowId, RowItem> cachedItems = new CacheMap<RowId, RowItem>(); + private final Map<Integer, RowId> itemIndexes = new HashMap<>(); + private final CacheMap<RowId, RowItem> cachedItems = new CacheMap<>(); /** Container properties = column names, data types and statuses */ - private final List<String> propertyIds = new ArrayList<String>(); - private final Map<String, Class<?>> propertyTypes = new HashMap<String, Class<?>>(); - private final Map<String, Boolean> propertyReadOnly = new HashMap<String, Boolean>(); - private final Map<String, Boolean> propertyPersistable = new HashMap<String, Boolean>(); - private final Map<String, Boolean> propertyNullable = new HashMap<String, Boolean>(); - private final Map<String, Boolean> propertyPrimaryKey = new HashMap<String, Boolean>(); + private final List<String> propertyIds = new ArrayList<>(); + private final Map<String, Class<?>> propertyTypes = new HashMap<>(); + private final Map<String, Boolean> propertyReadOnly = new HashMap<>(); + private final Map<String, Boolean> propertyPersistable = new HashMap<>(); + private final Map<String, Boolean> propertyNullable = new HashMap<>(); + private final Map<String, Boolean> propertyPrimaryKey = new HashMap<>(); /** Filters (WHERE) and sorters (ORDER BY) */ - private final List<Filter> filters = new ArrayList<Filter>(); - private final List<OrderBy> sorters = new ArrayList<OrderBy>(); + private final List<Filter> filters = new ArrayList<>(); + private final List<OrderBy> sorters = new ArrayList<>(); /** * Total number of items available in the data source using the current @@ -103,12 +104,12 @@ public class SQLContainer implements Container, Container.Filterable, /** * Temporary storage for modified items and items to be removed and added */ - private final Map<RowId, RowItem> removedItems = new HashMap<RowId, RowItem>(); - private final List<RowItem> addedItems = new ArrayList<RowItem>(); - private final List<RowItem> modifiedItems = new ArrayList<RowItem>(); + private final Map<RowId, RowItem> removedItems = new HashMap<>(); + private final List<RowItem> addedItems = new ArrayList<>(); + private final List<RowItem> modifiedItems = new ArrayList<>(); /** List of references to other SQLContainers */ - private final Map<SQLContainer, Reference> references = new HashMap<SQLContainer, Reference>(); + private final Map<SQLContainer, Reference> references = new HashMap<>(); /** Cache flush notification system enabled. Disabled by default. */ private boolean notificationsEnabled; @@ -156,7 +157,7 @@ public class SQLContainer implements Container, Container.Filterable, .size()]; RowId itemId = new TemporaryRowId(emptyKey); // Create new empty column properties for the row item. - List<ColumnProperty> itemProperties = new ArrayList<ColumnProperty>(); + List<ColumnProperty> itemProperties = new ArrayList<>(); for (String propertyId : propertyIds) { /* Default settings for new item properties. */ ColumnProperty cp = new ColumnProperty(propertyId, @@ -331,7 +332,7 @@ public class SQLContainer implements Container, Container.Filterable, @Override public Collection<?> getItemIds() { updateCount(); - ArrayList<RowId> ids = new ArrayList<RowId>(); + ArrayList<RowId> ids = new ArrayList<>(); ResultSet rs = null; try { // Load ALL rows :( @@ -584,7 +585,7 @@ public class SQLContainer implements Container, Container.Filterable, * {@inheritDoc} */ public void removeContainerFilters(Object propertyId) { - ArrayList<Filter> toRemove = new ArrayList<Filter>(); + ArrayList<Filter> toRemove = new ArrayList<>(); for (Filter f : filters) { if (f.appliesToProperty(propertyId)) { toRemove.add(f); @@ -1314,7 +1315,7 @@ public class SQLContainer implements Container, Container.Filterable, setPageLengthInternal(size); } while (rs.next()) { - List<ColumnProperty> itemProperties = new ArrayList<ColumnProperty>(); + List<ColumnProperty> itemProperties = new ArrayList<>(); /* Generate row itemId based on primary key(s) */ Object[] itemId = new Object[pKeys.size()]; for (int i = 0; i < pKeys.size(); i++) { @@ -1326,7 +1327,7 @@ public class SQLContainer implements Container, Container.Filterable, } else { id = new RowId(itemId); } - List<String> propertiesToAdd = new ArrayList<String>( + List<String> propertiesToAdd = new ArrayList<>( propertyIds); if (!removedItems.containsKey(id)) { for (int i = 1; i <= rsmd.getColumnCount(); i++) { @@ -1430,7 +1431,7 @@ public class SQLContainer implements Container, Container.Filterable, } private List<RowItem> getFilteredAddedItems() { - ArrayList<RowItem> filtered = new ArrayList<RowItem>(addedItems); + ArrayList<RowItem> filtered = new ArrayList<>(addedItems); if (filters != null && !filters.isEmpty()) { for (RowItem item : addedItems) { if (!itemPassesFilters(item)) { @@ -1585,7 +1586,7 @@ public class SQLContainer implements Container, Container.Filterable, public void addItemSetChangeListener( Container.ItemSetChangeListener listener) { if (itemSetChangeListeners == null) { - itemSetChangeListeners = new LinkedList<Container.ItemSetChangeListener>(); + itemSetChangeListeners = new LinkedList<>(); } itemSetChangeListeners.add(listener); } @@ -1642,6 +1643,7 @@ public class SQLContainer implements Container, Container.Filterable, * Simple ItemSetChangeEvent implementation. */ @SuppressWarnings("serial") + @Deprecated public static class ItemSetChangeEvent extends EventObject implements Container.ItemSetChangeEvent { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLUtil.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLUtil.java index 3939f7ab08..12e46ef2f7 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLUtil.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLUtil.java @@ -17,6 +17,7 @@ package com.vaadin.v7.data.util.sqlcontainer; import java.io.Serializable; +@Deprecated public class SQLUtil implements Serializable { /** * Escapes different special characters in strings that are passed to SQL. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/TemporaryRowId.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/TemporaryRowId.java index 78c3339f05..ad0e9efebb 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/TemporaryRowId.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/TemporaryRowId.java @@ -15,6 +15,7 @@ */ package com.vaadin.v7.data.util.sqlcontainer; +@Deprecated public class TemporaryRowId extends RowId { private static final long serialVersionUID = -641983830469018329L; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/J2EEConnectionPool.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/J2EEConnectionPool.java index 55ab7f041a..51997d96d8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/J2EEConnectionPool.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/J2EEConnectionPool.java @@ -24,6 +24,7 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; +@Deprecated public class J2EEConnectionPool implements JDBCConnectionPool { private String dataSourceJndiName; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/JDBCConnectionPool.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/JDBCConnectionPool.java index fce1d8aa25..ba091a5a0e 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/JDBCConnectionPool.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/JDBCConnectionPool.java @@ -22,6 +22,7 @@ import java.sql.SQLException; /** * Interface for implementing connection pools to be used with SQLContainer. */ +@Deprecated public interface JDBCConnectionPool extends Serializable { /** * Retrieves a connection. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java index fb4444a436..524bca2de9 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java @@ -29,6 +29,7 @@ import java.util.Set; * usable upon release. */ @SuppressWarnings("serial") +@Deprecated public class SimpleJDBCConnectionPool implements JDBCConnectionPool { private int initialConnections = 5; @@ -85,8 +86,8 @@ public class SimpleJDBCConnectionPool implements JDBCConnectionPool { } private void initializeConnections() throws SQLException { - availableConnections = new HashSet<Connection>(initialConnections); - reservedConnections = new HashSet<Connection>(initialConnections); + availableConnections = new HashSet<>(initialConnections); + reservedConnections = new HashSet<>(initialConnections); for (int i = 0; i < initialConnections; i++) { availableConnections.add(createConnection()); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/AbstractTransactionalQuery.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/AbstractTransactionalQuery.java index dc582dd120..cd58275d04 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/AbstractTransactionalQuery.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/AbstractTransactionalQuery.java @@ -31,6 +31,7 @@ import com.vaadin.v7.data.util.sqlcontainer.connection.JDBCConnectionPool; * @author Vaadin Ltd * @since 6.8.9 */ +@Deprecated public abstract class AbstractTransactionalQuery implements Serializable { private JDBCConnectionPool connectionPool; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQuery.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQuery.java index 53006ce849..078ec637a8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQuery.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQuery.java @@ -34,6 +34,7 @@ import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; import com.vaadin.v7.data.util.sqlcontainer.query.generator.filter.QueryBuilder; @SuppressWarnings("serial") +@Deprecated public class FreeformQuery extends AbstractTransactionalQuery implements QueryDelegate { @@ -68,7 +69,7 @@ public class FreeformQuery extends AbstractTransactionalQuery JDBCConnectionPool connectionPool) { super(connectionPool); if (primaryKeyColumns == null) { - primaryKeyColumns = new ArrayList<String>(); + primaryKeyColumns = new ArrayList<>(); } if (primaryKeyColumns.contains("")) { throw new IllegalArgumentException( diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQueryDelegate.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQueryDelegate.java index 7af783256f..9a6a37f710 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQueryDelegate.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQueryDelegate.java @@ -23,6 +23,7 @@ import java.util.List; import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.sqlcontainer.RowItem; +@Deprecated public interface FreeformQueryDelegate extends Serializable { /** * Should return the SQL query string to be performed. This method is diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformStatementDelegate.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformStatementDelegate.java index d658ea7188..2c9117a51b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformStatementDelegate.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformStatementDelegate.java @@ -27,6 +27,7 @@ import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; * is advisable to implement this interface instead of the FreeformQueryDelegate * whenever possible. */ +@Deprecated public interface FreeformStatementDelegate extends FreeformQueryDelegate { /** * Should return a new instance of StatementHelper that contains the query diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/OrderBy.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/OrderBy.java index c6315f12dc..8e600f8ae0 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/OrderBy.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/OrderBy.java @@ -24,6 +24,7 @@ import java.io.Serializable; * The sorting rule is simple and contains only the affected column's name and * the direction of the sort. */ +@Deprecated public class OrderBy implements Serializable { private String column; private boolean isAscending; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/QueryDelegate.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/QueryDelegate.java index cc4c9f5668..626169d42f 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/QueryDelegate.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/QueryDelegate.java @@ -24,6 +24,7 @@ import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.sqlcontainer.RowId; import com.vaadin.v7.data.util.sqlcontainer.RowItem; +@Deprecated public interface QueryDelegate extends Serializable { /** * Generates and executes a query to determine the current row count from @@ -169,6 +170,7 @@ public interface QueryDelegate extends Serializable { * An <code>Event</code> object specifying the old and new RowId of an added * item after the addition has been successfully committed. */ + @Deprecated public interface RowIdChangeEvent extends Serializable { /** * Gets the old (temporary) RowId of the added row that raised this @@ -188,6 +190,7 @@ public interface QueryDelegate extends Serializable { } /** RowId change listener interface. */ + @Deprecated public interface RowIdChangeListener extends Serializable { /** * Lets the listener know that a RowId has been changed. @@ -203,6 +206,7 @@ public interface QueryDelegate extends Serializable { * that it will generate a <code>RowIdChangeEvent</code> when it performs a * database commit that may change the RowId. */ + @Deprecated public interface RowIdChangeNotifier extends Serializable { /** * Adds a RowIdChangeListener for the object. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java index a8a84ea086..4f65d09418 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java @@ -47,6 +47,7 @@ import com.vaadin.v7.data.util.sqlcontainer.query.generator.SQLGenerator; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; @SuppressWarnings("serial") +@Deprecated public class TableQuery extends AbstractTransactionalQuery implements QueryDelegate, QueryDelegate.RowIdChangeNotifier { @@ -79,7 +80,7 @@ public class TableQuery extends AbstractTransactionalQuery /** Row ID change listeners */ private LinkedList<RowIdChangeListener> rowIdChangeListeners; /** Row ID change events, stored until commit() is called */ - private final List<RowIdChangeEvent> bufferedEvents = new ArrayList<RowIdChangeEvent>(); + private final List<RowIdChangeEvent> bufferedEvents = new ArrayList<>(); /** Set to true to output generated SQL Queries to System.out */ private final boolean debug = false; @@ -240,7 +241,7 @@ public class TableQuery extends AbstractTransactionalQuery * first primary key column. */ if (orderBys == null || orderBys.isEmpty()) { - List<OrderBy> ob = new ArrayList<OrderBy>(); + List<OrderBy> ob = new ArrayList<>(); for (int i = 0; i < primaryKeyColumns.size(); i++) { ob.add(new OrderBy(primaryKeyColumns.get(i), true)); } @@ -631,7 +632,7 @@ public class TableQuery extends AbstractTransactionalQuery } tables.close(); rs = dbmd.getPrimaryKeys(catalogName, schemaName, tableName); - List<String> names = new ArrayList<String>(); + List<String> names = new ArrayList<>(); while (rs.next()) { names.add(rs.getString("COLUMN_NAME")); } @@ -676,7 +677,7 @@ public class TableQuery extends AbstractTransactionalQuery private RowId getNewRowId(RowItem row, ResultSet genKeys) { try { /* Fetch primary key values and generate a map out of them. */ - Map<String, Object> values = new HashMap<String, Object>(); + Map<String, Object> values = new HashMap<>(); ResultSetMetaData rsmd = genKeys.getMetaData(); int colCount = rsmd.getColumnCount(); if (genKeys.next()) { @@ -685,7 +686,7 @@ public class TableQuery extends AbstractTransactionalQuery } } /* Generate new RowId */ - List<Object> newRowId = new ArrayList<Object>(); + List<Object> newRowId = new ArrayList<>(); if (values.size() == 1) { if (primaryKeyColumns.size() == 1) { newRowId.add(values.get(values.keySet().iterator().next())); @@ -749,7 +750,7 @@ public class TableQuery extends AbstractTransactionalQuery */ @Override public boolean containsRowWithKey(Object... keys) throws SQLException { - ArrayList<Filter> filtersAndKeys = new ArrayList<Filter>(); + ArrayList<Filter> filtersAndKeys = new ArrayList<>(); if (filters != null) { filtersAndKeys.addAll(filters); } @@ -800,6 +801,7 @@ public class TableQuery extends AbstractTransactionalQuery /** * Simple RowIdChangeEvent implementation. */ + @Deprecated public static class RowIdChangeEvent extends EventObject implements QueryDelegate.RowIdChangeEvent { private final RowId oldId; @@ -828,7 +830,7 @@ public class TableQuery extends AbstractTransactionalQuery @Override public void addRowIdChangeListener(RowIdChangeListener listener) { if (rowIdChangeListeners == null) { - rowIdChangeListeners = new LinkedList<QueryDelegate.RowIdChangeListener>(); + rowIdChangeListeners = new LinkedList<>(); } rowIdChangeListeners.add(listener); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java index 5439258f32..b1f4dd011d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java @@ -34,6 +34,7 @@ import com.vaadin.v7.data.util.sqlcontainer.query.generator.filter.StringDecorat * @author Jonatan Kronqvist / Vaadin Ltd */ @SuppressWarnings("serial") +@Deprecated public class DefaultSQLGenerator implements SQLGenerator { private Class<? extends StatementHelper> statementHelperClass = null; @@ -327,7 +328,7 @@ public class DefaultSQLGenerator implements SQLGenerator { } protected Map<String, Object> generateColumnToValueMap(RowItem item) { - Map<String, Object> columnToValueMap = new HashMap<String, Object>(); + Map<String, Object> columnToValueMap = new HashMap<>(); for (Object id : item.getItemPropertyIds()) { ColumnProperty cp = (ColumnProperty) item.getItemProperty(id); /* Prevent "rownum" usage as a column name if MSSQL or ORACLE */ @@ -344,7 +345,7 @@ public class DefaultSQLGenerator implements SQLGenerator { } protected Map<String, Object> generateRowIdentifiers(RowItem item) { - Map<String, Object> rowIdentifiers = new HashMap<String, Object>(); + Map<String, Object> rowIdentifiers = new HashMap<>(); for (Object id : item.getItemPropertyIds()) { ColumnProperty cp = (ColumnProperty) item.getItemProperty(id); /* Prevent "rownum" usage as a column name if MSSQL or ORACLE */ diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/MSSQLGenerator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/MSSQLGenerator.java index fd4f0bcfbe..211031084b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/MSSQLGenerator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/MSSQLGenerator.java @@ -22,6 +22,7 @@ import com.vaadin.v7.data.util.sqlcontainer.query.OrderBy; import com.vaadin.v7.data.util.sqlcontainer.query.generator.filter.QueryBuilder; @SuppressWarnings("serial") +@Deprecated public class MSSQLGenerator extends DefaultSQLGenerator { public MSSQLGenerator() { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/OracleGenerator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/OracleGenerator.java index 64a0c22d97..ca6f584b35 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/OracleGenerator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/OracleGenerator.java @@ -22,6 +22,7 @@ import com.vaadin.v7.data.util.sqlcontainer.query.OrderBy; import com.vaadin.v7.data.util.sqlcontainer.query.generator.filter.QueryBuilder; @SuppressWarnings("serial") +@Deprecated public class OracleGenerator extends DefaultSQLGenerator { public OracleGenerator() { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/SQLGenerator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/SQLGenerator.java index 1841c0a23b..ea153c0eeb 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/SQLGenerator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/SQLGenerator.java @@ -29,6 +29,7 @@ import com.vaadin.v7.data.util.sqlcontainer.query.OrderBy; * * @author Jonatan Kronqvist / Vaadin Ltd */ +@Deprecated public interface SQLGenerator extends Serializable { /** * Generates a SELECT query with the provided parameters. Uses default diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/StatementHelper.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/StatementHelper.java index fe8240cd42..42bd3c6700 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/StatementHelper.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/StatementHelper.java @@ -37,12 +37,13 @@ import java.util.Map; * This class will also fill the values with correct setters into the * PreparedStatement on request. */ +@Deprecated public class StatementHelper implements Serializable { private String queryString; - private List<Object> parameters = new ArrayList<Object>(); - private Map<Integer, Class<?>> dataTypes = new HashMap<Integer, Class<?>>(); + private List<Object> parameters = new ArrayList<>(); + private Map<Integer, Class<?>> dataTypes = new HashMap<>(); public StatementHelper() { } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/AndTranslator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/AndTranslator.java index ef958459fb..507bc640d5 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/AndTranslator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/AndTranslator.java @@ -19,6 +19,7 @@ import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.filter.And; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public class AndTranslator implements FilterTranslator { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java index 7e491925a3..cb96ef7586 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/BetweenTranslator.java @@ -19,6 +19,7 @@ import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.filter.Between; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public class BetweenTranslator implements FilterTranslator { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java index 44e5a7ee14..2ac709f1ec 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/CompareTranslator.java @@ -19,6 +19,7 @@ import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.filter.Compare; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public class CompareTranslator implements FilterTranslator { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java index 4bd1807600..9bb083a63d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/FilterTranslator.java @@ -20,6 +20,7 @@ import java.io.Serializable; import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public interface FilterTranslator extends Serializable { public boolean translatesFilter(Filter filter); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java index d2dda82232..fdaef1c287 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/IsNullTranslator.java @@ -19,6 +19,7 @@ import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.filter.IsNull; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public class IsNullTranslator implements FilterTranslator { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java index bd41aa1abf..644350a9d8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/LikeTranslator.java @@ -19,6 +19,7 @@ import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.filter.Like; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public class LikeTranslator implements FilterTranslator { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/NotTranslator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/NotTranslator.java index 83110e2f41..53d50d8acd 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/NotTranslator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/NotTranslator.java @@ -20,6 +20,7 @@ import com.vaadin.v7.data.util.filter.IsNull; import com.vaadin.v7.data.util.filter.Not; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public class NotTranslator implements FilterTranslator { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/OrTranslator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/OrTranslator.java index 61fad7b559..1d429ee8c5 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/OrTranslator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/OrTranslator.java @@ -19,6 +19,7 @@ import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.filter.Or; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public class OrTranslator implements FilterTranslator { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java index c7ed3f91ae..608f0597dc 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java @@ -23,9 +23,10 @@ import java.util.List; import com.vaadin.v7.data.Container.Filter; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public class QueryBuilder implements Serializable { - private static ArrayList<FilterTranslator> filterTranslators = new ArrayList<FilterTranslator>(); + private static ArrayList<FilterTranslator> filterTranslators = new ArrayList<>(); private static StringDecorator stringDecorator = new StringDecorator("\"", "\""); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java index bb47fbd826..b161c02215 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/SimpleStringTranslator.java @@ -20,6 +20,7 @@ import com.vaadin.v7.data.util.filter.Like; import com.vaadin.v7.data.util.filter.SimpleStringFilter; import com.vaadin.v7.data.util.sqlcontainer.query.generator.StatementHelper; +@Deprecated public class SimpleStringTranslator implements FilterTranslator { @Override diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/StringDecorator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/StringDecorator.java index 72c841fe0a..e0305bda19 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/StringDecorator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/StringDecorator.java @@ -27,6 +27,7 @@ import java.io.Serializable; * * @author Vaadin Ltd */ +@Deprecated public class StringDecorator implements Serializable { private final String quoteStart; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractStringValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractStringValidator.java index 340b34237d..739cd151be 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractStringValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractStringValidator.java @@ -28,6 +28,7 @@ package com.vaadin.v7.data.validator; * @since 5.4 */ @SuppressWarnings("serial") +@Deprecated public abstract class AbstractStringValidator extends AbstractValidator<String> { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java index eae0c6fec5..1b71456452 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java @@ -44,6 +44,7 @@ import com.vaadin.v7.data.Validator; * @author Vaadin Ltd. * @since 5.4 */ +@Deprecated public abstract class AbstractValidator<T> implements Validator { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BeanValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BeanValidator.java index 9afd816ac0..82c7199e47 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BeanValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BeanValidator.java @@ -44,6 +44,7 @@ import com.vaadin.v7.data.Validator; * @author Petri Hakala * @author Henri Sara */ +@Deprecated public class BeanValidator implements Validator { private static final long serialVersionUID = 1L; @@ -58,6 +59,7 @@ public class BeanValidator implements Validator { * Simple implementation of a message interpolator context that returns * fixed values. */ + @Deprecated protected static class SimpleContext implements Context, Serializable { private final Object value; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java index 40fd442dca..c4795ab743 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java @@ -24,6 +24,7 @@ import java.math.BigDecimal; * @since 7.4 */ @SuppressWarnings("serial") +@Deprecated public class BigDecimalRangeValidator extends RangeValidator<BigDecimal> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java index bf237b565b..d6f6301b4e 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java @@ -24,6 +24,7 @@ import java.math.BigInteger; * @since 7.4 */ @SuppressWarnings("serial") +@Deprecated public class BigIntegerRangeValidator extends RangeValidator<BigInteger> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/ByteRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/ByteRangeValidator.java index 4bbb1b3290..96de84ad70 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/ByteRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/ByteRangeValidator.java @@ -22,6 +22,7 @@ package com.vaadin.v7.data.validator; * @since 7.4 */ @SuppressWarnings("serial") +@Deprecated public class ByteRangeValidator extends RangeValidator<Byte> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/CompositeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/CompositeValidator.java index 2827c401ed..006a14fabd 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/CompositeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/CompositeValidator.java @@ -34,8 +34,10 @@ import com.vaadin.v7.data.Validator; * @since 3.0 */ @SuppressWarnings("serial") +@Deprecated public class CompositeValidator implements Validator { + @Deprecated public enum CombinationMode { /** * The validators are combined with <code>AND</code> clause: validity of @@ -72,7 +74,7 @@ public class CompositeValidator implements Validator { /** * List of contained validators. */ - private final List<Validator> validators = new LinkedList<Validator>(); + private final List<Validator> validators = new LinkedList<>(); /** * Construct a composite validator in <code>AND</code> mode without error @@ -238,7 +240,7 @@ public class CompositeValidator implements Validator { return null; } - final HashSet<Validator> found = new HashSet<Validator>(); + final HashSet<Validator> found = new HashSet<>(); for (Validator v : validators) { if (validatorType.isAssignableFrom(v.getClass())) { found.add(v); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java index 2abbc98460..10bb8834a9 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java @@ -31,6 +31,7 @@ import com.vaadin.shared.ui.datefield.Resolution; * @author Vaadin Ltd. * @since 7.0 */ +@Deprecated public class DateRangeValidator extends RangeValidator<Date> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleRangeValidator.java index 1a6d8cd208..1c22177c48 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleRangeValidator.java @@ -22,6 +22,7 @@ package com.vaadin.v7.data.validator; * @since 7.0 */ @SuppressWarnings("serial") +@Deprecated public class DoubleRangeValidator extends RangeValidator<Double> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java index a6875c961c..9c8e83749d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java @@ -29,8 +29,8 @@ import com.vaadin.v7.data.util.converter.StringToDoubleConverter; * field instead or bind the field to a {@link Property} of type * {@link Double}. */ -@Deprecated @SuppressWarnings("serial") +@Deprecated public class DoubleValidator extends AbstractStringValidator { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java index c2c6ea943a..9c7e855b92 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java @@ -33,6 +33,7 @@ package com.vaadin.v7.data.validator; * @since 5.4 */ @SuppressWarnings("serial") +@Deprecated public class EmailValidator extends RegexpValidator { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/FloatRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/FloatRangeValidator.java index c63b4a51a2..58fdcf46af 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/FloatRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/FloatRangeValidator.java @@ -22,6 +22,7 @@ package com.vaadin.v7.data.validator; * @since 7.4 */ @SuppressWarnings("serial") +@Deprecated public class FloatRangeValidator extends RangeValidator<Float> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerRangeValidator.java index 48fa420f06..8da142f75d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerRangeValidator.java @@ -22,6 +22,7 @@ package com.vaadin.v7.data.validator; * @since 5.4 */ @SuppressWarnings("serial") +@Deprecated public class IntegerRangeValidator extends RangeValidator<Integer> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/LongRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/LongRangeValidator.java index 440961430c..45ac297503 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/LongRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/LongRangeValidator.java @@ -22,6 +22,7 @@ package com.vaadin.v7.data.validator; * @since 7.4 */ @SuppressWarnings("serial") +@Deprecated public class LongRangeValidator extends RangeValidator<Long> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/NullValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/NullValidator.java index 60e1cb4550..783934a30b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/NullValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/NullValidator.java @@ -26,6 +26,7 @@ import com.vaadin.v7.data.Validator; * @since 3.0 */ @SuppressWarnings("serial") +@Deprecated public class NullValidator implements Validator { private boolean onlyNullAllowed; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java index 65cb6cc6f9..f343a0e76b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java @@ -35,6 +35,7 @@ package com.vaadin.v7.data.validator; * @author Vaadin Ltd. * @since 7.0 */ +@Deprecated public class RangeValidator<T extends Comparable> extends AbstractValidator<T> { private T minValue = null; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java index 7fd2229548..4485076239 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java @@ -40,6 +40,7 @@ import java.util.regex.Pattern; * @since 5.4 */ @SuppressWarnings("serial") +@Deprecated public class RegexpValidator extends AbstractStringValidator { private Pattern pattern; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/ShortRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/ShortRangeValidator.java index 2bf89cbca8..64fa633be0 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/ShortRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/ShortRangeValidator.java @@ -22,6 +22,7 @@ package com.vaadin.v7.data.validator; * @since 7.4 */ @SuppressWarnings("serial") +@Deprecated public class ShortRangeValidator extends RangeValidator<Short> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/StringLengthValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/StringLengthValidator.java index dc863ab31a..d0b865061e 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/StringLengthValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/StringLengthValidator.java @@ -24,6 +24,7 @@ package com.vaadin.v7.data.validator; * @since 3.0 */ @SuppressWarnings("serial") +@Deprecated public class StringLengthValidator extends AbstractStringValidator { private Integer minLength = null; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java b/compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java index 2c399890c1..4c4b8edd31 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java @@ -36,6 +36,7 @@ import com.vaadin.v7.data.Container; * * @since 6.3 */ +@Deprecated public abstract class DataBoundTransferable extends TransferableImpl { public DataBoundTransferable(Component sourceComponent, diff --git a/compatibility-server/src/main/java/com/vaadin/v7/event/FieldEvents.java b/compatibility-server/src/main/java/com/vaadin/v7/event/FieldEvents.java index abd17df49b..2eeeb4c2ee 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/event/FieldEvents.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/event/FieldEvents.java @@ -29,6 +29,7 @@ import com.vaadin.v7.ui.TextField; /** * Interface that serves as a wrapper for {@link Field} related events. */ +@Deprecated public interface FieldEvents { /** @@ -56,6 +57,7 @@ public interface FieldEvents { * @see TextField#setTextChangeEventMode(com.vaadin.ui.TextField.TextChangeEventMode) * @since 6.5 */ + @Deprecated public static abstract class TextChangeEvent extends Component.Event { public TextChangeEvent(Component source) { @@ -79,6 +81,7 @@ public interface FieldEvents { * * @since 6.5 */ + @Deprecated public interface TextChangeListener extends ConnectorEventListener { public static String EVENT_ID = "ie"; @@ -99,6 +102,7 @@ public interface FieldEvents { * {@link TextChangeEvent}s. An example a {@link TextField} supports * {@link TextChangeListener}s. */ + @Deprecated public interface TextChangeNotifier extends Serializable { public void addTextChangeListener(TextChangeListener listener); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/event/ItemClickEvent.java b/compatibility-server/src/main/java/com/vaadin/v7/event/ItemClickEvent.java index e5f45728a9..8d8c520208 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/event/ItemClickEvent.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/event/ItemClickEvent.java @@ -35,6 +35,7 @@ import com.vaadin.v7.data.Property; * */ @SuppressWarnings("serial") +@Deprecated public class ItemClickEvent extends ClickEvent implements Serializable { private Item item; private Object itemId; @@ -90,6 +91,7 @@ public class ItemClickEvent extends ClickEvent implements Serializable { } } + @Deprecated public interface ItemClickListener extends Serializable { public void itemClick(ItemClickEvent event); } @@ -112,6 +114,7 @@ public class ItemClickEvent extends ClickEvent implements Serializable { * @see ItemClickListener * @see ItemClickEvent */ + @Deprecated public interface ItemClickNotifier extends Serializable { /** * Register a listener to handle {@link ItemClickEvent}s. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/DataGenerator.java b/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/DataGenerator.java index ee71b587f9..ef940bb0b3 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/DataGenerator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/DataGenerator.java @@ -32,6 +32,7 @@ import elemental.json.JsonObject; * @since 7.6 * @author Vaadin Ltd */ +@Deprecated public interface DataGenerator extends Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java b/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java index 7fdcd4eff4..bc3c81a17a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/server/communication/data/RpcDataProviderExtension.java @@ -62,6 +62,7 @@ import elemental.json.JsonObject; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class RpcDataProviderExtension extends AbstractExtension { /** @@ -71,9 +72,9 @@ public class RpcDataProviderExtension extends AbstractExtension { */ private class ActiveItemHandler implements Serializable, DataGenerator { - private final Map<Object, GridValueChangeListener> activeItemMap = new HashMap<Object, GridValueChangeListener>(); - private final KeyMapper<Object> keyMapper = new KeyMapper<Object>(); - private final Set<Object> droppedItems = new HashSet<Object>(); + private final Map<Object, GridValueChangeListener> activeItemMap = new HashMap<>(); + private final KeyMapper<Object> keyMapper = new KeyMapper<>(); + private final Set<Object> droppedItems = new HashSet<>(); /** * Registers ValueChangeListeners for given item ids. @@ -117,7 +118,7 @@ public class RpcDataProviderExtension extends AbstractExtension { * @return collection of item ids */ public Collection<Object> getActiveItemIds() { - return new HashSet<Object>(activeItemMap.keySet()); + return new HashSet<>(activeItemMap.keySet()); } /** @@ -126,7 +127,7 @@ public class RpcDataProviderExtension extends AbstractExtension { * @return collection of value change listeners */ public Collection<GridValueChangeListener> getValueChangeListeners() { - return new HashSet<GridValueChangeListener>(activeItemMap.values()); + return new HashSet<>(activeItemMap.values()); } @Override @@ -244,7 +245,7 @@ public class RpcDataProviderExtension extends AbstractExtension { else { // Remove obsolete value change listeners. - Set<Object> keySet = new HashSet<Object>( + Set<Object> keySet = new HashSet<>( activeItemHandler.activeItemMap.keySet()); for (Object itemId : keySet) { activeItemHandler.removeListener(itemId); @@ -272,7 +273,7 @@ public class RpcDataProviderExtension extends AbstractExtension { /** Size possibly changed with a bare ItemSetChangeEvent */ private boolean bareItemSetTriggeredSizeChange = false; - private final Set<DataGenerator> dataGenerators = new LinkedHashSet<DataGenerator>(); + private final Set<DataGenerator> dataGenerators = new LinkedHashSet<>(); private final ActiveItemHandler activeItemHandler = new ActiveItemHandler(); @@ -282,6 +283,7 @@ public class RpcDataProviderExtension extends AbstractExtension { * @param container * the container to make available */ + @Deprecated public RpcDataProviderExtension(Indexed container) { this.container = container; rpc = getRpcProxy(DataProviderRpc.class); @@ -456,7 +458,7 @@ public class RpcDataProviderExtension extends AbstractExtension { */ private void insertRowData(final int index, final int count) { if (rowChanges == null) { - rowChanges = new ArrayList<Runnable>(); + rowChanges = new ArrayList<>(); } if (rowChanges.isEmpty()) { @@ -489,7 +491,7 @@ public class RpcDataProviderExtension extends AbstractExtension { */ private void removeRowData(final int index, final int count) { if (rowChanges == null) { - rowChanges = new ArrayList<Runnable>(); + rowChanges = new ArrayList<>(); } if (rowChanges.isEmpty()) { @@ -514,7 +516,7 @@ public class RpcDataProviderExtension extends AbstractExtension { */ public void updateRowData(Object itemId) { if (updatedItemIds == null) { - updatedItemIds = new LinkedHashSet<Object>(); + updatedItemIds = new LinkedHashSet<>(); } if (updatedItemIds.isEmpty()) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java index 73ce2f3a99..180c1f15b8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java @@ -48,8 +48,8 @@ import com.vaadin.v7.data.Validator; import com.vaadin.v7.data.Validator.InvalidValueException; import com.vaadin.v7.data.util.converter.Converter; import com.vaadin.v7.data.util.converter.Converter.ConversionException; -import com.vaadin.v7.shared.AbstractFieldState; import com.vaadin.v7.data.util.converter.ConverterUtil; +import com.vaadin.v7.shared.AbstractFieldState; /** * <p> @@ -1185,6 +1185,7 @@ public abstract class AbstractField<T> extends AbstractComponent * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public static class ReadOnlyStatusChangeEvent extends Component.Event implements Property.ReadOnlyStatusChangeEvent, Serializable { @@ -1588,6 +1589,7 @@ public abstract class AbstractField<T> extends AbstractComponent * invoked. * */ + @Deprecated public static class FocusShortcut extends ShortcutListener { protected Focusable focusable; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java index c7e90afb4c..55962df2cf 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java @@ -79,12 +79,14 @@ import com.vaadin.v7.shared.ui.select.AbstractSelectState; * @since 5.0 */ @SuppressWarnings("serial") +@Deprecated // TODO currently cannot specify type more precisely in case of multi-select public abstract class AbstractSelect extends AbstractField<Object> implements Container, Container.Viewer, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.ItemSetChangeNotifier, Container.ItemSetChangeListener, LegacyComponent { + @Deprecated public enum ItemCaptionMode { /** * Item caption mode: Item's ID converted to a String using @@ -182,6 +184,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements * caption. <code>FilteringMode.CONTAINS</code> (1) matches anywhere in the * caption. */ + @Deprecated public interface Filtering extends Serializable { /** @@ -230,17 +233,17 @@ public abstract class AbstractSelect extends AbstractField<Object> implements /** * Keymapper used to map key values. */ - protected KeyMapper<Object> itemIdMapper = new KeyMapper<Object>(); + protected KeyMapper<Object> itemIdMapper = new KeyMapper<>(); /** * Item icons. */ - private final HashMap<Object, Resource> itemIcons = new HashMap<Object, Resource>(); + private final HashMap<Object, Resource> itemIcons = new HashMap<>(); /** * Item captions. */ - private final HashMap<Object, String> itemCaptions = new HashMap<Object, String>(); + private final HashMap<Object, String> itemCaptions = new HashMap<>(); /** * Item caption mode. @@ -469,7 +472,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements // TODO Optimize by adding repaintNotNeeded when applicable // Converts the key-array to id-set - final LinkedList<Object> acceptedSelections = new LinkedList<Object>(); + final LinkedList<Object> acceptedSelections = new LinkedList<>(); for (int i = 0; i < clientSideSelectedKeys.length; i++) { final Object id = itemIdMapper .get(clientSideSelectedKeys[i]); @@ -501,9 +504,9 @@ public abstract class AbstractSelect extends AbstractField<Object> implements @SuppressWarnings("unchecked") Set<Object> newsel = (Set<Object>) getValue(); if (newsel == null) { - newsel = new LinkedHashSet<Object>(); + newsel = new LinkedHashSet<>(); } else { - newsel = new LinkedHashSet<Object>(newsel); + newsel = new LinkedHashSet<>(newsel); } newsel.removeAll(visibleNotSelected); newsel.addAll(acceptedSelections); @@ -570,6 +573,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements return newItemHandler; } + @Deprecated public interface NewItemHandler extends Serializable { void addNewItem(String newItemCaption); } @@ -584,6 +588,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements * like database inserts. * */ + @Deprecated public class DefaultNewItemHandler implements NewItemHandler { @Override public void addNewItem(String newItemCaption) { @@ -653,14 +658,14 @@ public abstract class AbstractSelect extends AbstractField<Object> implements // If the return value is not a set if (retValue == null) { - return new HashSet<Object>(); + return new HashSet<>(); } if (retValue instanceof Set) { return Collections.unmodifiableSet((Set<?>) retValue); } else if (retValue instanceof Collection) { return new HashSet<Object>((Collection<?>) retValue); } else { - final Set<Object> s = new HashSet<Object>(); + final Set<Object> s = new HashSet<>(); if (items.containsId(retValue)) { s.add(retValue); } @@ -720,7 +725,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements ConversionException, InvalidValueException { if (isMultiSelect()) { if (newFieldValue == null) { - super.setValue(new LinkedHashSet<Object>(), repaintIsNotNeeded, + super.setValue(new LinkedHashSet<>(), repaintIsNotNeeded, ignoreReadOnly); } else if (Collection.class .isAssignableFrom(newFieldValue.getClass())) { @@ -978,7 +983,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements if (isMultiSelect()) { Collection<Object> valueAsCollection = (Collection<Object>) value; - List<Object> newSelection = new ArrayList<Object>( + List<Object> newSelection = new ArrayList<>( valueAsCollection.size()); for (Object subValue : valueAsCollection) { if (containsId(subValue)) { @@ -1129,7 +1134,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements // Convert the value type if (multiSelect) { - final Set<Object> s = new HashSet<Object>(); + final Set<Object> s = new HashSet<>(); if (oldValue != null) { s.add(oldValue); } @@ -1534,7 +1539,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements setValue(itemId); } else if (!isSelected(itemId) && itemId != null && items.containsId(itemId)) { - final Set<Object> s = new HashSet<Object>((Set<?>) getValue()); + final Set<Object> s = new HashSet<>((Set<?>) getValue()); s.add(itemId); setValue(s); } @@ -1552,7 +1557,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements public void unselect(Object itemId) { if (isSelected(itemId)) { if (isMultiSelect()) { - final Set<Object> s = new HashSet<Object>((Set<?>) getValue()); + final Set<Object> s = new HashSet<>((Set<?>) getValue()); s.remove(itemId); setValue(s); } else { @@ -1581,7 +1586,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements public void addPropertySetChangeListener( Container.PropertySetChangeListener listener) { if (propertySetEventListeners == null) { - propertySetEventListeners = new LinkedHashSet<Container.PropertySetChangeListener>(); + propertySetEventListeners = new LinkedHashSet<>(); } propertySetEventListeners.add(listener); } @@ -1631,7 +1636,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements public void addItemSetChangeListener( Container.ItemSetChangeListener listener) { if (itemSetEventListeners == null) { - itemSetEventListeners = new LinkedHashSet<Container.ItemSetChangeListener>(); + itemSetEventListeners = new LinkedHashSet<>(); } itemSetEventListeners.add(listener); } @@ -1912,12 +1917,13 @@ public abstract class AbstractSelect extends AbstractField<Object> implements * NOTE: singleton, use getCaptionChangeListener(). * */ + @Deprecated protected class CaptionChangeListener implements Item.PropertySetChangeListener, Property.ValueChangeListener { // TODO clean this up - type is either Item.PropertySetChangeNotifier or // Property.ValueChangeNotifier - HashSet<Object> captionChangeNotifiers = new HashSet<Object>(); + HashSet<Object> captionChangeNotifiers = new HashSet<>(); public void addNotifierForItem(Object itemId) { switch (getItemCaptionMode()) { @@ -2008,6 +2014,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements * * @since 6.3 */ + @Deprecated public static class TargetItemIs extends AbstractItemSetCriterion { /** @@ -2042,7 +2049,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements */ private static abstract class AbstractItemSetCriterion extends ClientSideCriterion { - protected final Collection<Object> itemIds = new HashSet<Object>(); + protected final Collection<Object> itemIds = new HashSet<>(); protected AbstractSelect select; public AbstractItemSetCriterion(AbstractSelect select, @@ -2076,6 +2083,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements * * @since 6.3 */ + @Deprecated public static class AcceptItem extends AbstractItemSetCriterion { /** @@ -2115,6 +2123,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements * * @since 6.3 */ + @Deprecated public class AbstractSelectTargetDetails extends TargetDetailsImpl { /** @@ -2166,6 +2175,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements * This accept criterion is currently usable in Tree and Table * implementations. */ + @Deprecated public static class VerticalLocationIs extends TargetDetailIs { public static VerticalLocationIs TOP = new VerticalLocationIs( VerticalDropLocation.TOP); @@ -2184,6 +2194,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements * or Table.setItemDescriptionGenerator to generate mouse over descriptions * ("tooltips") for the rows and cells in Table or for the items in Tree. */ + @Deprecated public interface ItemDescriptionGenerator extends Serializable { /** @@ -2213,7 +2224,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements } protected void readItems(Element design, DesignContext context) { - Set<String> selected = new HashSet<String>(); + Set<String> selected = new HashSet<>(); for (Element child : design.children()) { readItem(child, selected, context); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java index d4d17cd7b4..d2b4665bda 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java @@ -503,6 +503,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements /** * Different modes how the TextField can trigger {@link TextChangeEvent}s. */ + @Deprecated public enum TextChangeEventMode { /** @@ -593,6 +594,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements return textChangeEventTimeout; } + @Deprecated public static class TextChangeEventImpl extends TextChangeEvent { private String curText; private int cursorPosition; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java index cb0ce7d220..d8ffd0b1e8 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java @@ -118,6 +118,7 @@ import com.vaadin.v7.ui.components.calendar.handler.BasicWeekClickHandler; * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class Calendar extends AbstractComponent implements CalendarComponentEvents.NavigationNotifier, CalendarComponentEvents.EventMoveNotifier, @@ -129,6 +130,7 @@ public class Calendar extends AbstractComponent /** * Calendar can use either 12 hours clock or 24 hours clock. */ + @Deprecated public enum TimeFormat { Format12H(), Format24H(); @@ -289,7 +291,7 @@ public class Calendar extends AbstractComponent public Calendar(String caption, CalendarEventProvider eventProvider) { registerRpc(rpc); setCaption(caption); - handlers = new HashMap<String, EventListener>(); + handlers = new HashMap<>(); setDefaultHandlers(); currentCalendar.setTime(new Date()); setEventProvider(eventProvider); @@ -452,7 +454,7 @@ public class Calendar extends AbstractComponent currentCalendar.setTime(firstDateToShow); events = getEventProvider().getEvents(firstDateToShow, lastDateToShow); - List<CalendarState.Event> calendarStateEvents = new ArrayList<CalendarState.Event>(); + List<CalendarState.Event> calendarStateEvents = new ArrayList<>(); if (events != null) { for (int i = 0; i < events.size(); i++) { CalendarEvent e = events.get(i); @@ -532,9 +534,9 @@ public class Calendar extends AbstractComponent DateFormat weeklyCaptionFormatter = getWeeklyCaptionFormatter(); weeklyCaptionFormatter.setTimeZone(currentCalendar.getTimeZone()); - Map<CalendarDateRange, Set<Action>> actionMap = new HashMap<CalendarDateRange, Set<Action>>(); + Map<CalendarDateRange, Set<Action>> actionMap = new HashMap<>(); - List<CalendarState.Day> days = new ArrayList<CalendarState.Day>(); + List<CalendarState.Day> days = new ArrayList<>(); // Send all dates to client from server. This // approach was taken because gwt doesn't @@ -621,7 +623,7 @@ public class Calendar extends AbstractComponent getTimeZone()); Action[] actions = actionHandler.getActions(range, this); if (actions != null) { - Set<Action> actionSet = new LinkedHashSet<Action>( + Set<Action> actionSet = new LinkedHashSet<>( Arrays.asList(actions)); actionMap.put(range, actionSet); } @@ -634,8 +636,7 @@ public class Calendar extends AbstractComponent getTimeZone()); Action[] actions = actionHandler.getActions(range, this); if (actions != null) { - Set<Action> actionSet = new LinkedHashSet<Action>( - Arrays.asList(actions)); + Set<Action> actionSet = new LinkedHashSet<>(Arrays.asList(actions)); actionMap.put(range, actionSet); } } @@ -646,7 +647,7 @@ public class Calendar extends AbstractComponent return null; } - List<CalendarState.Action> calendarActions = new ArrayList<CalendarState.Action>(); + List<CalendarState.Action> calendarActions = new ArrayList<>(); SimpleDateFormat formatter = new SimpleDateFormat( DateConstants.ACTION_DATE_FORMAT_PATTERN); @@ -1486,7 +1487,7 @@ public class Calendar extends AbstractComponent @Override public TargetDetails translateDropTargetDetails( Map<String, Object> clientVariables) { - Map<String, Object> serverVariables = new HashMap<String, Object>(); + Map<String, Object> serverVariables = new HashMap<>(); if (clientVariables.containsKey("dropSlotIndex")) { int slotIndex = (Integer) clientVariables.get("dropSlotIndex"); @@ -1689,8 +1690,8 @@ public class Calendar extends AbstractComponent public void addActionHandler(Handler actionHandler) { if (actionHandler != null) { if (actionHandlers == null) { - actionHandlers = new LinkedList<Action.Handler>(); - actionMapper = new KeyMapper<Action>(); + actionHandlers = new LinkedList<>(); + actionMapper = new KeyMapper<>(); } if (!actionHandlers.contains(actionHandler)) { actionHandlers.add(actionHandler); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java index 5de6fa3d4b..779acb10ea 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java @@ -33,6 +33,7 @@ import com.vaadin.v7.data.Property; import com.vaadin.v7.shared.ui.checkbox.CheckBoxServerRpc; import com.vaadin.v7.shared.ui.checkbox.CheckBoxState; +@Deprecated public class CheckBox extends AbstractField<Boolean> { private CheckBoxServerRpc rpc = new CheckBoxServerRpc() { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java index 5b96672be7..a0af67359e 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/ComboBox.java @@ -49,6 +49,7 @@ import com.vaadin.v7.shared.ui.combobox.FilteringMode; * */ @SuppressWarnings("serial") +@Deprecated public class ComboBox extends AbstractSelect implements AbstractSelect.Filtering, FieldEvents.BlurNotifier, FieldEvents.FocusNotifier { @@ -61,6 +62,7 @@ public class ComboBox extends AbstractSelect * @since 7.5.6 * @see ComboBox#setItemStyleGenerator(ItemStyleGenerator) */ + @Deprecated public interface ItemStyleGenerator extends Serializable { /** @@ -300,7 +302,7 @@ public class ComboBox extends AbstractSelect final boolean paintNullSelection = needNullSelectOption && currentPage == 0 && !nullFilteredOut; - List<ComboBoxItem> items = new ArrayList<ComboBoxItem>(); + List<ComboBoxItem> items = new ArrayList<>(); if (paintNullSelection) { ComboBoxItem item = new ComboBoxItem(); @@ -700,7 +702,7 @@ public class ComboBox extends AbstractSelect protected List<?> getFilteredOptions() { if (!isFilteringNeeded()) { prevfilterstring = null; - filteredOptions = new LinkedList<Object>(getItemIds()); + filteredOptions = new LinkedList<>(getItemIds()); return filteredOptions; } @@ -717,7 +719,7 @@ public class ComboBox extends AbstractSelect } prevfilterstring = filterstring; - filteredOptions = new LinkedList<Object>(); + filteredOptions = new LinkedList<>(); for (final Iterator<?> it = items.iterator(); it.hasNext();) { final Object itemId = it.next(); String caption = getItemCaption(itemId); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/CustomField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/CustomField.java index f55b3307a3..989bef22ec 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/CustomField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/CustomField.java @@ -45,6 +45,7 @@ import com.vaadin.v7.data.Property; * * @since 7.0 */ +@Deprecated public abstract class CustomField<T> extends AbstractField<T> implements HasComponents { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java index 14318cea8d..4ee2ee4648 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java @@ -67,6 +67,7 @@ import com.vaadin.v7.shared.ui.datefield.TextualDateFieldState; * @since 3.0 */ @SuppressWarnings("serial") +@Deprecated public class DateField extends AbstractField<Date> implements FieldEvents.BlurNotifier, FieldEvents.FocusNotifier, LegacyComponent { @@ -1005,6 +1006,7 @@ public class DateField extends AbstractField<Date> implements return timeZone; } + @Deprecated public static class UnparsableDateString extends Validator.InvalidValueException { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/DefaultFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/DefaultFieldFactory.java index da6441f48f..93ea91a9bb 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/DefaultFieldFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/DefaultFieldFactory.java @@ -33,6 +33,7 @@ import com.vaadin.v7.data.Property; * factories. * */ +@Deprecated public class DefaultFieldFactory implements FormFieldFactory, TableFieldFactory { 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 90fa058ec2..f89cf5544b 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 @@ -184,6 +184,7 @@ import elemental.json.JsonValue; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class Grid extends AbstractFocusable implements SelectionNotifier, SortNotifier, SelectiveRenderer, ItemClickNotifier { @@ -192,6 +193,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5.0 */ + @Deprecated public interface ColumnVisibilityChangeListener extends Serializable { /** * Called when a column has become hidden or unhidden. @@ -206,6 +208,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5.0 */ + @Deprecated public static class ColumnVisibilityChangeEvent extends Component.Event { private final Column column; @@ -272,6 +275,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @author Vaadin Ltd * @see DetailsGenerator#NULL */ + @Deprecated public interface DetailsGenerator extends Serializable { /** A details generator that provides no details */ @@ -309,6 +313,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6.1 */ + @Deprecated public final static class DetailComponentManager extends AbstractGridExtension implements DataGenerator { @@ -560,6 +565,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * Aims to fields of suitable type and with suitable size for use in the * editor row. */ + @Deprecated public static class EditorFieldFactory extends DefaultFieldGroupFieldFactory { private static final EditorFieldFactory INSTANCE = new EditorFieldFactory(); @@ -611,6 +617,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Error handler for the editor */ + @Deprecated public interface EditorErrorHandler extends Serializable { /** @@ -627,6 +634,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public static class GridContextClickEvent extends ContextClickEvent { private final Object itemId; @@ -692,6 +700,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * An event which is fired when saving the editor fails */ + @Deprecated public static class CommitErrorEvent extends Component.Event { private CommitException cause; @@ -775,6 +784,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5.0 */ + @Deprecated public interface ColumnReorderListener extends Serializable { /** @@ -791,6 +801,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5.0 */ + @Deprecated public static class ColumnReorderEvent extends Component.Event { private final boolean userOriginated; @@ -825,6 +836,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public interface ColumnResizeListener extends Serializable { /** @@ -842,6 +854,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public static class ColumnResizeEvent extends Component.Event { private final Column column; @@ -886,6 +899,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Interface for an editor event listener */ + @Deprecated public interface EditorListener extends Serializable { public static final Method EDITOR_OPEN_METHOD = ReflectTools.findMethod( @@ -925,6 +939,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Base class for editor related events */ + @Deprecated public static abstract class EditorEvent extends Component.Event { private Object itemID; @@ -946,6 +961,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * This event gets fired when an editor is opened */ + @Deprecated public static class EditorOpenEvent extends EditorEvent { public EditorOpenEvent(Grid source, Object itemID) { @@ -957,6 +973,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * This event gets fired when an editor is opened while another row is being * edited (i.e. editor focus moves elsewhere) */ + @Deprecated public static class EditorMoveEvent extends EditorEvent { public EditorMoveEvent(Grid source, Object itemID) { @@ -968,6 +985,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * This event gets fired when an editor is dismissed or closed by other * means. */ + @Deprecated public static class EditorCloseEvent extends EditorEvent { public EditorCloseEvent(Grid source, Object itemID) { @@ -979,6 +997,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * Default error handler for the editor * */ + @Deprecated public class DefaultEditorErrorHandler implements EditorErrorHandler { @Override @@ -1045,6 +1064,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @see Grid#setSelectionMode(SelectionMode) * @see Grid#setSelectionModel(SelectionModel) */ + @Deprecated public enum SelectionMode { /** A SelectionMode that maps to {@link SingleSelectionModel} */ SINGLE { @@ -1078,6 +1098,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * The server-side interface that controls Grid's selection state. * SelectionModel should extend {@link AbstractGridExtension}. */ + @Deprecated public interface SelectionModel extends Serializable, Extension { /** * Checks whether an item is selected or not. @@ -1127,6 +1148,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * something is forbidden to do in e.g. the user interface, it must also * be forbidden to do in the server-side and client-side APIs. */ + @Deprecated public interface Multi extends SelectionModel { /** @@ -1257,6 +1279,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * something is forbidden to do in e.g. the user interface, it must also * be forbidden to do in the server-side and client-side APIs. */ + @Deprecated public interface Single extends SelectionModel { /** @@ -1316,6 +1339,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * developer is unable to select something programmatically, it is not * allowed for the end-user to select anything, either. */ + @Deprecated public interface None extends SelectionModel { /** @@ -1340,6 +1364,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * A base class for SelectionModels that contains some of the logic that is * reusable. */ + @Deprecated public static abstract class AbstractSelectionModel extends AbstractGridExtension implements SelectionModel, DataGenerator { protected final LinkedHashSet<Object> selection = new LinkedHashSet<>(); @@ -1437,6 +1462,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * A default implementation of a {@link SelectionModel.Single} */ + @Deprecated public static class SingleSelectionModel extends AbstractSelectionModel implements SelectionModel.Single { @@ -1542,6 +1568,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * A default implementation for a {@link SelectionModel.None} */ + @Deprecated public static class NoSelectionModel extends AbstractSelectionModel implements SelectionModel.None { @@ -1569,6 +1596,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * A default implementation of a {@link SelectionModel.Multi} */ + @Deprecated public static class MultiSelectionModel extends AbstractSelectionModel implements SelectionModel.Multi { @@ -1901,6 +1929,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * should not be stored anywhere outside of the method providing these * instances. */ + @Deprecated public static class RowReference implements Serializable { private final Grid grid; @@ -1963,6 +1992,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * should not be stored anywhere outside of the method providing these * instances. */ + @Deprecated public static class CellReference implements Serializable { private final RowReference rowReference; @@ -2038,6 +2068,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @see Grid#setRowStyleGenerator(RowStyleGenerator) */ + @Deprecated public interface RowStyleGenerator extends Serializable { /** @@ -2056,6 +2087,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @see Grid#setCellStyleGenerator(CellStyleGenerator) */ + @Deprecated public interface CellStyleGenerator extends Serializable { /** @@ -2079,6 +2111,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public interface RowDescriptionGenerator extends Serializable { /** @@ -2103,6 +2136,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.6 */ + @Deprecated public interface CellDescriptionGenerator extends Serializable { /** @@ -2217,6 +2251,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @param <ROWTYPE> * the type of the rows in the section */ + @Deprecated public abstract static class StaticSection<ROWTYPE extends StaticSection.StaticRow<?>> implements Serializable { @@ -2226,6 +2261,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @param <CELLTYPE> * the type of the cells in the row */ + @Deprecated public abstract static class StaticRow<CELLTYPE extends StaticCell> implements Serializable { @@ -2481,6 +2517,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * A header or footer cell. Has a simple textual caption. */ + @Deprecated abstract static class StaticCell implements Serializable { private CellState cellState = new CellState(); @@ -2966,6 +3003,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Represents the header section of a Grid. */ + @Deprecated protected static class Header extends StaticSection<HeaderRow> { private HeaderRow defaultRow = null; @@ -3073,6 +3111,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Represents a header row in Grid. */ + @Deprecated public static class HeaderRow extends StaticSection.StaticRow<HeaderCell> { protected HeaderRow(StaticSection<?> section) { @@ -3125,6 +3164,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * Represents a header cell in Grid. Can be a merged cell for multiple * columns. */ + @Deprecated public static class HeaderCell extends StaticSection.StaticCell { protected HeaderCell(HeaderRow row) { @@ -3136,6 +3176,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * Represents the footer section of a Grid. By default Footer is not * visible. */ + @Deprecated protected static class Footer extends StaticSection<FooterRow> { private final GridStaticSectionState footerState = new GridStaticSectionState(); @@ -3164,6 +3205,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Represents a footer row in Grid. */ + @Deprecated public static class FooterRow extends StaticSection.StaticRow<FooterCell> { protected FooterRow(StaticSection<?> section) { @@ -3185,6 +3227,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Represents a footer cell in Grid. */ + @Deprecated public static class FooterCell extends StaticSection.StaticCell { protected FooterCell(FooterRow row) { @@ -3196,6 +3239,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * A column in the grid. Can be obtained by calling * {@link Grid#getColumn(Object propertyId)}. */ + @Deprecated public static class Column implements Serializable { /** @@ -4126,6 +4170,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @param <T> * the type this renderer knows how to present */ + @Deprecated public static abstract class AbstractRenderer<T> extends AbstractGridExtension implements Renderer<T> { @@ -4284,6 +4329,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * * @since 7.5 */ + @Deprecated public static abstract class AbstractGridExtension extends AbstractExtension { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/InlineDateField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/InlineDateField.java index 1bec2bc61e..7c4e7e1721 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/InlineDateField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/InlineDateField.java @@ -31,6 +31,7 @@ import com.vaadin.v7.data.Property; * @author Vaadin Ltd. * @since 5.0 */ +@Deprecated public class InlineDateField extends DateField { public InlineDateField() { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java index dc89fffabf..9836f33d20 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java @@ -56,6 +56,7 @@ import com.vaadin.v7.shared.ui.label.LabelState; * @since 3.0 */ @SuppressWarnings("serial") +@Deprecated public class Label extends AbstractComponent implements Property<String>, Property.Viewer, Property.ValueChangeListener, Property.ValueChangeNotifier, Comparable<Label> { @@ -331,6 +332,7 @@ public class Label extends AbstractComponent implements Property<String>, * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public static class ValueChangeEvent extends Component.Event implements Property.ValueChangeEvent { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/ListSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/ListSelect.java index 3b5683f55d..1e776c4878 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/ListSelect.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/ListSelect.java @@ -27,6 +27,7 @@ import com.vaadin.v7.data.Container; * lazyloading, and other advanced features. */ @SuppressWarnings("serial") +@Deprecated public class ListSelect extends AbstractSelect { private int rows = 0; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/NativeSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/NativeSelect.java index d68f184d43..752884663f 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/NativeSelect.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/NativeSelect.java @@ -33,6 +33,7 @@ import com.vaadin.v7.data.Container; * better choice. */ @SuppressWarnings("serial") +@Deprecated public class NativeSelect extends AbstractSelect implements FieldEvents.BlurNotifier, FieldEvents.FocusNotifier { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/OptionGroup.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/OptionGroup.java index c85e0ff631..0dba641909 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/OptionGroup.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/OptionGroup.java @@ -40,10 +40,11 @@ import com.vaadin.v7.shared.ui.optiongroup.OptionGroupState; * Configures select to be used as an option group. */ @SuppressWarnings("serial") +@Deprecated public class OptionGroup extends AbstractSelect implements FieldEvents.BlurNotifier, FieldEvents.FocusNotifier { - private Set<Object> disabledItemIds = new HashSet<Object>(); + private Set<Object> disabledItemIds = new HashSet<>(); public OptionGroup() { super(); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java index cf223b0779..317fc30f45 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java @@ -34,6 +34,7 @@ import com.vaadin.v7.shared.ui.datefield.PopupDateFieldState; * @author Vaadin Ltd. * @since 5.0 */ +@Deprecated public class PopupDateField extends DateField { private String inputPrompt = null; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/ProgressBar.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/ProgressBar.java index be730af130..14831d7d81 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/ProgressBar.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/ProgressBar.java @@ -34,6 +34,7 @@ import com.vaadin.v7.shared.ui.progressindicator.ProgressBarState; * @since 7.1 * @author Vaadin Ltd */ +@Deprecated public class ProgressBar extends AbstractField<Float> implements Property.Viewer, Property.ValueChangeListener { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/RichTextArea.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/RichTextArea.java index 15887e0fb0..ca638a98da 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/RichTextArea.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/RichTextArea.java @@ -34,6 +34,7 @@ import com.vaadin.v7.shared.ui.textarea.RichTextAreaState; * {@link RichTextArea} may produce unexpected results as formatting is counted * into length of field. */ +@Deprecated public class RichTextArea extends AbstractField<String> implements LegacyComponent { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Slider.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Slider.java index 81f17e0b79..15b083e38d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Slider.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Slider.java @@ -322,6 +322,7 @@ public class Slider extends AbstractField<Double> { * @author Vaadin Ltd. * */ + @Deprecated public class ValueOutOfBoundsException extends RuntimeException { private final Double value; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java index 5656a59af2..dc7b762c13 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java @@ -102,6 +102,7 @@ import com.vaadin.v7.shared.ui.table.TableState; * @author Vaadin Ltd. * @since 3.0 */ +@Deprecated @SuppressWarnings({ "deprecation" }) public class Table extends AbstractSelect implements Action.Container, Container.Ordered, Container.Sortable, ItemClickNotifier, DragSource, @@ -112,6 +113,7 @@ public class Table extends AbstractSelect implements Action.Container, /** * Modes that Table support as drag sourse. */ + @Deprecated public enum TableDragMode { /** * Table does not start drag and drop events. HTM5 style events started @@ -143,6 +145,7 @@ public class Table extends AbstractSelect implements Action.Container, protected static final int CELL_FIRSTCOL = 5; + @Deprecated public enum Align { /** * Left column alignment. <b>This is the default behaviour. </b> @@ -204,6 +207,7 @@ public class Table extends AbstractSelect implements Action.Container, @Deprecated public static final Align ALIGN_RIGHT = Align.RIGHT; + @Deprecated public enum ColumnHeaderMode { /** * Column headers are hidden. @@ -253,6 +257,7 @@ public class Table extends AbstractSelect implements Action.Container, @Deprecated public static final ColumnHeaderMode COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID = ColumnHeaderMode.EXPLICIT_DEFAULTS_ID; + @Deprecated public enum RowHeaderMode { /** * Row caption mode: The row headers are hidden. <b>This is the default @@ -382,57 +387,57 @@ public class Table extends AbstractSelect implements Action.Container, /** * Keymapper for column ids. */ - private final KeyMapper<Object> columnIdMap = new KeyMapper<Object>(); + private final KeyMapper<Object> columnIdMap = new KeyMapper<>(); /** * Holds visible column propertyIds - in order. */ - private LinkedList<Object> visibleColumns = new LinkedList<Object>(); + private LinkedList<Object> visibleColumns = new LinkedList<>(); /** * Holds noncollapsible columns. */ - private HashSet<Object> noncollapsibleColumns = new HashSet<Object>(); + private HashSet<Object> noncollapsibleColumns = new HashSet<>(); /** * Holds propertyIds of currently collapsed columns. */ - private final HashSet<Object> collapsedColumns = new HashSet<Object>(); + private final HashSet<Object> collapsedColumns = new HashSet<>(); /** * Holds headers for visible columns (by propertyId). */ - private final HashMap<Object, String> columnHeaders = new HashMap<Object, String>(); + private final HashMap<Object, String> columnHeaders = new HashMap<>(); /** * Holds footers for visible columns (by propertyId). */ - private final HashMap<Object, String> columnFooters = new HashMap<Object, String>(); + private final HashMap<Object, String> columnFooters = new HashMap<>(); /** * Holds icons for visible columns (by propertyId). */ - private final HashMap<Object, Resource> columnIcons = new HashMap<Object, Resource>(); + private final HashMap<Object, Resource> columnIcons = new HashMap<>(); /** * Holds alignments for visible columns (by propertyId). */ - private HashMap<Object, Align> columnAlignments = new HashMap<Object, Align>(); + private HashMap<Object, Align> columnAlignments = new HashMap<>(); /** * Holds column widths in pixels for visible columns (by propertyId). */ - private final HashMap<Object, Integer> columnWidths = new HashMap<Object, Integer>(); + private final HashMap<Object, Integer> columnWidths = new HashMap<>(); /** * Holds column expand rations for visible columns (by propertyId). */ - private final HashMap<Object, Float> columnExpandRatios = new HashMap<Object, Float>(); + private final HashMap<Object, Float> columnExpandRatios = new HashMap<>(); /** * Holds column generators */ - private final HashMap<Object, ColumnGenerator> columnGenerators = new LinkedHashMap<Object, ColumnGenerator>(); + private final HashMap<Object, ColumnGenerator> columnGenerators = new LinkedHashMap<>(); /** * Holds value of property pageLength. 0 disables paging. @@ -585,11 +590,11 @@ public class Table extends AbstractSelect implements Action.Container, private RowGenerator rowGenerator = null; - private final Map<Field<?>, Property<?>> associatedProperties = new HashMap<Field<?>, Property<?>>(); + private final Map<Field<?>, Property<?>> associatedProperties = new HashMap<>(); private boolean painted = false; - private HashMap<Object, Converter<String, Object>> propertyValueConverters = new HashMap<Object, Converter<String, Object>>(); + private HashMap<Object, Converter<String, Object>> propertyValueConverters = new HashMap<>(); /** * Set to true if the client-side should be informed that the key mapper has @@ -598,7 +603,7 @@ public class Table extends AbstractSelect implements Action.Container, */ private boolean keyMapperReset; - private List<Throwable> exceptionsDuringCachePopulation = new ArrayList<Throwable>(); + private List<Throwable> exceptionsDuringCachePopulation = new ArrayList<>(); private boolean isBeingPainted; @@ -682,7 +687,7 @@ public class Table extends AbstractSelect implements Action.Container, "Can not set visible columns to null value"); } - final LinkedList<Object> newVC = new LinkedList<Object>(); + final LinkedList<Object> newVC = new LinkedList<>(); // Checks that the new visible columns contains no nulls, properties // exist and that there are no duplicates before adding them to newVC. @@ -887,7 +892,7 @@ public class Table extends AbstractSelect implements Action.Container, } // Resets the alignments - final HashMap<Object, Align> newCA = new HashMap<Object, Align>(); + final HashMap<Object, Align> newCA = new HashMap<>(); int i = 0; for (final Iterator<Object> it = visibleColumns.iterator(); it.hasNext() && i < columnAlignments.length; i++) { @@ -1464,7 +1469,7 @@ public class Table extends AbstractSelect implements Action.Container, if (columnOrder == null || !isColumnReorderingAllowed()) { return; } - final LinkedList<Object> newOrder = new LinkedList<Object>(); + final LinkedList<Object> newOrder = new LinkedList<>(); for (int i = 0; i < columnOrder.length; i++) { if (columnOrder[i] != null && visibleColumns.contains(columnOrder[i])) { @@ -1786,6 +1791,7 @@ public class Table extends AbstractSelect implements Action.Container, * </p> * */ + @Deprecated public static class CacheUpdateException extends RuntimeException { private Throwable[] causes; private Table table; @@ -2194,8 +2200,8 @@ public class Table extends AbstractSelect implements Action.Container, if (replaceListeners) { // initialize the listener collections, this should only be done if // the entire cache is refreshed (through refreshRenderedCells) - listenedProperties = new HashSet<Property<?>>(); - visibleComponents = new HashSet<Component>(); + listenedProperties = new HashSet<>(); + visibleComponents = new HashSet<>(); } Object[][] cells = new Object[cols + CELL_FIRSTCOL][rows]; @@ -2636,7 +2642,7 @@ public class Table extends AbstractSelect implements Action.Container, throws UnsupportedOperationException { // remove generated columns from the list of columns being assigned - final LinkedList<Object> availableCols = new LinkedList<Object>(); + final LinkedList<Object> availableCols = new LinkedList<>(); for (Iterator<Object> it = visibleColumns.iterator(); it.hasNext();) { Object id = it.next(); if (!columnGenerators.containsKey(id)) { @@ -2727,7 +2733,7 @@ public class Table extends AbstractSelect implements Action.Container, } else { generated = Collections.emptyList(); } - List<Object> visibleIds = new ArrayList<Object>(); + List<Object> visibleIds = new ArrayList<>(); if (generated.isEmpty()) { visibleIds.addAll(newDataSource.getContainerPropertyIds()); } else { @@ -2769,7 +2775,7 @@ public class Table extends AbstractSelect implements Action.Container, newDataSource = new IndexedContainer(); } if (visibleIds == null) { - visibleIds = new ArrayList<Object>(); + visibleIds = new ArrayList<>(); } // Retain propertyValueConverters if their corresponding ids are @@ -2778,7 +2784,7 @@ public class Table extends AbstractSelect implements Action.Container, if (propertyValueConverters != null) { Collection<?> newPropertyIds = newDataSource .getContainerPropertyIds(); - LinkedList<Object> retainableValueConverters = new LinkedList<Object>(); + LinkedList<Object> retainableValueConverters = new LinkedList<>(); for (Object propertyId : newPropertyIds) { Converter<String, ?> converter = getConverter(propertyId); if (converter != null) { @@ -2811,7 +2817,7 @@ public class Table extends AbstractSelect implements Action.Container, } // don't add the same id twice - Collection<Object> col = new LinkedList<Object>(); + Collection<Object> col = new LinkedList<>(); for (Iterator<?> it = visibleIds.iterator(); it.hasNext();) { Object id = it.next(); if (!col.contains(id)) { @@ -2852,7 +2858,7 @@ public class Table extends AbstractSelect implements Action.Container, */ private LinkedHashSet<Object> getItemIdsInRange(Object itemId, final int length) { - LinkedHashSet<Object> ids = new LinkedHashSet<Object>(); + LinkedHashSet<Object> ids = new LinkedHashSet<>(); for (int i = 0; i < length; i++) { assert itemId != null; // should not be null unless client-server // are out of sync @@ -2875,7 +2881,7 @@ public class Table extends AbstractSelect implements Action.Container, Set<Object> renderedButNotSelectedItemIds = getCurrentlyRenderedItemIds(); @SuppressWarnings("unchecked") - HashSet<Object> newValue = new LinkedHashSet<Object>( + HashSet<Object> newValue = new LinkedHashSet<>( (Collection<Object>) getValue()); if (variables.containsKey("clearSelections")) { @@ -2930,7 +2936,7 @@ public class Table extends AbstractSelect implements Action.Container, } private Set<Object> getCurrentlyRenderedItemIds() { - HashSet<Object> ids = new HashSet<Object>(); + HashSet<Object> ids = new HashSet<>(); if (pageBuffer != null) { for (int i = 0; i < pageBuffer[CELL_ITEMID].length; i++) { ids.add(pageBuffer[CELL_ITEMID][i]); @@ -2964,7 +2970,7 @@ public class Table extends AbstractSelect implements Action.Container, if (!isSelectable() && variables.containsKey("selected")) { // Not-selectable is a special case, AbstractSelect does not support // TODO could be optimized. - variables = new HashMap<String, Object>(variables); + variables = new HashMap<>(variables); variables.remove("selected"); } @@ -2976,7 +2982,7 @@ public class Table extends AbstractSelect implements Action.Container, && variables.containsKey("selected") && multiSelectMode == MultiSelectMode.DEFAULT) { handleSelectedItems(variables); - variables = new HashMap<String, Object>(variables); + variables = new HashMap<>(variables); variables.remove("selected"); } @@ -3075,7 +3081,7 @@ public class Table extends AbstractSelect implements Action.Container, try { final Object[] ids = (Object[]) variables .get("collapsedcolumns"); - Set<Object> idSet = new HashSet<Object>(); + Set<Object> idSet = new HashSet<>(); for (Object id : ids) { idSet.add(columnIdMap.get(id.toString())); } @@ -3648,7 +3654,7 @@ public class Table extends AbstractSelect implements Action.Container, private void paintAvailableColumns(PaintTarget target) throws PaintException { if (columnCollapsingAllowed) { - final HashSet<Object> collapsedCols = new HashSet<Object>(); + final HashSet<Object> collapsedCols = new HashSet<>(); for (Object colId : visibleColumns) { if (isColumnCollapsed(colId)) { collapsedCols.add(colId); @@ -3772,7 +3778,7 @@ public class Table extends AbstractSelect implements Action.Container, private void paintVisibleColumnOrder(PaintTarget target) { // Visible column order - final ArrayList<String> visibleColOrder = new ArrayList<String>(); + final ArrayList<String> visibleColOrder = new ArrayList<>(); for (Object columnId : visibleColumns) { if (!isColumnCollapsed(columnId)) { visibleColOrder.add(columnIdMap.key(columnId)); @@ -3782,9 +3788,9 @@ public class Table extends AbstractSelect implements Action.Container, } private Set<Action> findAndPaintBodyActions(PaintTarget target) { - Set<Action> actionSet = new LinkedHashSet<Action>(); + Set<Action> actionSet = new LinkedHashSet<>(); if (actionHandlers != null) { - final ArrayList<String> keys = new ArrayList<String>(); + final ArrayList<String> keys = new ArrayList<>(); for (Handler ah : actionHandlers) { // Getting actions for the null item, which in this case means // the body item @@ -3846,7 +3852,7 @@ public class Table extends AbstractSelect implements Action.Container, } private String[] findSelectedKeys() { - LinkedList<String> selectedKeys = new LinkedList<String>(); + LinkedList<String> selectedKeys = new LinkedList<>(); if (isMultiSelect()) { HashSet<?> sel = new HashSet<Object>((Set<?>) getValue()); Collection<?> vids = getVisibleItemIds(); @@ -4002,7 +4008,7 @@ public class Table extends AbstractSelect implements Action.Container, // Actions if (actionHandlers != null) { - final ArrayList<String> keys = new ArrayList<String>(); + final ArrayList<String> keys = new ArrayList<>(); for (Handler ah : actionHandlers) { final Action[] aa = ah.getActions(itemId, this); if (aa != null) { @@ -4197,8 +4203,8 @@ public class Table extends AbstractSelect implements Action.Container, if (actionHandler != null) { if (actionHandlers == null) { - actionHandlers = new LinkedList<Handler>(); - actionMapper = new KeyMapper<Action>(); + actionHandlers = new LinkedList<>(); + actionMapper = new KeyMapper<>(); } if (!actionHandlers.contains(actionHandler)) { @@ -4536,7 +4542,7 @@ public class Table extends AbstractSelect implements Action.Container, @Override public Collection<?> getVisibleItemIds() { - final LinkedList<Object> visible = new LinkedList<Object>(); + final LinkedList<Object> visible = new LinkedList<>(); final Object[][] cells = getVisibleCells(); // may be null if the table has not been rendered yet (e.g. not attached @@ -4618,8 +4624,7 @@ public class Table extends AbstractSelect implements Action.Container, Collection<?> containerPropertyIds = getContainerDataSource() .getContainerPropertyIds(); - LinkedList<Object> newVisibleColumns = new LinkedList<Object>( - visibleColumns); + LinkedList<Object> newVisibleColumns = new LinkedList<>(visibleColumns); for (Iterator<Object> iterator = newVisibleColumns.iterator(); iterator .hasNext();) { Object id = iterator.next(); @@ -5047,6 +5052,7 @@ public class Table extends AbstractSelect implements Action.Container, * Table.addGeneratedColumn along with an id for the column to be generated. * */ + @Deprecated public interface ColumnGenerator extends Serializable { /** @@ -5097,6 +5103,7 @@ public class Table extends AbstractSelect implements Action.Container, * to the cell content is <tt>v-table-cell-content-[style name]</tt>, and * the row style will be <tt>v-table-row-[style name]</tt>. */ + @Deprecated public interface CellStyleGenerator extends Serializable { /** @@ -5188,6 +5195,7 @@ public class Table extends AbstractSelect implements Action.Container, * * @since 6.3 */ + @Deprecated public class TableTransferable extends DataBoundTransferable { protected TableTransferable(Map<String, Object> rawVariables) { @@ -5277,6 +5285,7 @@ public class Table extends AbstractSelect implements Action.Container, * initialized from server and no subsequent requests requests are needed * during that drag and drop operation. */ + @Deprecated public static abstract class TableDropCriterion extends ServerSideCriterion { @@ -5362,6 +5371,7 @@ public class Table extends AbstractSelect implements Action.Container, * the column which header was pressed and details about the mouse event * itself. */ + @Deprecated public static class HeaderClickEvent extends ClickEvent { public static final Method HEADER_CLICK_METHOD; @@ -5402,6 +5412,7 @@ public class Table extends AbstractSelect implements Action.Container, * the column which header was pressed and details about the mouse event * itself. */ + @Deprecated public static class FooterClickEvent extends ClickEvent { public static final Method FOOTER_CLICK_METHOD; @@ -5450,6 +5461,7 @@ public class Table extends AbstractSelect implements Action.Container, * Interface for the listener for column header mouse click events. The * headerClick method is called when the user presses a header column cell. */ + @Deprecated public interface HeaderClickListener extends Serializable { /** @@ -5466,6 +5478,7 @@ public class Table extends AbstractSelect implements Action.Container, * Interface for the listener for column footer mouse click events. The * footerClick method is called when the user presses a footer column cell. */ + @Deprecated public interface FooterClickListener extends Serializable { /** @@ -5632,6 +5645,7 @@ public class Table extends AbstractSelect implements Action.Container, * columns property id which was fired, the previous width of the column and * the width of the column after the resize. */ + @Deprecated public static class ColumnResizeEvent extends Component.Event { public static final Method COLUMN_RESIZE_METHOD; @@ -5701,6 +5715,7 @@ public class Table extends AbstractSelect implements Action.Container, /** * Interface for listening to column resize events. */ + @Deprecated public interface ColumnResizeListener extends Serializable { /** @@ -5759,6 +5774,7 @@ public class Table extends AbstractSelect implements Action.Container, /** * This event is fired when a columns are reordered by the end user user. */ + @Deprecated public static class ColumnReorderEvent extends Component.Event { public static final Method METHOD; @@ -5788,6 +5804,7 @@ public class Table extends AbstractSelect implements Action.Container, /** * Interface for listening to column reorder events. */ + @Deprecated public interface ColumnReorderListener extends Serializable { /** @@ -5803,6 +5820,7 @@ public class Table extends AbstractSelect implements Action.Container, * * @since 7.6 */ + @Deprecated public static class ColumnCollapseEvent extends Component.Event { public static final Method METHOD = ReflectTools.findMethod( @@ -5838,6 +5856,7 @@ public class Table extends AbstractSelect implements Action.Container, * * @since 7.6 */ + @Deprecated public interface ColumnCollapseListener extends Serializable { /** @@ -5949,6 +5968,7 @@ public class Table extends AbstractSelect implements Action.Container, * * Row generators can be used for e.g. summary rows or grouping of items. */ + @Deprecated public interface RowGenerator extends Serializable { /** * Called for every row that is painted in the Table. Returning a @@ -5983,6 +6003,7 @@ public class Table extends AbstractSelect implements Action.Container, public GeneratedRow generateRow(Table table, Object itemId); } + @Deprecated public static class GeneratedRow implements Serializable { private boolean htmlContentAllowed = false; private boolean spanColumns = false; @@ -6168,7 +6189,7 @@ public class Table extends AbstractSelect implements Action.Container, if (colgroup != null) { int i = 0; - List<Object> pIds = new ArrayList<Object>(); + List<Object> pIds = new ArrayList<>(); for (Element col : colgroup.children()) { if (!col.tagName().equals("col")) { throw new DesignException("invalid column"); @@ -6270,7 +6291,7 @@ public class Table extends AbstractSelect implements Action.Container, return; } - Set<String> selected = new HashSet<String>(); + Set<String> selected = new HashSet<>(); for (Element tr : tbody.children()) { readItem(tr, selected, context); } @@ -6426,6 +6447,7 @@ public class Table extends AbstractSelect implements Action.Container, * * @since 7.6 */ + @Deprecated public static class TableContextClickEvent extends ContextClickEvent { private final Object itemId; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java index 014c86c72f..676f2f6366 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java @@ -33,6 +33,7 @@ import com.vaadin.v7.data.Container; * @since 6.0 * @see FormFieldFactory */ +@Deprecated public interface TableFieldFactory extends Serializable { /** * Creates a field based on the Container, item id, property id and the diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/TextArea.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/TextArea.java index 8375649716..c635c0835c 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/TextArea.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/TextArea.java @@ -26,6 +26,7 @@ import com.vaadin.v7.shared.ui.textarea.TextAreaState; /** * A text field that supports multi line editing. */ +@Deprecated public class TextArea extends AbstractTextField { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java index 87917ffa53..9a3403e3d4 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Tree.java @@ -76,6 +76,7 @@ import com.vaadin.v7.shared.ui.tree.TreeState; * @since 3.0 */ @SuppressWarnings({ "serial", "deprecation" }) +@Deprecated public class Tree extends AbstractSelect implements Container.Hierarchical, Action.Container, ItemClickNotifier, DragSource, DropTarget { @@ -84,6 +85,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * * @since 7.6 */ + @Deprecated public static class TreeContextClickEvent extends ContextClickEvent { private final Object itemId; @@ -117,12 +119,12 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, /** * Item icons alt texts. */ - private final HashMap<Object, String> itemIconAlts = new HashMap<Object, String>(); + private final HashMap<Object, String> itemIconAlts = new HashMap<>(); /** * Set of expanded nodes. */ - private HashSet<Object> expanded = new HashSet<Object>(); + private HashSet<Object> expanded = new HashSet<>(); /** * List of action handlers. @@ -163,6 +165,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, /** * Supported drag modes for Tree. */ + @Deprecated public enum TreeDragMode { /** * When drag mode is NONE, dragging from Tree is not supported. Browsers @@ -369,7 +372,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, boolean result = true; // Initial stack - final Stack<Object> todo = new Stack<Object>(); + final Stack<Object> todo = new Stack<>(); todo.add(startItemId); // Expands recursively @@ -422,7 +425,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, boolean result = true; // Initial stack - final Stack<Object> todo = new Stack<Object>(); + final Stack<Object> todo = new Stack<>(); todo.add(startItemId); // Collapse recursively @@ -522,7 +525,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, if (!isSelectable() && variables.containsKey("selected")) { // Not-selectable is a special case, AbstractSelect does not support // TODO could be optimized. - variables = new HashMap<String, Object>(variables); + variables = new HashMap<>(variables); variables.remove("selected"); } @@ -561,7 +564,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, if (variables.containsKey("selected") && isMultiSelect() && multiSelectMode == MultiSelectMode.DEFAULT) { handleSelectedItems(variables); - variables = new HashMap<String, Object>(variables); + variables = new HashMap<>(variables); variables.remove("selected"); } @@ -595,7 +598,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, final String[] ka = (String[]) variables.get("selected"); // Converts the key-array to id-set - final LinkedList<Object> s = new LinkedList<Object>(); + final LinkedList<Object> s = new LinkedList<>(); for (int i = 0; i < ka.length; i++) { final Object id = itemIdMapper.get(ka[i]); if (!isNullSelectionAllowed() @@ -666,15 +669,15 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, } // Initialize variables - final Set<Action> actionSet = new LinkedHashSet<Action>(); + final Set<Action> actionSet = new LinkedHashSet<>(); // rendered selectedKeys - LinkedList<String> selectedKeys = new LinkedList<String>(); + LinkedList<String> selectedKeys = new LinkedList<>(); - final LinkedList<String> expandedKeys = new LinkedList<String>(); + final LinkedList<String> expandedKeys = new LinkedList<>(); // Iterates through hierarchical tree using a stack of iterators - final Stack<Iterator<?>> iteratorStack = new Stack<Iterator<?>>(); + final Stack<Iterator<?>> iteratorStack = new Stack<>(); Collection<?> ids; if (partialUpdate) { ids = getChildren(expandedItemId); @@ -691,7 +694,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * by right clicking on the Tree body */ if (actionHandlers != null) { - final ArrayList<String> keys = new ArrayList<String>(); + final ArrayList<String> keys = new ArrayList<>(); for (Handler ah : actionHandlers) { // Getting action for the null item, which in this case @@ -780,7 +783,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, // Actions if (actionHandlers != null) { - final ArrayList<String> keys = new ArrayList<String>(); + final ArrayList<String> keys = new ArrayList<>(); final Iterator<Action.Handler> ahi = actionHandlers .iterator(); while (ahi.hasNext()) { @@ -1028,6 +1031,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public static class ExpandEvent extends Component.Event { private final Object expandedItemId; @@ -1060,6 +1064,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface ExpandListener extends Serializable { public static final Method EXPAND_METHOD = ReflectTools.findMethod( @@ -1131,6 +1136,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public static class CollapseEvent extends Component.Event { private final Object collapsedItemId; @@ -1163,6 +1169,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * @author Vaadin Ltd. * @since 3.0 */ + @Deprecated public interface CollapseListener extends Serializable { public static final Method COLLAPSE_METHOD = ReflectTools.findMethod( @@ -1240,8 +1247,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, if (actionHandler != null) { if (actionHandlers == null) { - actionHandlers = new LinkedList<Action.Handler>(); - actionMapper = new KeyMapper<Action>(); + actionHandlers = new LinkedList<>(); + actionMapper = new KeyMapper<>(); } if (!actionHandlers.contains(actionHandler)) { @@ -1289,10 +1296,10 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, @Override public Collection<?> getVisibleItemIds() { - final LinkedList<Object> visible = new LinkedList<Object>(); + final LinkedList<Object> visible = new LinkedList<>(); // Iterates trough hierarchical tree using a stack of iterators - final Stack<Iterator<?>> iteratorStack = new Stack<Iterator<?>>(); + final Stack<Iterator<?>> iteratorStack = new Stack<>(); final Collection<?> ids = rootItemIds(); if (ids != null) { iteratorStack.push(ids.iterator()); @@ -1418,6 +1425,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * CSS class name that will be added to the item content is * <tt>v-tree-node-[style name]</tt>. */ + @Deprecated public interface ItemStyleGenerator extends Serializable { /** @@ -1454,6 +1462,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * * @since 6.3 */ + @Deprecated public class TreeTargetDetails extends AbstractSelectTargetDetails { TreeTargetDetails(Map<String, Object> rawVariables) { @@ -1584,6 +1593,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * * @since 6.3 */ + @Deprecated protected class TreeTransferable extends DataBoundTransferable { public TreeTransferable(Component sourceComponent, @@ -1630,6 +1640,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * initialized from server and no subsequent requests requests are needed * during that drag and drop operation. */ + @Deprecated public static abstract class TreeDropCriterion extends ServerSideCriterion { private Tree tree; @@ -1702,6 +1713,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * * @since 6.3 */ + @Deprecated public static class TargetItemAllowsChildren extends TargetDetailIs { private static TargetItemAllowsChildren instance = new TargetItemAllowsChildren(); @@ -1748,6 +1760,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * <p> * The root items is also consider to be valid target. */ + @Deprecated public class TargetInSubtree extends ClientSideCriterion { private Object rootId; @@ -1836,7 +1849,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, } private void cleanupExpandedItems() { - Set<Object> removedItemIds = new HashSet<Object>(); + Set<Object> removedItemIds = new HashSet<>(); for (Object expandedItemId : expanded) { if (getItem(expandedItemId) == null) { removedItemIds.add(expandedItemId); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/TreeTable.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/TreeTable.java index f9a35f2b46..4192883098 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/TreeTable.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/TreeTable.java @@ -68,6 +68,7 @@ import com.vaadin.v7.ui.Tree.ExpandListener; * share UI state in the container. */ @SuppressWarnings({ "serial" }) +@Deprecated public class TreeTable extends Table implements Hierarchical { private interface ContainerStrategy extends Serializable { @@ -196,7 +197,7 @@ public class TreeTable extends Table implements Hierarchical { */ private class HierarchicalStrategy extends AbstractStrategy { - private final HashSet<Object> openItems = new HashSet<Object>(); + private final HashSet<Object> openItems = new HashSet<>(); @Override public boolean isNodeOpen(Object itemId) { @@ -283,7 +284,7 @@ public class TreeTable extends Table implements Hierarchical { */ private List<Object> getPreOrder() { if (preOrder == null) { - preOrder = new ArrayList<Object>(); + preOrder = new ArrayList<>(); Collection<?> rootItemIds = getContainerDataSource() .rootItemIds(); for (Object id : rootItemIds) { @@ -894,7 +895,7 @@ public class TreeTable extends Table implements Hierarchical { @Override protected List<Object> getItemIds(int firstIndex, int rows) { - List<Object> itemIds = new ArrayList<Object>(); + List<Object> itemIds = new ArrayList<>(); for (int i = firstIndex; i < firstIndex + rows; i++) { itemIds.add(getIdByIndex(i)); } @@ -908,8 +909,8 @@ public class TreeTable extends Table implements Hierarchical { return; } - Set<String> selected = new HashSet<String>(); - Stack<Object> parents = new Stack<Object>(); + Set<String> selected = new HashSet<>(); + Stack<Object> parents = new Stack<>(); int lastDepth = -1; for (Element tr : tbody.children()) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/TwinColSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/TwinColSelect.java index 4766d938ea..50d9e60bb6 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/TwinColSelect.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/TwinColSelect.java @@ -29,6 +29,7 @@ import com.vaadin.v7.shared.ui.twincolselect.TwinColSelectState; * side for selected items. */ @SuppressWarnings("serial") +@Deprecated public class TwinColSelect extends AbstractSelect { private int rows = 0; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarComponentEvent.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarComponentEvent.java index 230d87b7f7..e3f1bce837 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarComponentEvent.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarComponentEvent.java @@ -26,6 +26,7 @@ import com.vaadin.v7.ui.Calendar; * */ @SuppressWarnings("serial") +@Deprecated public class CalendarComponentEvent extends Component.Event { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarComponentEvents.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarComponentEvents.java index ea892a6b9d..a272b1444f 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarComponentEvents.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarComponentEvents.java @@ -31,11 +31,13 @@ import com.vaadin.v7.ui.components.calendar.event.CalendarEvent; * @since 7.1.0 * @author Vaadin Ltd. */ +@Deprecated public interface CalendarComponentEvents extends Serializable { /** * Notifier interface for notifying listener of calendar events */ + @Deprecated public interface CalendarEventNotifier extends Serializable { /** * Get the assigned event handler for the given eventId. @@ -49,6 +51,7 @@ public interface CalendarComponentEvents extends Serializable { /** * Notifier interface for event drag & drops. */ + @Deprecated public interface EventMoveNotifier extends CalendarEventNotifier { /** @@ -65,6 +68,7 @@ public interface CalendarComponentEvents extends Serializable { * MoveEvent is sent when existing event is dragged to a new position. */ @SuppressWarnings("serial") + @Deprecated public class MoveEvent extends CalendarComponentEvent { public static final String EVENT_ID = CalendarEventId.EVENTMOVE; @@ -116,6 +120,7 @@ public interface CalendarComponentEvents extends Serializable { * Handler interface for when events are being dragged on the calendar * */ + @Deprecated public interface EventMoveHandler extends EventListener, Serializable { /** Trigger method for the MoveEvent. */ @@ -136,6 +141,7 @@ public interface CalendarComponentEvents extends Serializable { /** * Handler interface for day or time cell drag-marking with mouse. */ + @Deprecated public interface RangeSelectNotifier extends Serializable, CalendarEventNotifier { @@ -153,6 +159,7 @@ public interface CalendarComponentEvents extends Serializable { * mouse. */ @SuppressWarnings("serial") + @Deprecated public class RangeSelectEvent extends CalendarComponentEvent { public static final String EVENT_ID = CalendarEventId.RANGESELECT; @@ -221,6 +228,7 @@ public interface CalendarComponentEvents extends Serializable { } /** RangeSelectHandler handles RangeSelectEvent. */ + @Deprecated public interface RangeSelectHandler extends EventListener, Serializable { /** Trigger method for the RangeSelectEvent. */ @@ -239,6 +247,7 @@ public interface CalendarComponentEvents extends Serializable { } /** Notifier interface for navigation listening. */ + @Deprecated public interface NavigationNotifier extends Serializable { /** * Add a forward navigation listener. @@ -285,6 +294,7 @@ public interface CalendarComponentEvents extends Serializable { * ForwardEvent is sent when forward navigation button is clicked. */ @SuppressWarnings("serial") + @Deprecated public class ForwardEvent extends CalendarComponentEvent { public static final String EVENT_ID = CalendarEventId.FORWARD; @@ -301,6 +311,7 @@ public interface CalendarComponentEvents extends Serializable { } /** ForwardHandler handles ForwardEvent. */ + @Deprecated public interface ForwardHandler extends EventListener, Serializable { /** Trigger method for the ForwardEvent. */ @@ -320,6 +331,7 @@ public interface CalendarComponentEvents extends Serializable { * BackwardEvent is sent when backward navigation button is clicked. */ @SuppressWarnings("serial") + @Deprecated public class BackwardEvent extends CalendarComponentEvent { public static final String EVENT_ID = CalendarEventId.BACKWARD; @@ -336,6 +348,7 @@ public interface CalendarComponentEvents extends Serializable { } /** BackwardHandler handles BackwardEvent. */ + @Deprecated public interface BackwardHandler extends EventListener, Serializable { /** Trigger method for the BackwardEvent. */ @@ -355,6 +368,7 @@ public interface CalendarComponentEvents extends Serializable { * DateClickEvent is sent when a date is clicked. */ @SuppressWarnings("serial") + @Deprecated public class DateClickEvent extends CalendarComponentEvent { public static final String EVENT_ID = CalendarEventId.DATECLICK; @@ -379,6 +393,7 @@ public interface CalendarComponentEvents extends Serializable { } /** DateClickHandler handles DateClickEvent. */ + @Deprecated public interface DateClickHandler extends EventListener, Serializable { /** Trigger method for the DateClickEvent. */ @@ -398,6 +413,7 @@ public interface CalendarComponentEvents extends Serializable { * EventClick is sent when an event is clicked. */ @SuppressWarnings("serial") + @Deprecated public class EventClick extends CalendarComponentEvent { public static final String EVENT_ID = CalendarEventId.EVENTCLICK; @@ -422,6 +438,7 @@ public interface CalendarComponentEvents extends Serializable { } /** EventClickHandler handles EventClick. */ + @Deprecated public interface EventClickHandler extends EventListener, Serializable { /** Trigger method for the EventClick. */ @@ -441,6 +458,7 @@ public interface CalendarComponentEvents extends Serializable { * WeekClick is sent when week is clicked. */ @SuppressWarnings("serial") + @Deprecated public class WeekClick extends CalendarComponentEvent { public static final String EVENT_ID = CalendarEventId.WEEKCLICK; @@ -489,6 +507,7 @@ public interface CalendarComponentEvents extends Serializable { } /** WeekClickHandler handles WeekClicks. */ + @Deprecated public interface WeekClickHandler extends EventListener, Serializable { /** Trigger method for the WeekClick. */ @@ -508,6 +527,7 @@ public interface CalendarComponentEvents extends Serializable { * EventResize is sent when an event is resized */ @SuppressWarnings("serial") + @Deprecated public class EventResize extends CalendarComponentEvent { public static final String EVENT_ID = CalendarEventId.EVENTRESIZE; @@ -577,6 +597,7 @@ public interface CalendarComponentEvents extends Serializable { /** * Notifier interface for event resizing. */ + @Deprecated public interface EventResizeNotifier extends Serializable { /** @@ -591,6 +612,7 @@ public interface CalendarComponentEvents extends Serializable { /** * Handler for EventResize event. */ + @Deprecated public interface EventResizeHandler extends EventListener, Serializable { /** Trigger method for the EventResize. */ diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarDateRange.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarDateRange.java index 69a4123c1b..bc8fa4e32c 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarDateRange.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarDateRange.java @@ -27,6 +27,7 @@ import java.util.TimeZone; * */ @SuppressWarnings("serial") +@Deprecated public class CalendarDateRange implements Serializable { private Date start; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java index ab439e9d12..6be54f1811 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java @@ -33,6 +33,7 @@ import com.vaadin.v7.ui.Calendar; * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class CalendarTargetDetails extends TargetDetailsImpl { private boolean hasDropTime; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/ContainerEventProvider.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/ContainerEventProvider.java index 961b2d8fec..4f15272eb0 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/ContainerEventProvider.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/ContainerEventProvider.java @@ -50,6 +50,7 @@ import com.vaadin.v7.ui.components.calendar.event.CalendarEventProvider.EventSet * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class ContainerEventProvider implements CalendarEditableEventProvider, EventSetChangeNotifier, EventChangeNotifier, EventMoveHandler, EventResizeHandler, @@ -84,14 +85,14 @@ public class ContainerEventProvider /** * Listeners attached to the container */ - private final List<EventSetChangeListener> eventSetChangeListeners = new LinkedList<CalendarEventProvider.EventSetChangeListener>(); - private final List<EventChangeListener> eventChangeListeners = new LinkedList<CalendarEvent.EventChangeListener>(); + private final List<EventSetChangeListener> eventSetChangeListeners = new LinkedList<>(); + private final List<EventChangeListener> eventChangeListeners = new LinkedList<>(); /** * The event cache contains the events previously created by * {@link #getEvents(Date, Date)} */ - private final List<CalendarEvent> eventCache = new LinkedList<CalendarEvent>(); + private final List<CalendarEvent> eventCache = new LinkedList<>(); /** * The container used as datasource diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEvent.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEvent.java index f1b6524d2c..3f899debd7 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEvent.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEvent.java @@ -30,6 +30,7 @@ import com.vaadin.v7.ui.components.calendar.event.CalendarEvent.EventChangeNotif * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { private String caption; @@ -37,7 +38,7 @@ public class BasicEvent implements EditableCalendarEvent, EventChangeNotifier { private Date end; private Date start; private String styleName; - private transient List<EventChangeListener> listeners = new ArrayList<EventChangeListener>(); + private transient List<EventChangeListener> listeners = new ArrayList<>(); private boolean isAllDay; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEventProvider.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEventProvider.java index 59c8baca9c..2fa32f93e3 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEventProvider.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/BasicEventProvider.java @@ -42,12 +42,13 @@ import com.vaadin.v7.ui.components.calendar.event.CalendarEventProvider.EventSet * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class BasicEventProvider implements CalendarEditableEventProvider, EventSetChangeNotifier, CalendarEvent.EventChangeListener { - protected List<CalendarEvent> eventList = new ArrayList<CalendarEvent>(); + protected List<CalendarEvent> eventList = new ArrayList<>(); - private List<EventSetChangeListener> listeners = new ArrayList<EventSetChangeListener>(); + private List<EventSetChangeListener> listeners = new ArrayList<>(); /* * (non-Javadoc) @@ -58,7 +59,7 @@ public class BasicEventProvider implements CalendarEditableEventProvider, */ @Override public List<CalendarEvent> getEvents(Date startDate, Date endDate) { - ArrayList<CalendarEvent> activeEvents = new ArrayList<CalendarEvent>(); + ArrayList<CalendarEvent> activeEvents = new ArrayList<>(); for (CalendarEvent ev : eventList) { long from = startDate.getTime(); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEditableEventProvider.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEditableEventProvider.java index 90f8992720..6092fe2208 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEditableEventProvider.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEditableEventProvider.java @@ -22,6 +22,7 @@ package com.vaadin.v7.ui.components.calendar.event; * @since 7.1.0 * @author Vaadin Ltd. */ +@Deprecated public interface CalendarEditableEventProvider extends CalendarEventProvider { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEvent.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEvent.java index 9aaa1cd5ba..cfc3d44c1f 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEvent.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEvent.java @@ -33,6 +33,7 @@ import java.util.Date; * @author Vaadin Ltd. * */ +@Deprecated public interface CalendarEvent extends Serializable { /** @@ -93,6 +94,7 @@ public interface CalendarEvent extends Serializable { * Event to signal that an event has changed. */ @SuppressWarnings("serial") + @Deprecated public class EventChangeEvent implements Serializable { private CalendarEvent source; @@ -113,6 +115,7 @@ public interface CalendarEvent extends Serializable { /** * Listener for EventSetChange events. */ + @Deprecated public interface EventChangeListener extends Serializable { /** @@ -124,6 +127,7 @@ public interface CalendarEvent extends Serializable { /** * Notifier interface for EventChange events. */ + @Deprecated public interface EventChangeNotifier extends Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEventProvider.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEventProvider.java index bef6aaea18..831b6c1731 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEventProvider.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/CalendarEventProvider.java @@ -26,6 +26,7 @@ import java.util.List; * @since 7.1.0 * @author Vaadin Ltd. */ +@Deprecated public interface CalendarEventProvider extends Serializable { /** * <p> @@ -58,6 +59,7 @@ public interface CalendarEventProvider extends Serializable { * */ @SuppressWarnings("serial") + @Deprecated public class EventSetChangeEvent implements Serializable { private CalendarEventProvider source; @@ -79,6 +81,7 @@ public interface CalendarEventProvider extends Serializable { /** * Listener for EventSetChange events. */ + @Deprecated public interface EventSetChangeListener extends Serializable { /** @@ -90,6 +93,7 @@ public interface CalendarEventProvider extends Serializable { /** * Notifier interface for EventSetChange events. */ + @Deprecated public interface EventSetChangeNotifier extends Serializable { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/EditableCalendarEvent.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/EditableCalendarEvent.java index cb3553ec87..eb7d12a058 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/EditableCalendarEvent.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/event/EditableCalendarEvent.java @@ -35,6 +35,7 @@ import java.util.Date; * @since 7.1 * @author Vaadin Ltd. */ +@Deprecated public interface EditableCalendarEvent extends CalendarEvent { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicBackwardHandler.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicBackwardHandler.java index 3f38d19a4f..677ba4ed7b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicBackwardHandler.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicBackwardHandler.java @@ -29,6 +29,7 @@ import com.vaadin.v7.ui.components.calendar.CalendarComponentEvents.BackwardHand * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class BasicBackwardHandler implements BackwardHandler { /* diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicDateClickHandler.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicDateClickHandler.java index 381acb6b1d..d90d94d774 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicDateClickHandler.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicDateClickHandler.java @@ -29,6 +29,7 @@ import com.vaadin.v7.ui.components.calendar.CalendarComponentEvents.DateClickHan * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class BasicDateClickHandler implements DateClickHandler { /* diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicEventMoveHandler.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicEventMoveHandler.java index be27b606fe..cb1422d90b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicEventMoveHandler.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicEventMoveHandler.java @@ -29,6 +29,7 @@ import com.vaadin.v7.ui.components.calendar.event.EditableCalendarEvent; * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class BasicEventMoveHandler implements EventMoveHandler { /* diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicEventResizeHandler.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicEventResizeHandler.java index 9b6f08ff09..5a722e9365 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicEventResizeHandler.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicEventResizeHandler.java @@ -29,6 +29,7 @@ import com.vaadin.v7.ui.components.calendar.event.EditableCalendarEvent; * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class BasicEventResizeHandler implements EventResizeHandler { /* diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicForwardHandler.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicForwardHandler.java index aa13c650ef..1d5007c0fd 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicForwardHandler.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicForwardHandler.java @@ -29,6 +29,7 @@ import com.vaadin.v7.ui.components.calendar.CalendarComponentEvents.ForwardHandl * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class BasicForwardHandler implements ForwardHandler { /* diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicWeekClickHandler.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicWeekClickHandler.java index 420d0a76f6..7827127973 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicWeekClickHandler.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicWeekClickHandler.java @@ -30,6 +30,7 @@ import com.vaadin.v7.ui.components.calendar.CalendarComponentEvents.WeekClickHan * @author Vaadin Ltd. */ @SuppressWarnings("serial") +@Deprecated public class BasicWeekClickHandler implements WeekClickHandler { /* diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/AbstractJavaScriptRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/AbstractJavaScriptRenderer.java index 2d0ac7f62e..755c3fcc60 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/AbstractJavaScriptRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/AbstractJavaScriptRenderer.java @@ -109,6 +109,7 @@ import elemental.json.JsonValue; * @author Vaadin Ltd * @since 7.4 */ +@Deprecated public abstract class AbstractJavaScriptRenderer<T> extends AbstractRenderer<T> { private JavaScriptCallbackHelper callbackHelper = new JavaScriptCallbackHelper( diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ButtonRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ButtonRenderer.java index 906fc025bb..ffd41ecd4b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ButtonRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ButtonRenderer.java @@ -23,6 +23,7 @@ package com.vaadin.v7.ui.renderers; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class ButtonRenderer extends ClickableRenderer<String> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ClickableRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ClickableRenderer.java index bd63e08c93..9ea9e365e1 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ClickableRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ClickableRenderer.java @@ -37,6 +37,7 @@ import com.vaadin.v7.ui.Grid.Column; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class ClickableRenderer<T> extends AbstractRenderer<T> { /** @@ -45,6 +46,7 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> { * * @see {@link ButtonRenderer#addClickListener(RendererClickListener)} */ + @Deprecated public interface RendererClickListener extends ConnectorEventListener { static final Method CLICK_METHOD = ReflectTools.findMethod( @@ -62,6 +64,7 @@ public class ClickableRenderer<T> extends AbstractRenderer<T> { /** * An event fired when a button rendered by a ButtonRenderer is clicked. */ + @Deprecated public static class RendererClickEvent extends ClickEvent { private Object itemId; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/DateRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/DateRenderer.java index ac3b831acc..95e22919ae 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/DateRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/DateRenderer.java @@ -29,6 +29,7 @@ import elemental.json.JsonValue; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class DateRenderer extends AbstractRenderer<Date> { private final Locale locale; private final String formatString; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/HtmlRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/HtmlRenderer.java index 5264f19e0b..cd4dc2083d 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/HtmlRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/HtmlRenderer.java @@ -23,6 +23,7 @@ import com.vaadin.v7.ui.Grid.AbstractRenderer; * @author Vaadin Ltd * @since 7.4 */ +@Deprecated public class HtmlRenderer extends AbstractRenderer<String> { /** * Creates a new HTML renderer. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ImageRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ImageRenderer.java index 19c7a77b01..55d80b99ab 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ImageRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ImageRenderer.java @@ -33,6 +33,7 @@ import elemental.json.JsonValue; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class ImageRenderer extends ClickableRenderer<Resource> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/NumberRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/NumberRenderer.java index 061f6d5790..871657411a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/NumberRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/NumberRenderer.java @@ -28,6 +28,7 @@ import elemental.json.JsonValue; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class NumberRenderer extends AbstractRenderer<Number> { private final Locale locale; private final NumberFormat numberFormat; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ProgressBarRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ProgressBarRenderer.java index d19c09ec59..76210bf3bc 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ProgressBarRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/ProgressBarRenderer.java @@ -25,6 +25,7 @@ import elemental.json.JsonValue; * @author Vaadin Ltd * @since 7.4 */ +@Deprecated public class ProgressBarRenderer extends AbstractRenderer<Double> { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/Renderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/Renderer.java index ce221760cc..97fd25ff4b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/Renderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/Renderer.java @@ -33,6 +33,7 @@ import elemental.json.JsonValue; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public interface Renderer<T> extends Extension { /** diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/TextRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/TextRenderer.java index 23306baf75..4103e15193 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/TextRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/TextRenderer.java @@ -23,6 +23,7 @@ import com.vaadin.v7.ui.Grid.AbstractRenderer; * @since 7.4 * @author Vaadin Ltd */ +@Deprecated public class TextRenderer extends AbstractRenderer<String> { /** |