diff --git a/pom.xml b/pom.xml
index ef67c77..96d2af3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,6 +74,7 @@
usecases
catalog-microservice
osgi
+ portlet
diff --git a/portlet/catalog-portlet/.gitignore b/portlet/catalog-portlet/.gitignore
new file mode 100644
index 0000000..ea8c4bf
--- /dev/null
+++ b/portlet/catalog-portlet/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/portlet/catalog-portlet/pom.xml b/portlet/catalog-portlet/pom.xml
new file mode 100644
index 0000000..a51d778
--- /dev/null
+++ b/portlet/catalog-portlet/pom.xml
@@ -0,0 +1,61 @@
+
+ 4.0.0
+
+ org.glassfish.javaeetutorial
+ portlet
+ 7.0.6-SNAPSHOT
+
+
+ catalog-portlet
+ Catalog portlet
+ bundle
+
+
+
+
+ org.glassfish.javaeetutorial
+ usecases-catalog
+ 7.0.6-SNAPSHOT
+ provided
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ 2.5.3
+ true
+
+
+ ${project.artifactId}
+
+ com.forest.portlet.catalog
+
+ javax.servlet,
+ javax.portlet;version=0.0.0,
+ com.forest.model,
+ *
+
+
+ META-INF/resources=src/main/resources
+
+ *;scope=compile|runtime
+
+ osgi.extender;filter:="(&(osgi.extender=jsp.taglib)(uri=http://java.sun.com/portlet_2_0))",
+ osgi.extender;filter:="(&(osgi.extender=jsp.taglib)(uri=http://liferay.com/tld/aui))",
+ osgi.extender;filter:="(&(osgi.extender=jsp.taglib)(uri=http://liferay.com/tld/portlet))",
+ osgi.extender;filter:="(&(osgi.extender=jsp.taglib)(uri=http://liferay.com/tld/theme))",
+ osgi.extender;filter:="(&(osgi.extender=jsp.taglib)(uri=http://liferay.com/tld/ui))"
+
+ <_dsannotations>*
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/portlet/catalog-portlet/src/main/java/com/forest/portlet/catalog/CatalogPortlet.java b/portlet/catalog-portlet/src/main/java/com/forest/portlet/catalog/CatalogPortlet.java
new file mode 100644
index 0000000..467815f
--- /dev/null
+++ b/portlet/catalog-portlet/src/main/java/com/forest/portlet/catalog/CatalogPortlet.java
@@ -0,0 +1,56 @@
+package com.forest.portlet.catalog;
+
+import java.io.IOException;
+
+import javax.portlet.Portlet;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.osgi.service.component.annotations.ReferencePolicy;
+
+import com.forest.usecase.catalog.ProductManager;
+import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
+
+@Component(immediate = true, property = {
+ "com.liferay.portlet.css-class-wrapper=portlet-catalog",
+ "com.liferay.portlet.display-category=category.sample",
+ "com.liferay.portlet.reasultinstanceable=false",
+ "com.liferay.portlet.preferences-owned-by-group=true",
+ "com.liferay.portlet.private-request-attributes=false",
+ "com.liferay.portlet.private-session-attributes=false",
+ "com.liferay.portlet.render-weight=50",
+ "javax.portlet.display-name=Duke's Catalog",
+ "javax.portlet.expiration-cache=0",
+ "javax.portlet.init-param.template-path=/",
+ "javax.portlet.init-param.view-template=/view.jsp",
+ "javax.portlet.security-role-ref=power-user,user" }, service = Portlet.class)
+public class CatalogPortlet extends MVCPortlet {
+
+ ProductManager productManager;
+
+ @Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL)
+ void bindProductManager(ProductManager productManager) {
+ this.productManager = productManager;
+ }
+
+ void unbindProductManager(ProductManager productManager) {
+ this.productManager = null;
+ }
+
+ @Override
+ public void doView(RenderRequest renderRequest,
+ RenderResponse renderResponse) throws IOException, PortletException {
+
+ if (productManager == null) {
+ include("/error.jsp", renderRequest, renderResponse);
+ } else {
+ renderRequest.setAttribute("productManager", productManager);
+ super.doView(renderRequest, renderResponse);
+ }
+ }
+
+}
diff --git a/portlet/catalog-portlet/src/main/resources/error.jsp b/portlet/catalog-portlet/src/main/resources/error.jsp
new file mode 100644
index 0000000..05ae7f7
--- /dev/null
+++ b/portlet/catalog-portlet/src/main/resources/error.jsp
@@ -0,0 +1,3 @@
+
Coffee time !!!
+
+Why don't you cet a cup of coffee while we try to put our catalog back online!
\ No newline at end of file
diff --git a/portlet/catalog-portlet/src/main/resources/init.jsp b/portlet/catalog-portlet/src/main/resources/init.jsp
new file mode 100644
index 0000000..2f46749
--- /dev/null
+++ b/portlet/catalog-portlet/src/main/resources/init.jsp
@@ -0,0 +1,26 @@
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
+
+<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui"%>
+<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%>
+<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%>
+
+<%@ page import="com.liferay.portal.kernel.util.Constants"%>
+<%@ page import="com.liferay.portal.kernel.util.ParamUtil"%>
+<%@ page import="com.liferay.portal.kernel.util.StringPool"%>
+<%@ page import="com.liferay.portal.kernel.util.WebKeys"%>
+<%@ page import="javax.portlet.PortletURL"%>
+<%@ page import="com.forest.model.Product"%>
+<%@ page import="com.forest.usecase.catalog.ProductManager"%>
+<%@ page import="java.util.List"%>
+
+
+
+
+
+<%
+ PortletURL portletURL = renderResponse.createRenderURL();
+ String currentURL = portletURL.toString();
+%>
\ No newline at end of file
diff --git a/portlet/catalog-portlet/src/main/resources/view.jsp b/portlet/catalog-portlet/src/main/resources/view.jsp
new file mode 100644
index 0000000..5e75183
--- /dev/null
+++ b/portlet/catalog-portlet/src/main/resources/view.jsp
@@ -0,0 +1,49 @@
+
+<%@ include file="/init.jsp" %>
+
+<%
+ ProductManager pm = (ProductManager)request.getAttribute("productManager");
+ List products = pm.getAll();
+%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/portlet/pom.xml b/portlet/pom.xml
new file mode 100644
index 0000000..a1c3353
--- /dev/null
+++ b/portlet/pom.xml
@@ -0,0 +1,63 @@
+
+ 4.0.0
+
+ org.glassfish.javaeetutorial
+ dukes-forest
+ 7.0.6-SNAPSHOT
+
+
+ portlet
+ pom
+
+
+ 7.0.0-m4
+
+
+
+
+ org.osgi
+ org.osgi.core
+ 5.0.0
+ provided
+
+
+ org.osgi
+ org.osgi.compendium
+ 5.0.0
+ provided
+
+
+ com.liferay.portal
+ portal-service
+ ${liferay.version}
+ provided
+
+
+ javax.portlet
+ portlet-api
+ 2.0
+ provided
+
+
+ javax.servlet
+ servlet-api
+ 2.5
+ provided
+
+
+
+
+
+
+ liferay
+ http://cdn.repository.liferay.com/nexus/content/groups/public
+
+
+
+
+
+
+ catalog-portlet
+
+
\ No newline at end of file