Saturday, 12 October 2013

Liferay Versions

 Liferay Versions


Version      Name            Edition            Date              Downloads  
6.2.0         GA1 Newton Community Edition ETA 2013 Q4 ~  
6.1.1        GA2 Paton Community Edition 2012-08-01 336.614  
6.1.20       GA2 Paton Enterprise Edition 2012-07-31 unknown  
6.1.10       GA1 Paton Enterprise Edition 2012-02-15 unknown  
6.1.0         GA1 Paton Community Edition 2012-01-01 265.718  
6.0 SP2 Bunyan Enterprise Edition 2011-11-07 unknown  
6.0.6      Bunyan Community Edition 2011-03-04 376.812  
6.0 SP1 Bunyan Enterprise Edition 2011-01-13 unknown  
5.2 SP5 Augustine Enterprise Edition 2010-10-20 unknown  
6.0.5 Bunyan Community Edition 2010-08-16 300.560  
6.0.4 Bunyan Community Edition 2010-07-23 34.209  
6.0.3 Bunyan Community Edition 2010-07-20 16.263  
6.0.2 Bunyan Community Edition 2010-06-08 34.436  
5.2 SP4 Augustine Enterprise Edition 2010-05-19 unknown  
6.0.1 Bunyan Community Edition 2010-04-20 27.565  
5.1 SP5 Calvin Enterprise Edition 2010-03-12 unknown  
6.0.0 Bunyan Community Edition 2010-03-04 16.231  
5.2 SP3 Augustine Enterprise Edition 2010-01-07 unknown  
5.2 SP2 Augustine Enterprise Edition 2009-11-17 unknown  
5.1 SP4 Calvin Enterprise Edition 2009-10-23 unknown  
5.2 SP1 Augustine Enterprise Edition 2009-08-07 unknown  
5.1 SP3 Calvin Enterprise Edition 2009-07-20 unknown  
5.2 Augustine Enterprise Edition 2009-06-01 unknown  
5.2.3 Augustine Community Edition 2009-05-12 427.726  
5.1 SP2 Calvin Enterprise Edition 2009-05-12 unknown  
5.2.2 Augustine Community Edition 2009-02-26 102.367  
5.1 SP1 Calvin Enterprise Edition 2009-02-18 unknown  
5.2.1 Augustine Community Edition 2009-02-03 42.720  
5.2.0 Augustine Community Edition 2009-01-26 7.143  
5.1 SP Calvin Enterprise Edition 2008-12-16 unknown  
5.1.2 Calvin Community Edition 2008-10-03 178.934  
5.1.1 Calvin Community Edition 2008-08-11 84.246  
5.1.0 Calvin Community Edition 2008-07-17 31.761  
5.0.1 RC Luther Community Edition 2008-04-14 101.543  
5.0.0 RC Luther Community Edition 2008-04-09 10.704  
4.4.2 Spurgeon Community Edition 2008-02-25 82.592  
4.4.1 Spurgeon Community Edition 2008-02-08 29.200  
4.4.0 Spurgeon Community Edition 2008-01-25 24.843  
4.3.6 Owen Community Edition 2008-01-09 30.104  
4.3.5 Owen Community Edition 2007-12-04 35.868  
4.3.4 Owen Community Edition 2007-11-05 36.937  
4.3.3 Owen Community Edition 2007-10-09 33.505  
4.3.2 Owen Community Edition 2007-09-19 28.886  
4.3.1 Owen Community Edition 2007-08-31 35.273  
4.3.0 Owen Community Edition 2007-07-13 59.545  
4.2.2 Machen Community Edition 2007-04-19 89.721  
4.2.1 Machen Community Edition 2007-01-26 104.626  
4.2.0 Machen Community Edition 2006-12-13 44.250  
4.1.3 Cowper Community Edition 2006-11-21 27.521  
4.1.2 Cowper Community Edition 2006-09-07 105.026  
4.1.1 Cowper Community Edition 2006-08-15 22.724  
4.1.0 Cowper Community Edition 2006-08-15 21.455  
4.0.0 Community Edition 2006-06-05 71.248  
3.6.1 Community Edition 2005-11-22 80.816  
3.6.0 Community Edition 2005-08-16 14.106  
3.5.0 Community Edition 2005-07-25 13.108  
3.2.0 Community Edition 2005-01-31 59.314  
3.1.0 Community Edition 2004-12-15 12.153  
3.0.0 Community Edition 2004-11-23 9.683  
2.2.5 Community Edition 2004-11-07 3.707  
2.2.1 Community Edition 2004-10-13 5.229  
2.2.0 Community Edition 2004-10-02 2.834  
2.1.1 Community Edition 2004-05-12 13.068  
2.1.0 Community Edition 2004-05-06 2.604  
2.0.3 Community Edition 2003-12-09 15.814  
2.0.0 Community Edition 2003-11-03 6.235  
1.9.5 Community Edition 2003-07-31 4.260  
1.9.1 Community Edition 2003-05-27 11.444  
1.9.0 Community Edition 2003-05-22 1.703  
1.8.0 Community Edition 2003-04-05 8.675  
1.7.5 Community Edition 2002-10-11 15.750




Thursday, 10 October 2013

DEFAULT OBJECTS IN LIFERAY

DEFAULT OBJECTS IN LIFERAY
There are two taglibs which we are including every time when we create portlet.

   <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<portlet:defineObjects />

The above statements will give 14 default objects :

actionRequest, actionResponse,    eventRequest,  eventResponse, portletConfig, portletName,    portletPreferences, portletPreferencesValues, portletSession, portletSessionScope, renderRequest, renderResponse, resourceRequest, resourceResponse

and the type of each object as follows :

javax.portlet.ActionRequest actionRequest ;

javax.portlet.ActionResponse actionResponse ;

javax.portlet.EventRequest eventRequest ;

javax.portlet.EventResponse eventResponse ;

javax.portlet.PortletConfig portletConfig ;

java.lang.String portletName ;

javax.portlet.PortletPreferences portletPreferences ;

java.util.Map portletPreferencesValues ;

javax.portlet.PortletSession portletSession ;

java.util.Map portletSessionScope ;

javax.portlet.RenderRequest renderRequest ;

javax.portlet.RenderResponse renderResponse ;

javax.portlet.ResourceRequest resourceRequest ;

javax.portlet.ResourceResponse resourceResponse ;

     
        <%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<liferay-theme:defineObjects />

The above statements will give 18 default objects :

themeDisplay, company, account, user, realUser, contact, layout, layouts, plid, layoutTypePortlet, scopeGroupId, permissionChecker, locale, timeZone, theme, colorScheme, portletDisplay, portletGroupId

and the type of each object as follows :

com.liferay.portal.theme.ThemeDisplay themeDisplay ;

com.liferay.portal.model.Company company ;

com.liferay.portal.model.Account account ;

com.liferay.portal.model.User user ;

com.liferay.portal.model.User realUser ;

com.liferay.portal.model.Contact contact ;

com.liferay.portal.model.Layout layout ;

java.util.List layouts ;

java.lang.Long plid ;

com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet ;

java.lang.Long scopeGroupId ;

com.liferay.portal.security.permission.PermissionChecker permissionChecker ;

java.util.Locale locale ;

java.util.TimeZone timeZone ;

com.liferay.portal.model.Theme theme ;

com.liferay.portal.model.ColorScheme colorScheme ;

com.liferay.portal.theme.PortletDisplay portletDisplay ;

java.lang.Long portletGroupId ;


We can get these defaults objects using pageContext object which is default of the plain jsp.

Wednesday, 9 October 2013

SERVICE BUILDER USING MULTIPLE TABLES





SERVICE BUILDER USING MULTIPLE TABLES

This is the UserAFinderImpl class in this class I have declared 1 method. i.e findUser() this method takes no argument and gives the result in the form of list object.

package com.adrsuser.slayer.service.persistence;

import java.util.ArrayList;
import java.util.List;

import javax.portlet.ActionRequest;

import com.adrsuser.slayer.model.AddressU;
import com.adrsuser.slayer.model.UserA;
import com.adrsuser.slayer.model.impl.AddressUImpl;
import com.adrsuser.slayer.model.impl.UserAImpl;
import com.liferay.portal.kernel.dao.orm.SQLQuery;
import com.liferay.portal.kernel.dao.orm.Session;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
import com.liferay.util.dao.orm.CustomSQLUtil;

public class UserAFinderImpl extends BasePersistenceImpl implementsUserAFinder{
      public static String FIND_USERS = "findUsers";
     
      public List findUser() throws SystemException
      {
            Session session = null;
            try
            {
                 
            List objectListUserAddress=new ArrayList();
             List objectListUser=new ArrayList();
              List objectList=new ArrayList();
            
 session = openSession();   
                   String sql = CustomSQLUtil.get(FIND_USERS);
                   
                   System.out.println("Query   -----"+sql);
                   
                   SQLQuery query = session.createSQLQuery(sql);
                   
                   query.addEntity("UserA", UserAImpl.class);
                
 objectListUser=(List)query.list();
            
 objectList.add(objectListUser);
           
                    session=openSession();
                  query = session.createSQLQuery(sql);
                  query.addEntity("AddressU", AddressUImpl.class);
                  objectListUserAddress=(List)query.list();
                  objectList.add(objectListUserAddress);
                    
                  return (List)objectList;
                 
            }
            catch (Exception e) {
                  System.out.println(e);
                 
            }
            return null;
      }
     
      }

In My jsp page I have written simply like this…

<%@page import="java.util.ArrayList"%>
<%@page import="com.adrsuser.slayer.model.UserA"%>
<%@page import="com.adrsuser.slayer.model.AddressU"%>
<%@page import="java.util.List"%>
<%@page import="com.adrsuser.slayer.service.UserALocalServiceUtil"%>
<h1>success fully reached....</h1>
<%

List objectListUser=new ArrayList();

List objectList=new ArrayList();

objectList=UserALocalServiceUtil.findUser();

List<UserA> h1=(List)objectList.get(0);

List<AddressU> h2=(List)objectList.get(1);

        for(UserA ha:h1)
          {
          %>
<%=ha.getUaid() %>
 <%=ha.getUid()%>
<%=ha.getUname()%>
         <% }
      
          for(AddressU hb:h2)
          {
       %>
       <%=hb.getCity()%>
       <%=hb.getState()%>
       <%=hb.getCountry()%>
       <%
       }
       %>
This is my service.xml here are 2 tables UserA and AddressU.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
<service-builder package-path="com.adrsuser.slayer">
      <author>sudheer</author>
      <namespace>AU</namespace>

      <entity name="UserA" local-service="true" remote-service="true">
            <!-- PK fields -->
            <column name="uid" type="int" primary="true" />
            <!-- Audit fields -->
            <column name="uname" type="String" />
            <column name="uaid" type="int" />
      </entity>
      <entity name="AddressU" local-service="true" remote-service="true">
            <!-- PK fields -->
            <column name="uaid" type="int" primary="true" />
            <!-- Audit fields -->
            <column name="country" type="String" />
            <column name="state" type="String" />
            <column name="city" type="String" />
      </entity>

</service-builder>

LIferay for u