You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AbstractDateFieldServerRpc.java 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright 2000-2018 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.shared.ui.datefield;
  17. import java.util.Map;
  18. import com.vaadin.shared.annotations.Delayed;
  19. import com.vaadin.shared.communication.ServerRpc;
  20. /**
  21. * RPC interface for calls from client to server.
  22. *
  23. * @since 8.2
  24. */
  25. public interface AbstractDateFieldServerRpc extends ServerRpc {
  26. /**
  27. * Updates the typed data string and resolution names and values.
  28. *
  29. * @param newDateString
  30. * the value of the text field part. It enables analyzing invalid
  31. * input on the server. {@code null} if the date was chosen with
  32. * popup calendar or contains user-typed string
  33. * @param resolutions
  34. * map of time unit (resolution) name and value, the key is the
  35. * resolution name e.g. "HOUR", "MINUTE", the value can be
  36. * {@code null}. If the map is empty, that means the
  37. * {@code newDateString} is invalid
  38. */
  39. void update(String newDateString, Map<String, Integer> resolutions);
  40. /**
  41. * Updates the typed data string and resolution names and values with
  42. * delayed rpc. The rpc will be sent by triggering another non
  43. * {@link Delayed} annotated rpc.
  44. *
  45. * @since
  46. *
  47. * @param newDateString
  48. * the value of the text field part. It enables analyzing invalid
  49. * input on the server. {@code null} if the date was chosen with
  50. * popup calendar or contains user-typed string
  51. * @param resolutions
  52. * map of time unit (resolution) name and value, the key is the
  53. * resolution name e.g. "HOUR", "MINUTE", the value can be
  54. * {@code null}. If the map is empty, that means the
  55. * {@code newDateString} is invalid
  56. */
  57. @Delayed(lastOnly = true)
  58. void updateValueWithDelay(String newDateString,
  59. Map<String, Integer> resolutions);
  60. /**
  61. * Indicates to the server that the client-side has lost focus.
  62. */
  63. void blur();
  64. /**
  65. * Indicates to the server that the client-side has acquired focus.
  66. */
  67. void focus();
  68. }