From 87cfeb9c4d7f21d3e87d95d99b3f722fd7fa4d69 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Tue, 25 Apr 2017 13:31:07 +0300 Subject: Add some javadoc for Liferay integration module Indicate that the classes are only for Liferay 7+, clarify annotation parameters and update module description. --- liferay-integration/pom.xml | 2 +- .../java/com/vaadin/osgi/liferay/OSGiUIProvider.java | 2 ++ .../vaadin/osgi/liferay/OSGiVaadinPortletService.java | 2 ++ .../java/com/vaadin/osgi/liferay/PortletProperties.java | 6 ++++-- .../osgi/liferay/PortletUIServiceTrackerCustomizer.java | 4 +++- .../osgi/liferay/VaadinLiferayPortletConfiguration.java | 17 +++++++++++++++++ .../java/com/vaadin/osgi/liferay/VaadinOSGiPortlet.java | 2 ++ .../com/vaadin/osgi/liferay/VaadinPortletProvider.java | 2 ++ 8 files changed, 33 insertions(+), 4 deletions(-) diff --git a/liferay-integration/pom.xml b/liferay-integration/pom.xml index e6de0d6b29..c8ccaa8840 100644 --- a/liferay-integration/pom.xml +++ b/liferay-integration/pom.xml @@ -4,7 +4,7 @@ vaadin-liferay-integration jar https://vaadin.com/ - Liferay integration + Liferay 7+ OSGi portlet support com.vaadin diff --git a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/OSGiUIProvider.java b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/OSGiUIProvider.java index 1d71238ba5..ccbd2fd546 100644 --- a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/OSGiUIProvider.java +++ b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/OSGiUIProvider.java @@ -24,6 +24,8 @@ import com.vaadin.ui.UI; /** * Vaadin {@link com.vaadin.server.UIProvider} that provides a single {@link UI} * class provided through the registration of a {@link UI} as an OSGi service. + *

+ * This only applies to Liferay Portal 7+ with OSGi support. * * @author Sampsa Sohlman * diff --git a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/OSGiVaadinPortletService.java b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/OSGiVaadinPortletService.java index 1742e9eb41..c203fc4f3c 100644 --- a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/OSGiVaadinPortletService.java +++ b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/OSGiVaadinPortletService.java @@ -27,6 +27,8 @@ import com.vaadin.ui.UI; /** * {@link VaadinPortletService} class that uses the {@link OSGiUIProvider} to * configure the {@link UI} class for a {@link VaadinPortlet}. + *

+ * This only applies to Liferay Portal 7+ with OSGi support. * * @author Sampsa Sohlman * diff --git a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletProperties.java b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletProperties.java index 188c20cde4..64f7e91f0f 100644 --- a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletProperties.java +++ b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/PortletProperties.java @@ -22,7 +22,9 @@ import com.vaadin.ui.UI; /** * Constants for Liferay {@link Portlet portlets}. This doesn't have to be used * by the application developer. - * + *

+ * This only applies to Liferay Portal 7+ with OSGi support. + * * @author Vaadin Ltd. * @since 8.1 */ @@ -58,7 +60,7 @@ public final class PortletProperties { * This property is used to mark the UI service as a {@link Portlet} * {@link UI}. The value of this property must be non-null and will be * ignored but must be present to use the {@link UI} as a {@link Portlet}. - * + * *

* The alternative is to simply annotate the {@link UI} with * {@link VaadinLiferayPortletConfiguration}. 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 1353a735b5..0fc7c1eba8 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 @@ -39,6 +39,8 @@ import com.vaadin.ui.UI; * If the {@link UI} is annotated with * {@link VaadinLiferayPortletConfiguration}, a {@link Portlet} is created for * it. + *

+ * This only applies to Liferay Portal 7+ with OSGi support. * * @author Sampsa Sohlman * @@ -185,7 +187,7 @@ class PortletUIServiceTrackerCustomizer /* * 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. */ diff --git a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinLiferayPortletConfiguration.java b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinLiferayPortletConfiguration.java index 65f983e24c..47305be1d9 100644 --- a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinLiferayPortletConfiguration.java +++ b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinLiferayPortletConfiguration.java @@ -27,6 +27,8 @@ import javax.portlet.Portlet; * This annotation is used to inform the * {@link PortletUIServiceTrackerCustomizer} that this UI should be wrapped in a * {@link Portlet} and provides the necessary configuration for that. + *

+ * This only applies to Liferay Portal 7+ with OSGi support. * * @author Vaadin Ltd. * @@ -36,11 +38,26 @@ import javax.portlet.Portlet; @Target(ElementType.TYPE) @Inherited public @interface VaadinLiferayPortletConfiguration { + /** + * Category of the portlet in Liferay menus. By default + * category.vaadin. + */ String category() default "category.vaadin"; + /** + * Portlet name, must conform to the portlet specification and is used as + * the key for the portlet. + */ String name() default ""; + /** + * Display name of the portlet. + */ String displayName() default ""; + /** + * Array of allowed security roles. By default, power-user and + * user. + */ String[] securityRole() default { "power-user", "user" }; } diff --git a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinOSGiPortlet.java b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinOSGiPortlet.java index 80dd346f23..e604ec353c 100644 --- a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinOSGiPortlet.java +++ b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinOSGiPortlet.java @@ -24,6 +24,8 @@ import com.vaadin.ui.UI; /** * {@link VaadinPortlet} that uses an {@link OSGiUIProvider} to configure its * {@link UI}. + *

+ * This only applies to Liferay Portal 7+ with OSGi support. * * @author Sampsa Sohlman * diff --git a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinPortletProvider.java b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinPortletProvider.java index 0c2374afeb..046fc489ae 100644 --- a/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinPortletProvider.java +++ b/liferay-integration/src/main/java/com/vaadin/osgi/liferay/VaadinPortletProvider.java @@ -30,6 +30,8 @@ import com.vaadin.ui.UI; /** * Initializes a service tracker with {@link PortletUIServiceTrackerCustomizer} * to track {@link UI} service registrations. + *

+ * This only applies to Liferay Portal 7+ with OSGi support. * * @author Sampsa Sohlman * -- cgit v1.2.3