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

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