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.

DeploymentConfiguration.java 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal;
  5. import java.io.Serializable;
  6. /**
  7. * Provide deployment specific settings that are required outside terminal
  8. * specific code.
  9. *
  10. * @author Vaadin Ltd.
  11. *
  12. * @since 7.0
  13. */
  14. public interface DeploymentConfiguration extends Serializable {
  15. /**
  16. * Gets the base URL of the location of Vaadin's static files.
  17. *
  18. * @param request
  19. * the request for which the location should be determined
  20. *
  21. * @return a string with the base URL for static files
  22. */
  23. public String getStaticFileLocation(WrappedRequest request);
  24. /**
  25. * Gets the widgetset that is configured for this deployment, e.g. from a
  26. * parameter in web.xml.
  27. *
  28. * @param request
  29. * the request for which a widgetset is required
  30. * @return the name of the widgetset
  31. */
  32. public String getConfiguredWidgetset(WrappedRequest request);
  33. /**
  34. * Gets the theme that is configured for this deployment, e.g. from a portal
  35. * parameter or just some sensible default value.
  36. *
  37. * @param request
  38. * the request for which a theme is required
  39. * @return the name of the theme
  40. */
  41. public String getConfiguredTheme(WrappedRequest request);
  42. /**
  43. * Checks whether the Vaadin application will be rendered on its own in the
  44. * browser or whether it will be included into some other context. A
  45. * standalone application may do things that might interfere with other
  46. * parts of a page, e.g. changing the page title and requesting focus upon
  47. * loading.
  48. *
  49. * @param request
  50. * the request for which the application is loaded
  51. * @return a boolean indicating whether the application should be standalone
  52. */
  53. public boolean isStandalone(WrappedRequest request);
  54. /**
  55. * Gets a configured property. The properties are typically read from e.g.
  56. * web.xml or from system properties of the JVM.
  57. *
  58. * @param propertyName
  59. * The simple of the property, in some contexts, lookup might be
  60. * performed using variations of the provided name.
  61. * @param defaultValue
  62. * the default value that should be used if no value has been
  63. * defined
  64. * @return the property value, or the passed default value if no property
  65. * value is found
  66. */
  67. public String getApplicationOrSystemProperty(String propertyName,
  68. String defaultValue);
  69. /**
  70. * Get the class loader to use for loading classes loaded by name, e.g.
  71. * custom Root classes. <code>null</code> indicates that the default class
  72. * loader should be used.
  73. *
  74. * @return the class loader to use, or <code>null</code>
  75. */
  76. public ClassLoader getClassLoader();
  77. }