Entries with tag osgi times .

If you are here, you are probably looking for a way to translate some language keys for your application and probably read Liferay's official guide looking for a simple way to do it. Importunately, the guide does not look like what you would expect, with many steps and unnecessary explanations. It even tells you to go to a repository looking for jar files, only to read metadata that you could easily just get from GitHub. In this post I will... Read More AboutOverriding A Module’s Language Keys »

We all know OSGi is great! It is simple to learn and use. However, some might find hard starting an application, even some that might be heavy users of this framework. In this post, we will see why that is a weird reality and a simple example to help first time users. Firstly, this happens because we normally see work being done in applications that are already in a not so early stage of development or using frameworks and... Read More AboutHello OSGi »

This post is a simple example about how to add CSS files to your portlets in Liferay 7.x ( for OSGi based portlets ). Let's start with a simple portlet: @Component( immediate = true, property = { "com.liferay.portlet.display-category=category.hidden", "com.liferay.portlet.instanceable=false", "javax.portlet.portlet-mode=text/html;view", ... Read More AboutStyling Custom Portlets »

OSGi in Action: Creating Modular Applications in Java small image

Researching around the web for content that could make developers' lives easier when dealing with Liferay, we came across this book that called our attention due to the strong reliance on OSGi that marks Liferay 7.0 development. From the book's publisher web page (https://www.manning.com/books/osgi-in-action) you can read the following description, which is our starting point for this review. OSGi is a Java-based framework for... Read More AboutOSGi in Action: Creating Modular Applications in Java »

Preparing your IDE for Liferay small image

Many developers may feel overwhelmed when they come to meet Liferay for the first time, and it is perfectly natural. Liferay is a bit odd in the Java universe and even experient engineers might need some time to adjust. The underlining reason for this awkward element in this huge universe is the fact that it was meant to grow, and it does grow; as several were, but Liferay is different (especially, Liferay 7). Being based on a... Read More AboutPreparing your IDE for Liferay »

Liferay’s workspace is a great concept and it delivers everything it promises; it is easy to use and it comes with everything you need for a successful Liferay project. Sometimes, however, one may feel overwhelmed by the amount of options it brings, or it may simply be too much for a given situation. Let’s say you want to create a small plugin, which is also to be a general library you want other developers to use. In this scenario,... Read More AboutBuilding a small OSGi plugin for Liferay – out of the workspace »

Java Application Architecture: Modularity Patterns with Examples Using OSGi small image

Series: Robert C. Martin Series Paperback: 384 pages Publisher: Prentice Hall; 1 edition (March 25, 2012) Language: English ISBN-10: 0321247132 In summary: definitely a must-have book. I first came across this book when I was searching for further education to understand the concepts behind the OSGi technology, I was seeking to adapt my methodologies to produce better plugins for the newest generation of Liferay platforms. After a... Read More AboutJava Application Architecture: Modularity Patterns with Examples Using OSGi »

login.events.post Dependencies some are just in case you need it.. import javax.servlet.http.HttpSession; import org.osgi.service.component.annotations.Component; import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.LifecycleAction; import com.liferay.portal.kernel.events.LifecycleEvent; Component @Component( immediate = true, property = { "key=login.events.post" }, ... Read More AboutSession events »

Dependencies some are just in case you need it.. import javax.servlet.http.HttpSession; import org.osgi.framework.BundleContext; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; Component @Component(immediate = true, service = MyService.class) or service={} Code @Component(immediate = true, service = MyService.class) public class TrueNTHSessionManagerImpl implements... Read More AboutAction on Module Deactivation »

Dependencies some are just in case you need it.. import org.osgi.framework.BundleContext; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import... Read More AboutAction on Module Activation »

Dependencies import org.osgi.service.component.annotations.Component; import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.LifecycleAction; import com.liferay.portal.kernel.events.SimpleAction; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; Component @Component( immediate = true, property = { "key=application.startup.events" }, ... Read More AboutActions on Startup »

Dependencies import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.osgi.service.component.annotations.Component; import com.liferay.portal.kernel.servlet.BaseFilter; Component @Component( immediate = true, property = { ... Read More AboutFilters in Liferay 7 »

Dependencies some are just in case you need it.. import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import com.liferay.portal.kernel.exception.NoSuchUserException; import com.liferay.portal.kernel.exception.PortalException; import... Read More AboutAutoLogin in Liferay 7 »

Dependencies import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import com.liferay.portal.kernel.struts.BaseStrutsAction; import com.liferay.portal.kernel.struts.StrutsAction; Component @Component( immediate = true, property = { "path=" + AuthPublicPath.CONSTANT_URL , "service.ranking:Integer=" + Integer.MAX_VALUE }, service = StrutsAction.class... Read More AboutStrutsAction in Liferay 7 »

Dependencies import javax.servlet.http.HttpSession; import org.osgi.service.component.annotations.Component; import com.liferay.portal.kernel.events.ActionException; import com.liferay.portal.kernel.events.LifecycleAction; import com.liferay.portal.kernel.events.LifecycleEvent; Component @Component( immediate = true, property = { "key=login.events.post" }, service = LifecycleAction.class ) Code @Component( ... Read More AboutCustom Post Login Action "Hook" in Liferay 7 »

Liferay 7 came with several changes that need some getting used to. A major modification in the way we see the platform and develop plugins was brought about by the developers, who enhanced the stack and enriched it with amazing features; among them, the most exiting one is definitely the OSGi support. Although it is still possible to code using the old methodologies and tools, we are thrilled to build with OSGi. And that is why we... Read More AboutLiferay 7, how to get a session object after login? »

— 20 Items per Page
Showing 16 results.