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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /*
  2. * Copyright 2000-2016 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. public static final String UIDL_PUSH_ID = "Vaadin-Push-ID";
  56. @Deprecated
  57. public static final String UPDATE_VARIABLE_INTERFACE = "v";
  58. @Deprecated
  59. public static final String UPDATE_VARIABLE_METHOD = "v";
  60. public static final String SERVICE_URL = "serviceUrl";
  61. public static final String SERVICE_URL_PARAMETER_NAME = "pathParameterName";
  62. // Javadocs in ApplicationConfiguration should be updated if this is changed
  63. public static final String V_RESOURCE_PATH = "v-resourcePath";
  64. @Deprecated
  65. public static final String DRAG_AND_DROP_CONNECTOR_ID = "DD";
  66. /**
  67. * URL parameter used in UIDL requests to indicate that the full server-side
  68. * state should be returned to the client, i.e. without any incremental
  69. * changes.
  70. */
  71. public static final String URL_PARAMETER_REPAINT_ALL = "repaintAll";
  72. /**
  73. * Configuration parameter giving the (in some cases relative) URL to the
  74. * web application context root.
  75. *
  76. * @since 8.0.3
  77. */
  78. public static final String CONTEXT_ROOT_URL = "contextRootUrl";
  79. /**
  80. * Configuration parameter giving the (in some cases relative) URL to the
  81. * VAADIN folder from where themes and widgetsets are loaded.
  82. * <p>
  83. * <b>Refactor warning:</b> This value is also hardcoded in
  84. * vaadinBootstrap.js.
  85. * </p>
  86. */
  87. public static final String VAADIN_DIR_URL = "vaadinDir";
  88. /**
  89. * Configuration parameter giving the (in some cases relative) URL to the
  90. * frontend resource folder from where frontend files are served (this is
  91. * what frontend:// should resolve to).
  92. * <p>
  93. * By default, this is "vaadin://es6" ("vaadin://es5" for browsers which
  94. * does not support ES6).
  95. *
  96. * @since 8.1
  97. */
  98. public static final String FRONTEND_URL = "frontendUrl";
  99. /**
  100. * The name of the javascript containing the bootstrap code. The file is
  101. * located in the VAADIN directory.
  102. *
  103. * @since 7.3
  104. */
  105. public static final String VAADIN_BOOTSTRAP_JS = "vaadinBootstrap.js";
  106. /**
  107. * The name of the javascript containing push support. The file is located
  108. * in the VAADIN directory.
  109. */
  110. public static final String VAADIN_PUSH_JS = "vaadinPush.js";
  111. /**
  112. * The name of the debug version of the javascript containing push support.
  113. * The file is located in the VAADIN directory.
  114. *
  115. * @since 7.1.6
  116. */
  117. public static final String VAADIN_PUSH_DEBUG_JS = "vaadinPush.debug.js";
  118. /**
  119. * Name of the parameter used to transmit the CSRF token.
  120. */
  121. public static final String CSRF_TOKEN_PARAMETER = "v-csrfToken";
  122. /**
  123. * Name of the parameter used to transmit the push connection identifier.
  124. */
  125. public static final String PUSH_ID_PARAMETER = "v-pushId";
  126. /**
  127. * The name of the parameter used to transmit RPC invocations
  128. *
  129. * @since 7.2
  130. */
  131. public static final String RPC_INVOCATIONS = "rpc";
  132. /**
  133. * The name of the parameter used to transmit the CSRF token
  134. *
  135. * @since 7.2
  136. */
  137. public static final String CSRF_TOKEN = "csrfToken";
  138. /**
  139. * The name of the parameter used to transmit the sync id. The value can be
  140. * set to -1 e.g. when testing with pre-recorded requests to make the
  141. * framework ignore the sync id.
  142. *
  143. * @see com.vaadin.ui.ConnectorTracker#getCurrentSyncId()
  144. * @since 7.2
  145. */
  146. public static final String SERVER_SYNC_ID = "syncId";
  147. /**
  148. * The name of the parameter used to transmit the id of the client to server
  149. * messages.
  150. *
  151. * @since 7.6
  152. */
  153. public static final String CLIENT_TO_SERVER_ID = "clientId";
  154. /**
  155. * Default value to use in case the security protection is disabled.
  156. */
  157. public static final String CSRF_TOKEN_DEFAULT_VALUE = "init";
  158. /**
  159. * The name of the parameter used for re-synchronizing.
  160. */
  161. public static final String RESYNCHRONIZE_ID = "resynchronize";
  162. /**
  163. * The name of the parameter used for sending the widget set version to the
  164. * server
  165. *
  166. * @since 7.6
  167. */
  168. public static final String WIDGETSET_VERSION_ID = "wsver";
  169. /**
  170. * Content type to use for text/html responses (should always be UTF-8).
  171. */
  172. public static final String CONTENT_TYPE_TEXT_HTML_UTF_8 = "text/html; charset=utf-8";
  173. /**
  174. * Configuration name for the {@literal frontend://} URL when using a
  175. * browser which is not ES6 compatible (i.e. IE11 or Safari 9).
  176. *
  177. * @since 8.1
  178. */
  179. public static final String FRONTEND_URL_ES5 = "frontend.url.es5";
  180. /**
  181. * Configuration name for the {@literal frontend://} URL when using an ES6
  182. * compatible browser.
  183. *
  184. * @since 8.1
  185. */
  186. public static final String FRONTEND_URL_ES6 = "frontend.url.es6";
  187. /**
  188. * Default value of the configuration of the build URL of ES6 web
  189. * components.
  190. *
  191. * @since 8.1
  192. */
  193. public static final String FRONTEND_URL_ES6_DEFAULT_VALUE = VAADIN_PROTOCOL_PREFIX
  194. + "frontend/es6/";
  195. /**
  196. * Default value of the configuration of the build URL of ES5 web
  197. * components.
  198. *
  199. * @since 8.1
  200. */
  201. public static final String FRONTEND_URL_ES5_DEFAULT_VALUE = VAADIN_PROTOCOL_PREFIX
  202. + "frontend/es5/";
  203. }