Wednesday 22 October 2014

Liferay Interview Questions

  1. What is portal?
  2. What is portlet?
  3. What is difference between portlet and servlet?
  4. Difference between liferay 6.0+ and 6.1+?
  5. Difference between JSR 168 and JSR 286 portlet specification?
  6. What is Liferay?
  7. Liferay portlet lifecycle?
  8. Can we set multiple databases with liferay portal?
  9. Is it possible to configure liferay single instance with different type of databases(like mysql,oracle etc) at the same time?
  10. What do you mean by portal instances?
  11. What are the different types of liferay plugins?
  12. What is hook?
  13. Differences between personalization and customization?
  14. Difference between Authentication and Authorization?
  15. What features of liferay can be customized using hook?
  16. What is the difference between hook and ext?
  17. When you use ext plugin give few examples?
  18. Can liferay struts actions are overridden by the hook?
  19. Can we override all portal.properties file?
  20. How can we read the portal properties file using liferay api?
  21. How can we do LDAP integration with Liferay?
  22. How liferay authenticate the user when it's credential is present in both database as well ass LDAP?
  23. What is internationalization? how it is achived using liferay?
  24. What is site and community in liferay?
  25. What is service builder?
  26. How to define a method for searching an entity based on some table non primery-key attribute?
  27. What is structure of a liferay portlet project?
  28. What are the different configuration file in liferay?explain?
  29. What is portlet prferences?
  30. What is the difference between HttpServletRequest and RenderRequest?
  31. What are the different modes of portlet?
  32. Structure of theme in liferay?
  33. Can we embed portlet in Theme ? if yes how?
  34. Can we embed portlet in layout?If yes how?
  35. If i want to customize look and feel of all portlet,which file of theme i need to customize?
  36. How to make instanceable portlet in liferay?
  37. What is WSRP?
  38. How to create indexes in liferaY?
  39. How to create portlet project in liferay?
  40. What is layout?
  41. Whate are 'users' and 'Users Group' in liferay ?
  42. What is IPC?
  43. How you can implement IPC in liferay?
  44. What are the differences between IPC using event and  IPC using public render?
  45. How to create SpringMVC portlet in liferay?
  46. What is Liferay Portal architecture?
  47. How to customize liferay services?
  48. Where you 'll  write your custome methods in auto generated service layer by service builder?
  49. Can we use internal as well as external database?
  50. Can an organization have multiple site?
  51. Can a site be accesses by multiple organization?
  52. What is the purpose of portal-ext.properties?
  53. Can service builder create the WebService for the new methods created by service buileder?
  54. Community Vs Site in Liferay?
  55. How you'll upgrade 6.0.6 to .6.2 version of liferay?
  56. What is the difference between RenderRequest and ActionRequest?
  57. How you can write your custom service method using service.xml of service builder?
  58. When a request is made in liferay ,  what are the attributes or param are visible in the URL?
  59. What are the configuration rquired for creating a Spring MVC portlet?
  60. Why the core jsp files  are not modified instead of creating custom jsp using hook?
  61. How to make ajax call in liferay portlets?
  62. How to  make finder method  defined in  service.xml available to use?
  63. What is PortletRequest?
  64. What are the parameters present in a PortletRequest?

Thursday 10 October 2013

How to get Custom Field value in Liferay using liferay API?

This code is done for the Expando of User Model (UserExpando) and the custom filed "userCity"



//////////////////////////////

LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
               
                long companyId = liferayFacesContext.getCompanyId();
               
                User user = liferayFacesContext.getUser();
                System.out.println("User info "+user.getUserId()+" --- "+user.getFirstName()+" ---- "+user.getEmailAddress());
                Locale locale = liferayFacesContext.getLocale();
                ExpandoValue val=null;
                ExpandoTable expandoTable = ExpandoTableLocalServiceUtil.getDefaultTable(companyId,User.class.getName());
                long expandoTableId=expandoTable.getTableId();
                ExpandoColumn column = ExpandoColumnLocalServiceUtil.getColumn(expandoTableId, UserExpando.USER_CITY.getName());
                 if (column != null) {
                 val = ExpandoValueLocalServiceUtil.getValue(expandoTableId, column.getColumnId(), user.getUserId());
                   if (val != null) {
                     System.out.println("val====================="+ val);
                   }
                  
                }

/////////////////////////////////

How to get logged In User detail in liferay?

How to get logged In User detail in liferay?

These lines of code will give you the user who is logged in from the LiferayFaces Context.

LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
                
 long companyId = liferayFacesContext.getCompanyId();
                
 User user = liferayFacesContext.getUser();                       //User is an Model of liferay

Wednesday 27 February 2013

How to change user authentication Type in Liferay ?

 How to change user Authentication/ login Type in Liferay? If i want to use screen name instead of emailAddress
There  are two ways to change login type in liferay
1)
company.security.auth.type=emailAddress
#company.security.auth.type=screenName
#company.security.auth.type=userId

In the above case , screenName and userId are commented out using #

2)
a)Login as Admin
b)go to Control panel
c)Click on the Portal setting in the left panel under portal tab
d)Click on the Authentication link in the right panel
e)Select the desired login type from the drop down(How do users authenticate? ) under the General tab.

LDAP connection Read timeout in Liferay

LDAP connection Read timeout in Liferay

Put this lines in portal-ext.properties file to avoid this problem

ldap.connection.com.sun.jndi.ldap.connect.timeout=1000
ldap.connection.com.sun.jndi.ldap.read.timeout=2000


Map Ldap Group with Liferay role

Map Ldap Group with Liferay role


Put the following line into portal-ext.properties file

ldap.import.create.role.per.group=true
layout.show.portlet.access.denied=false

Thursday 31 January 2013

LDAP Configuration with Liferay   through Control Panel for secured connection


LDAP Configuration with Liferay   through Control Panel for secured connection

  • Import the certifcate of ldap server(for secured connection) into your local Jdk.
  • Login as an admin.Default user admin is test and password is test.
  • Hover on Go to then Control Pannel
  • In control panelm page Click Portal Setting of the left Panel
  • Click Authentication link of the  Right panel
  • Select Screen Name for How do users authenticate?  then save -Optional
  • Now click on the LDAP tab and check Enable
  • Then Click on Add button to Add and Cofigure LDAP server .
  •  e.g as an screen shot below

  • Then click save