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.

ApplicationConstants.java 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /*
  2. * Copyright 2000-2014 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;
  17. import java.io.Serializable;
  18. public class ApplicationConstants implements Serializable {
  19. // This indicates the whole page is generated by us (not embedded)
  20. public static final String GENERATED_BODY_CLASSNAME = "v-generated-body";
  21. public static final String APP_PATH = "APP";
  22. public static final String UIDL_PATH = "UIDL";
  23. public static final String HEARTBEAT_PATH = "HEARTBEAT";
  24. public static final String PUSH_PATH = "PUSH";
  25. public static final String PUBLISHED_FILE_PATH = APP_PATH + '/'
  26. + "PUBLISHED";
  27. public static final String APP_PROTOCOL_PREFIX = "app://";
  28. public static final String VAADIN_PROTOCOL_PREFIX = "vaadin://";
  29. public static final String FONTICON_PROTOCOL_PREFIX = "fonticon://";
  30. public static final String PUBLISHED_PROTOCOL_NAME = "published";
  31. public static final String PUBLISHED_PROTOCOL_PREFIX = PUBLISHED_PROTOCOL_NAME
  32. + "://";
  33. /**
  34. * Prefix used for theme resource URLs
  35. *
  36. * @see com.vaadin.server.ThemeResource
  37. * @since 7.5.0
  38. */
  39. public static final String THEME_PROTOCOL_PREFIX = "theme://";
  40. public static final String UIDL_SECURITY_TOKEN_ID = "Vaadin-Security-Key";
  41. @Deprecated
  42. public static final String UPDATE_VARIABLE_INTERFACE = "v";
  43. @Deprecated
  44. public static final String UPDATE_VARIABLE_METHOD = "v";
  45. public static final String SERVICE_URL = "serviceUrl";
  46. public static final String SERVICE_URL_PARAMETER_NAME = "pathParameterName";
  47. // Javadocs in ApplicationConfiguration should be updated if this is changed
  48. public static final String V_RESOURCE_PATH = "v-resourcePath";
  49. @Deprecated
  50. public static final String DRAG_AND_DROP_CONNECTOR_ID = "DD";
  51. /**
  52. * URL parameter used in UIDL requests to indicate that the full server-side
  53. * state should be returned to the client, i.e. without any incremental
  54. * changes.
  55. */
  56. public static final String URL_PARAMETER_REPAINT_ALL = "repaintAll";
  57. /**
  58. * Configuration parameter giving the (in some cases relative) URL to the
  59. * VAADIN folder from where themes and widgetsets are loaded.
  60. * <p>
  61. * <b>Refactor warning:</b> This value is also hardcoded in
  62. * vaadinBootstrap.js.
  63. * </p>
  64. */
  65. public static final String VAADIN_DIR_URL = "vaadinDir";
  66. /**
  67. * The name of the javascript containing the bootstrap code. The file is
  68. * located in the VAADIN directory.
  69. *
  70. * @since 7.3
  71. */
  72. public static final String VAADIN_BOOTSTRAP_JS = "vaadinBootstrap.js";
  73. /**
  74. * The name of the javascript containing push support. The file is located
  75. * in the VAADIN directory.
  76. */
  77. public static final String VAADIN_PUSH_JS = "vaadinPush.js";
  78. /**
  79. * The name of the debug version of the javascript containing push support.
  80. * The file is located in the VAADIN directory.
  81. *
  82. * @since 7.1.6
  83. */
  84. public static final String VAADIN_PUSH_DEBUG_JS = "vaadinPush.debug.js";
  85. /**
  86. * Name of the parameter used to transmit the CSRF token.
  87. */
  88. public static final String CSRF_TOKEN_PARAMETER = "v-csrfToken";
  89. /**
  90. * The name of the parameter used to transmit RPC invocations
  91. *
  92. * @since 7.2
  93. */
  94. public static final String RPC_INVOCATIONS = "rpc";
  95. /**
  96. * The name of the parameter used to transmit the CSRF token
  97. *
  98. * @since 7.2
  99. */
  100. public static final String CSRF_TOKEN = "csrfToken";
  101. /**
  102. * The name of the parameter used to transmit the sync id. The value can be
  103. * set to -1 e.g. when testing with pre-recorded requests to make the
  104. * framework ignore the sync id.
  105. *
  106. * @see com.vaadin.ui.ConnectorTracker#getCurrentSyncId()
  107. * @since 7.2
  108. */
  109. public static final String SERVER_SYNC_ID = "syncId";
  110. /**
  111. * Default value to use in case the security protection is disabled.
  112. */
  113. public static final String CSRF_TOKEN_DEFAULT_VALUE = "init";
  114. /**
  115. * The name of the parameter used for re-synchronizing.
  116. */
  117. public static final String RESYNCHRONIZE_ID = "resynchronize";
  118. }