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.

Constants.java 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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.server;
  17. import com.vaadin.shared.communication.PushMode;
  18. /**
  19. * TODO Document me!
  20. *
  21. * @author peholmst
  22. *
  23. */
  24. public interface Constants {
  25. static final String NOT_PRODUCTION_MODE_INFO = "\n"
  26. + "=================================================================\n"
  27. + "Vaadin is running in DEBUG MODE.\nAdd productionMode=true to web.xml "
  28. + "to disable debug features.\nTo show debug window, add ?debug to "
  29. + "your application URL.\n"
  30. + "=================================================================";
  31. static final String WARNING_XSRF_PROTECTION_DISABLED = "\n"
  32. + "===========================================================\n"
  33. + "WARNING: Cross-site request forgery protection is disabled!\n"
  34. + "===========================================================";
  35. static final String WARNING_RESOURCE_CACHING_TIME_NOT_NUMERIC = "\n"
  36. + "===========================================================\n"
  37. + "WARNING: resourceCacheTime has been set to a non integer value "
  38. + "in web.xml. The default of 1h will be used.\n"
  39. + "===========================================================";
  40. static final String WARNING_HEARTBEAT_INTERVAL_NOT_NUMERIC = "\n"
  41. + "===========================================================\n"
  42. + "WARNING: heartbeatInterval has been set to a non integer value "
  43. + "in web.xml. The default of 5min will be used.\n"
  44. + "===========================================================";
  45. static final String WARNING_PUSH_MODE_NOT_RECOGNIZED = "\n"
  46. + "===========================================================\n"
  47. + "WARNING: pushMode has been set to an unrecognized value\n"
  48. + "in web.xml. The permitted values are \"disabled\", \"manual\",\n"
  49. + "and \"automatic\". The default of \"disabled\" will be used.\n"
  50. + "===========================================================";
  51. static final String WIDGETSET_MISMATCH_INFO = "\n"
  52. + "=================================================================\n"
  53. + "The widgetset in use does not seem to be built for the Vaadin\n"
  54. + "version in use. This might cause strange problems - a\n"
  55. + "recompile/deploy is strongly recommended.\n"
  56. + " Vaadin version: %s\n"
  57. + " Widgetset version: %s\n"
  58. + "=================================================================";
  59. // Keep the version number in sync with push/build.xml and other locations
  60. // listed in that file
  61. static final String REQUIRED_ATMOSPHERE_RUNTIME_VERSION = "2.1.2.vaadin6";
  62. static final String INVALID_ATMOSPHERE_VERSION_WARNING = "\n"
  63. + "=================================================================\n"
  64. + "Vaadin depends on Atmosphere {0} but version {1} was found.\n"
  65. + "This might cause compatibility problems if push is used.\n"
  66. + "=================================================================";
  67. static final String ATMOSPHERE_MISSING_ERROR = "\n"
  68. + "=================================================================\n"
  69. + "Atmosphere could not be loaded. When using push with Vaadin, the\n"
  70. + "Atmosphere framework must be present on the classpath.\n"
  71. + "If using a dependency management system, please add a dependency\n"
  72. + "to vaadin-push.\n"
  73. + "If managing dependencies manually, please make sure Atmosphere\n"
  74. + REQUIRED_ATMOSPHERE_RUNTIME_VERSION
  75. + " is included on the classpath.\n"
  76. + "Will fall back to using "
  77. + PushMode.class.getSimpleName()
  78. + "."
  79. + PushMode.DISABLED.name()
  80. + ".\n"
  81. + "=================================================================";
  82. static final String PUSH_NOT_SUPPORTED_ERROR = "\n"
  83. + "=================================================================\n"
  84. + "Push is not supported for {0}\n"
  85. + "Will fall back to using "
  86. + PushMode.class.getSimpleName()
  87. + "."
  88. + PushMode.DISABLED.name()
  89. + ".\n"
  90. + "=================================================================";
  91. public static final String WARNING_LEGACY_PROPERTY_TOSTRING = "You are using toString() instead of getValue() to get the value for a Property of type {0}"
  92. + ". This is strongly discouraged and only provided for backwards compatibility with Vaadin 6. "
  93. + "To disable this warning message and retain the behavior, set the init parameter \""
  94. + Constants.SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING
  95. + "\" to \"true\". To disable the legacy functionality, set \""
  96. + Constants.SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING
  97. + "\" to false."
  98. + " (Note that your debugger might call toString() and trigger this message)."
  99. + " To find out who is calling toString(), enable FINE level logging.";
  100. static final String WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE = "Unknown value '{0}' for parameter "
  101. + Constants.SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING
  102. + ". Supported values are 'false','warning','true'";
  103. static final String URL_PARAMETER_THEME = "theme";
  104. static final String SERVLET_PARAMETER_PRODUCTION_MODE = "productionMode";
  105. // Javadocs for VaadinService should be updated if this value is changed
  106. static final String SERVLET_PARAMETER_DISABLE_XSRF_PROTECTION = "disable-xsrf-protection";
  107. static final String SERVLET_PARAMETER_RESOURCE_CACHE_TIME = "resourceCacheTime";
  108. static final String SERVLET_PARAMETER_HEARTBEAT_INTERVAL = "heartbeatInterval";
  109. static final String SERVLET_PARAMETER_CLOSE_IDLE_SESSIONS = "closeIdleSessions";
  110. static final String SERVLET_PARAMETER_PUSH_MODE = "pushMode";
  111. static final String SERVLET_PARAMETER_UI_PROVIDER = "UIProvider";
  112. static final String SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING = "legacyPropertyToString";
  113. static final String SERVLET_PARAMETER_SYNC_ID_CHECK = "syncIdCheck";
  114. // Configurable parameter names
  115. static final String PARAMETER_VAADIN_RESOURCES = "Resources";
  116. static final int DEFAULT_BUFFER_SIZE = 32 * 1024;
  117. static final int MAX_BUFFER_SIZE = 64 * 1024;
  118. final String THEME_DIR_PATH = "VAADIN/themes";
  119. static final int DEFAULT_THEME_CACHETIME = 1000 * 60 * 60 * 24;
  120. static final String WIDGETSET_DIR_PATH = "VAADIN/widgetsets";
  121. // Name of the default widget set, used if not specified in web.xml
  122. static final String DEFAULT_WIDGETSET = "com.vaadin.DefaultWidgetSet";
  123. // Widget set parameter name
  124. static final String PARAMETER_WIDGETSET = "widgetset";
  125. /**
  126. * @deprecated As of 7.1, this message is no longer used and might be
  127. * removed from the code.
  128. */
  129. @Deprecated
  130. static final String ERROR_NO_UI_FOUND = "No UIProvider returned a UI for the request.";
  131. static final String DEFAULT_THEME_NAME = "reindeer";
  132. static final String INVALID_SECURITY_KEY_MSG = "Invalid security key.";
  133. // portal configuration parameters
  134. static final String PORTAL_PARAMETER_VAADIN_WIDGETSET = "vaadin.widgetset";
  135. static final String PORTAL_PARAMETER_VAADIN_RESOURCE_PATH = "vaadin.resources.path";
  136. static final String PORTAL_PARAMETER_VAADIN_THEME = "vaadin.theme";
  137. static final String PORTLET_CONTEXT = "PORTLET_CONTEXT";
  138. }