summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--all/src/main/templates/release-notes.html2
-rw-r--r--server/src/main/java/com/vaadin/server/BootstrapHandler.java2
-rw-r--r--server/src/main/java/com/vaadin/server/UIProvider.java34
3 files changed, 30 insertions, 8 deletions
diff --git a/all/src/main/templates/release-notes.html b/all/src/main/templates/release-notes.html
index 6c522ef4d6..77cce634f4 100644
--- a/all/src/main/templates/release-notes.html
+++ b/all/src/main/templates/release-notes.html
@@ -112,7 +112,7 @@
<ul>
<li>Vaadin artifacts no longer bring a transitive dependency to javax.servlet:servlet-api.</li>
<li>System properties now override application parameters for settings such as production mode (see above).</li>
- <li>The return type of UIProvider.getWidgetset() and BootstrapHandler.getWidgetsetForUI() has changed.</li>
+ <li>The return type of BootstrapHandler.getWidgetsetForUI() has changed.</li>
</ul>
<h3 id="knownissues">Known Issues and Limitations</h3>
<ul>
diff --git a/server/src/main/java/com/vaadin/server/BootstrapHandler.java b/server/src/main/java/com/vaadin/server/BootstrapHandler.java
index b766dfc92c..d3a988bea3 100644
--- a/server/src/main/java/com/vaadin/server/BootstrapHandler.java
+++ b/server/src/main/java/com/vaadin/server/BootstrapHandler.java
@@ -470,7 +470,7 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
UICreateEvent event = new UICreateEvent(context.getRequest(),
context.getUIClass());
WidgetsetInfo widgetset = context.getBootstrapResponse()
- .getUIProvider().getWidgetset(event);
+ .getUIProvider().getWidgetsetInfo(event);
if (widgetset == null) {
// TODO do we want to move WidgetsetInfoImpl elsewhere?
widgetset = new WidgetsetInfoImpl(request.getService()
diff --git a/server/src/main/java/com/vaadin/server/UIProvider.java b/server/src/main/java/com/vaadin/server/UIProvider.java
index 9b0087185b..31a6f2a662 100644
--- a/server/src/main/java/com/vaadin/server/UIProvider.java
+++ b/server/src/main/java/com/vaadin/server/UIProvider.java
@@ -127,6 +127,30 @@ public abstract class UIProvider implements Serializable {
* Finds the widgetset to use for a specific UI. If no specific widgetset is
* required, <code>null</code> is returned.
* <p>
+ * This method uses the Widgetset definition priority order from
+ * {@link #getWidgetsetInfo(UICreateEvent)}.
+ * <p>
+ * <strong>Note:</strong> This method exists only for backwards
+ * compatibility and overriding it won't have the effect it used to.
+ *
+ * @param event
+ * the UI create event with information about the UI and the
+ * current request.
+ * @return the name of the widgetset, or <code>null</code> if the default
+ * widgetset should be used
+ * @deprecated This method has been replaced by
+ * {@link #getWidgetsetInfo(UICreateEvent)} in 7.7
+ */
+ @Deprecated
+ public String getWidgetset(UICreateEvent event) {
+ WidgetsetInfo widgetsetInfo = getWidgetsetInfo(event);
+ return widgetsetInfo != null ? widgetsetInfo.getWidgetsetName() : null;
+ }
+
+ /**
+ * Finds the widgetset to use for a specific UI. If no specific widgetset is
+ * required, <code>null</code> is returned.
+ * <p>
* The default implementation uses the following order of priority for
* finding the widgetset information:
* <ul>
@@ -137,17 +161,15 @@ public abstract class UIProvider implements Serializable {
* <li>null to use the default widgetset otherwise</li>
* </ul>
*
- * Note that the return type of this method changed in Vaadin 7.7.
+ * @since 7.7
*
* @param event
* the UI create event with information about the UI and the
* current request.
- * @return the name of the widgetset, or <code>null</code> if the default
- * widgetset should be used
- *
- * @since 7.7
+ * @return the widgetset info, or <code>null</code> if the default widgetset
+ * should be used
*/
- public WidgetsetInfo getWidgetset(UICreateEvent event) {
+ public WidgetsetInfo getWidgetsetInfo(UICreateEvent event) {
Widgetset uiWidgetset = getAnnotationFor(event.getUIClass(),
Widgetset.class);