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 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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;
  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. /**
  30. * An internal protocol used for referencing the application context path.
  31. *
  32. * @since 8.0.3
  33. */
  34. public static final String CONTEXT_PROTOCOL_PREFIX = "context://";
  35. public static final String FONTICON_PROTOCOL_PREFIX = "fonticon://";
  36. public static final String PUBLISHED_PROTOCOL_NAME = "published";
  37. public static final String PUBLISHED_PROTOCOL_PREFIX = PUBLISHED_PROTOCOL_NAME
  38. + "://";
  39. /**
  40. * An internal protocol used for referencing frontend resources.
  41. *
  42. * @see #FRONTEND_URL
  43. *
  44. * @since 8.1
  45. */
  46. public static final String FRONTEND_PROTOCOL_PREFIX = "frontend://";
  47. /**
  48. * Prefix used for theme resource URLs.
  49. *
  50. * @see com.vaadin.server.ThemeResource
  51. * @since 7.5.0
  52. */
  53. public static final String THEME_PROTOCOL_PREFIX = "theme://";
  54. public static final String UIDL_SECURITY_TOKEN_ID = "Vaadin-Security-Key";
  55. /**
  56. * @since 8.0.6
  57. */
  58. public static final String UIDL_PUSH_ID = "Vaadin-Push-ID";
  59. @Deprecated
  60. public static final String UPDATE_VARIABLE_INTERFACE = "v";
  61. @Deprecated
  62. public static final String UPDATE_VARIABLE_METHOD = "v";
  63. public static final String SERVICE_URL = "serviceUrl";
  64. public static final String SERVICE_URL_PARAMETER_NAME = "pathParameterName";
  65. // Javadocs in ApplicationConfiguration should be updated if this is changed
  66. public static final String V_RESOURCE_PATH = "v-resourcePath";
  67. @Deprecated
  68. public static final String DRAG_AND_DROP_CONNECTOR_ID = "DD";
  69. /**
  70. * URL parameter used in UIDL requests to indicate that the full server-side
  71. * state should be returned to the client, i.e. without any incremental
  72. * changes.
  73. */
  74. public static final String URL_PARAMETER_REPAINT_ALL = "repaintAll";
  75. /**
  76. * Configuration parameter giving the (in some cases relative) URL to the
  77. * web application context root.
  78. *
  79. * @since 8.0.3
  80. */
  81. public static final String CONTEXT_ROOT_URL = "contextRootUrl";
  82. /**
  83. * Configuration parameter giving the (in some cases relative) URL to the
  84. * VAADIN folder from where themes and widgetsets are loaded.
  85. * <p>
  86. * <b>Refactor warning:</b> This value is also hardcoded in
  87. * vaadinBootstrap.js.
  88. * </p>
  89. */
  90. public static final String VAADIN_DIR_URL = "vaadinDir";
  91. /**
  92. * Configuration parameter giving the (in some cases relative) URL to the
  93. * frontend resource folder from where frontend files are served (this is
  94. * what frontend:// should resolve to).
  95. * <p>
  96. * By default, this is "vaadin://es6" ("vaadin://es5" for browsers which
  97. * does not support ES6).
  98. *
  99. * @since 8.1
  100. */
  101. public static final String FRONTEND_URL = "frontendUrl";
  102. /**
  103. * The name of the javascript containing the bootstrap code. The file is
  104. * located in the VAADIN directory.
  105. *
  106. * @since 7.3
  107. */
  108. public static final String VAADIN_BOOTSTRAP_JS = "vaadinBootstrap.js";
  109. /**
  110. * The name of the javascript containing push support. The file is located
  111. * in the VAADIN directory.
  112. */
  113. public static final String VAADIN_PUSH_JS = "vaadinPush.js";
  114. /**
  115. * The name of the debug version of the javascript containing push support.
  116. * The file is located in the VAADIN directory.
  117. *
  118. * @since 7.1.6
  119. */
  120. public static final String VAADIN_PUSH_DEBUG_JS = "vaadinPush.debug.js";
  121. /**
  122. * Name of the parameter used to transmit the CSRF token.
  123. */
  124. public static final String CSRF_TOKEN_PARAMETER = "v-csrfToken";
  125. /**
  126. * Name of the parameter used to transmit the push connection identifier.
  127. *
  128. * @since 8.0.6
  129. */
  130. public static final String PUSH_ID_PARAMETER = "v-pushId";
  131. /**
  132. * The name of the parameter used to transmit RPC invocations.
  133. *
  134. * @since 7.2
  135. */
  136. public static final String RPC_INVOCATIONS = "rpc";
  137. /**
  138. * The name of the parameter used to transmit the CSRF token.
  139. *
  140. * @since 7.2
  141. */
  142. public static final String CSRF_TOKEN = "csrfToken";
  143. /**
  144. * The name of the parameter used to transmit the sync id. The value can be
  145. * set to -1 e.g. when testing with pre-recorded requests to make the
  146. * framework ignore the sync id.
  147. *
  148. * @see com.vaadin.ui.ConnectorTracker#getCurrentSyncId()
  149. * @since 7.2
  150. */
  151. public static final String SERVER_SYNC_ID = "syncId";
  152. /**
  153. * The name of the parameter used to transmit the id of the client to server
  154. * messages.
  155. *
  156. * @since 7.6
  157. */
  158. public static final String CLIENT_TO_SERVER_ID = "clientId";
  159. /**
  160. * Default value to use in case the security protection is disabled.
  161. */
  162. public static final String CSRF_TOKEN_DEFAULT_VALUE = "init";
  163. /**
  164. * The name of the parameter used for re-synchronizing.
  165. */
  166. public static final String RESYNCHRONIZE_ID = "resynchronize";
  167. /**
  168. * The name of the parameter used for sending the widget set version to the
  169. * server.
  170. *
  171. * @since 7.6
  172. */
  173. public static final String WIDGETSET_VERSION_ID = "wsver";
  174. /**
  175. * A request attribute name to store the part of pathInfo that was used to
  176. * select the UI. Will be used by default Navigator to separate view
  177. * identifiers from UI. This can be set by custom UI providers.
  178. *
  179. * @since 8.2
  180. */
  181. public static final String UI_ROOT_PATH = "com.vaadin.server.UI_ROOT_PATH";
  182. /**
  183. * Content type to use for text/html responses (should always be UTF-8).
  184. */
  185. public static final String CONTENT_TYPE_TEXT_HTML_UTF_8 = "text/html; charset=utf-8";
  186. /**
  187. * Configuration name for the {@literal frontend://} URL when using a
  188. * browser which is not ES6 compatible (i.e. IE11 or Safari 9).
  189. *
  190. * @since 8.1
  191. */
  192. public static final String FRONTEND_URL_ES5 = "frontend.url.es5";
  193. /**
  194. * Configuration name for the {@literal frontend://} URL when using an ES6
  195. * compatible browser.
  196. *
  197. * @since 8.1
  198. */
  199. public static final String FRONTEND_URL_ES6 = "frontend.url.es6";
  200. /**
  201. * Default value of the configuration of the build URL of ES6 web
  202. * components.
  203. *
  204. * @since 8.1
  205. */
  206. public static final String FRONTEND_URL_ES6_DEFAULT_VALUE = VAADIN_PROTOCOL_PREFIX
  207. + "frontend/es6/";
  208. /**
  209. * Default value of the configuration of the build URL of ES5 web
  210. * components.
  211. *
  212. * @since 8.1
  213. */
  214. public static final String FRONTEND_URL_ES5_DEFAULT_VALUE = VAADIN_PROTOCOL_PREFIX
  215. + "frontend/es5/";
  216. /**
  217. * Name of the HTML5 DnD Polyfill JavaScript file.
  218. *
  219. * @since 8.1
  220. */
  221. public static final String MOBILE_DND_POLYFILL_JS = "drag-drop-polyfill.min.js";
  222. }