Posts

Showing posts from March, 2013

SERVICE BULIDER

I have referred the some of the documents and materials about service Bulider. Here is some of the statments.  ServiceBuilder will create models, services, and service persistence first in the folder ext/ext-service , which will form ext-service.jar and it goes to the $CATALINA_HOME/lib/ext in Ext deployment. Here are the packages of the services for the portlet, Reports : com.ext.portlet.reports.model com.ext.portlet.reports.service com.ext.portlet.reports.service.persistence Then ServiceBuilder will create implementations of models, services and service persistence in the folder, ext/ext-impl . This will form ext-impl.jar and it goes to $CATALINA_HOME/webapps/ROOT/WEB-INF/lib in Ext deployment. Here are packages of the implementations of the services for the portlet, Reports : com.ext.portlet.reports.model.impl com.ext.portlet.reports.service.base com.ext.portlet.reports.service.http com.ext.portlet.reports.service.impl com.ext.portlet.reports.service.p

Connecting to different database using Liferay Service Builder

The below Blog Explains connecting the databases in liferay. It is well explained have a look! http://liferaytrends.blogspot.in/2012/05/blog-post.html

LDAP and SSO

By integration with LDAP, information about users and groups are managed in a centralized server. Liferay portal, portlets, and others applications can share the same users' and groups' information directly. By integration with SSO, users need to log in once to access all their information needs. For example, after the users have logged in once in the Liferay portal, they can automatically log in the portlets such as Alfresco client, Alfresco content, and other systems.

Getting the users from the Theme

set ($isAdmin = false)     #if ($is_signed_in)      #set ($rService = $serviceLocator.findService("com.liferay.portal.service.RoleService"))     #set ($usrRoles = $rService.getUserRoles( $user_id ))      #foreach( $usrRole in $usrRoles )             #if ( $usrRole.getName() == "Administrator" )             #set ($isAdmin = true)             #end #end

Changing the log level for the class

We can change the log levels (debug, info, error, all ....etc) for the liferay at Control panel but the changes will revert back once the server restarted. Permanent solution is to override the portal-log4j.xml in your ext - plugin and change below entries. Set log level to info instead of error. 1 <category name="com.liferay.portal.deploy.hot.PortletHotDeployListener"> 2        <priority value="INFO" /> 3 </category> Here the category name is class name and priority values are info.

How to read values from properties file in plugin

     1.Configure  portlet.properties in  /your-portlet/docroot/WEB-INF/src/portlet.properties as below                messages.to.prefetch=30      2.To read the values in jsp describe as below,                              <%@page import="com.liferay.util.portlet.PortletProps"%>              <%=PortletProps.get("messages.to.prefetch")%> You can get the value as 30.