Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ApplicationConstants.java 7.2KB

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