aboutsummaryrefslogtreecommitdiffstats
path: root/liferay-integration
diff options
context:
space:
mode:
authorMirjan Merruko <mirjan@vaadin.com>2017-04-11 15:38:12 +0300
committerHenri Sara <henri.sara@gmail.com>2017-04-25 15:01:06 +0300
commit2c7c72b098ac494b11aec92faa0784ea7c063edb (patch)
treebf23696ba93d832f30978dca7c1f3ffabc6c9d27 /liferay-integration
parentda352179395269beb7e8976246be83e2546f17c2 (diff)
downloadvaadin-framework-2c7c72b098ac494b11aec92faa0784ea7c063edb.tar.gz
vaadin-framework-2c7c72b098ac494b11aec92faa0784ea7c063edb.zip
Property change of the UI service updates the properties of the Portlet
In response to property change the properties
Diffstat (limited to 'liferay-integration')
-rw-r--r--liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java
index d985f55352..1353a735b5 100644
--- a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java
+++ b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletUIServiceTrackerCustomizer.java
@@ -182,6 +182,20 @@ class PortletUIServiceTrackerCustomizer
@Override
public void modifiedService(ServiceReference<UI> serviceReference,
ServiceObjects<UI> ui) {
+ /*
+ * This service has been registered as a portlet at some point,
+ * otherwise it wouldn't be tracked.
+ *
+ * This handles changes for Portlet related properties that are part of
+ * the UI service to be passed to the Portlet service registration.
+ */
+ Dictionary<String, Object> newProperties = createPortletProperties(
+ serviceReference);
+ ServiceRegistration<Portlet> registration = portletRegistrations
+ .get(serviceReference);
+ if (registration != null) {
+ registration.setProperties(newProperties);
+ }
}
@Override