From 1f070e124d628ea439a3369e99bbc07bdd917e8d Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Tue, 2 May 2017 12:43:10 +0300 Subject: Update portlet documentation for OSGi portlets --- documentation/advanced/advanced-osgi.asciidoc | 34 --------------------------- 1 file changed, 34 deletions(-) (limited to 'documentation/advanced') diff --git a/documentation/advanced/advanced-osgi.asciidoc b/documentation/advanced/advanced-osgi.asciidoc index aeda5a3ef8..b5c241f23f 100644 --- a/documentation/advanced/advanced-osgi.asciidoc +++ b/documentation/advanced/advanced-osgi.asciidoc @@ -66,37 +66,3 @@ Alternatively, an OSGi bundle activator or an SCR Component [interfacename]#@Act ---- In addition to these approaches, it is also possible to repackage all the static resources of an application to a single bundle and export the [filename]#/VAADIN# directory. This can be useful e.g. when migrating an old Vaadin OSGi application in an environment that does not support parallel deployments of multiple versions of the application. - - -[[advanced.osgi.portlet]] -== Publishing a Portlet With OSGi - -Publishing an OSGi portlet on Liferay 7+ can be done in two ways: using annotations or using properties. - -Annotating a UI class with [interfacename]#@VaadinLiferayPortletConfiguration# (available in `vaadin-liferay-integration`) and making it an OSGi service of type [classname]#UI# is the easiest way to automatically publish the UI as a portlet and configure it to use the correct static resources. - -[source, java] ----- -@Theme(MyTheme.THEME_NAME) -@VaadinLiferayPortletConfiguration(name = "Vaadin.Tutorial.1", displayName = "Vaadin Tutorial App") -@Component(service = UI.class) -public class MyUI extends UI { - ... -} ----- - -Alternatively, the property [literal]#com.vaadin.osgi.liferay.portlet-ui=true# can be used when publishing a UI as an OSGi service to publish the UI as a portlet. - -[source, java] ----- -@Theme(MyTheme.THEME_NAME) -@Component(service = UI.class, property = { - "com.liferay.portlet.display-category=category.vaadin", - "javax.portlet.name=my.vaadin.app.app.1.0.0", - "javax.portlet.display-name=Tutorial Portlet", - "javax.portlet.security-role-ref=power-user,user", - "com.vaadin.osgi.liferay.portlet-ui=true"}) -public class MyUI extends UI { - ... -} ----- -- cgit v1.2.3