Showing posts with label liferay questions. Show all posts
Showing posts with label liferay questions. Show all posts

Sunday, September 11, 2016

Liferay Interview Questions

  • Liferay Basics

  • What is a portal?
  • What is a portlet container and explain more about it.
  • What is a portlet?
  • What are the prerequisites to set up the Liferay in your local machine?
  • What is the current running version of Liferay?
  • What are all Liferay versions?
  • What is meant by GA in Liferay versions?
  • What is meant by stable version and Beta version?
  • What are the features of a portal?
  • What is JSR?
  • What is the difference between JSR 168 and JSR 286?
  • Who framed these JSR 168 and JSR 286 standards?
  • What is the difference between Portlet and Servlet?
  • What is the use of a theme in Liferay?
  • What is the use of layout in a portal?
  • What are the advantages of the Liferay portal?
  • What is the Differences between personalization and customization?
  • What is the Difference between Authentication and Authorization?
  • What is meant by collaboration?
  • What is the use of portal-ext.properties file and how we can use in the Liferay portal?
  • What is a Liferay portal instance?
  • Can we configured multiple domains on a single Liferay instance and hook

  • Portlet

  • What is portlet?
  • What is the Life Cycle of a portlet?
  • How many portlet life cycle methods given by JSR 168 and what are they?
  • How many portlet life cycle methods given by JSR 268 and what are they?
  • What are the portlet modes and what is the use of the modes.
  • What are the important descriptor files   to run and manage the custom portlets in the Liferay portal?
  • What are the key configurations we can place in portlet.xml file?
  • What are the key configurations we can place in liferay-portlet.xml file?
  • What are the key configurations we can place in liferay-display.xml file?
  • What are the configurations we can place in the liferay-portlet-package.properties file?
  • Where we can create a portlet category and segregate the portlet under that category.
  • How can we register a portlet with the portlet container?
  • How we can register the configuration page implementation class in a portlet.
  • Where we can configure Language.properties file of a portlet and how to use the file properties in the portlet.
  • What is meant by <instanceable>true</instanceable>?
  • What is meant by <instanceable>false</instanceable>.
  • How to configure multiple portlets in a single folder structure.
  • How to Support Internationalization (i18n) On Liferay Portlets.
  • How to use jQuery in the Liferay portlet
  • What are the global files in a custom portlet w.r.t CSS and JS and where we configure in order to make availability of those files to the JSP files automatically (without including those in the JSP files)
  • Draw the portlet autonomy
  • What is the difference between render URL, action URL and resource URL in the Liferay portlet?
  • What are the window states of a Liferay Portlet?
  • What is portlet preferences?
  • What is the structure of normal MVC portlet in Liferay?
  • What is the structure of Spring MVC portlet in Liferay?
  • Explain about the Liferay search container in the Liferay portlet
  • Explain the process to implement Ajax calls in Liferay
  • The process to create pop ups in Liferay portlet.
  • Explain the process to create tabs in the Liferay portlet
  • How can we read the portal properties in the portlet using Liferay API?
  • How to embed a Liferay portlet in other non Liferay websites

  • Liferay Hooks

  • What is the use of an EXT in Liferay Portal?
  • What is the use of a Hook in Liferay Portal?
  • What is the difference between EXT and hooks
  • How to override a portal services using hook.
  • What are the disadvantages with the EXT.?
  • What are the disadvantages with the Hook?
  • How to override Liferay struts actions by the hook

  • Liferay Service Builder

  • What is a service builder?
  • What is the use of namespace in service.xml file?
  • What is the purpose of specifying local-service=true in service.xml file
  • What is the purpose of specifying remote-service=true in service.xml file
  • What are the service layers created by the service builder and explain them briefly.
  • What is the process to define finder methods in the service builder?
  • What is the process to define custom SQL methods in the service builder?
  • When will be the database table will create in the given database w.r.t the service builder.
  • Is there a build number associated to a portlet assigned by the service builder? Where can we find the current build number?
  • What is the purpose of mode and persistence packages which are created by the Liferay service builder?
  • Can we set multiple databases with Liferay Portal?
  • Where you can write custom methods in auto generated service layer by service builder
  • Explain the process to implement web services methods w.r.t generated service layer in Liferay.
  • Explain generate native mobile Liferay service libraries in Liferay?
  • Explain Liferay cache mechanism.
  • How to disable Liferay cache to Liferay portal entities and custom entities.
  • How disable Liferay cache to Finder methods.
  • How to implement transaction roll back in Liferay services.
  • What is Liferay Dynamic Query?
  • What is different between findBy and fetchBy methods in Liferay services?
  • Does Liferay Support Foreign Key relation?
  • How to implement One to Many and Many to Many relationship in Liferay.
  • What is Liferay Model Listeners and its importance?
  • What is different between XXXLocalServices and XXXServices?
  • What is PrincipalException in Liferay and when it occurred?
  • How to expose one plugin services with other plugin?
  • Can we implement multiple Data sources in Liferay and explain the mechanism to implement it.
  • How to expose Liferay service as web services
  • Explain how to generate web services in Liferay
  • What Liferay Mobile SDK?

  • Liferay Themes

  • What is theme and explain the process to create a customized theme
  • How to embed a portlet in a theme
  • What is the use of theme settings in a theme .Explain with one use case?
  • What is the CSS file we use to customize the portlet title, border colors?
  • Draw anatomy of a theme
  • How to place multiple themes in a single folder structure and what is the use of doing this with one use case
  • What are the implicit variables in a theme velocity file?
  • How to get the Liferay portal service classes in a theme velocity file
  • What is the process to apply a theme to a page as well as a website?
  • Explain Liferay Theme Setting.
  • Explain what Liferay Theme color screams.
  • What are the languages we can use to implement Liferay theme templates?

  • Liferay Layouts

  • How to create a layout in Liferay.
  • Draw the anatomy of a layout.
  • What is the process to apply a layout to a page?
  • How to embed portlet in Layout?

  • Liferay Administration

  • What is role in Liferay?
  • How many types of roles are exists in Liferay portal. What are they?
  • What is Inherited Roles in Liferay?
  • What is meant by user group?
  • What is meant by Team?
  • What is the difference between an organization and site?
  • What is Location organization?
  • Can we have multiple organizations with same name in Liferay portal?
  • What is a site template?
  • What is a page template?
  • What is the process to assign a role to the user from control panel?
  • What is the process to define permissions on a role?
  • Explain about server administration
  • How to install Liferay market place apps from the control panel
  • How to uninstall a portlet from the server through control panel
  • How to configure email server credentials in the control panel
  • Explain the process of LDAP authentication in Liferay
  • What is the process to see the portal properties in the control panel?
  • What is DL (Document Library) in Liferay?
  • How does Liferay document library implemented in Liferay and what is repository implementation Liferay using?
  • Can we store documents and files in database in Liferay?
  • How to change file system and its repositories in Liferay

  • Others

  • What is an IPC and how you can implement IPC in Liferay
  • What are the differences between IPC using event and IPC using public render
  • Explain about the structures, templates and article with real time scenario.
  • Explain the Kaleo work flow management.
  • How to implement workflow for custom entity?
  • Explain SOLR Integration with Liferay.
  • Explain how to implement SSO (Single Sign On) in Liferay.
  • How many ways we can Implement SSO in Liferay.


Author

Tuesday, December 2, 2014

Liferay 6.2 Portal Developer Certification Model Question Paper


Liferay have introduced portal developer certification for Liferay 6.2 and its almost similar to Liferay 6.1 and Liferay 6.2 Portal Developer Certification covered the topics which are related to New Features in Liferay 6.2 too.

The exam consist following types of Questions.

Single Selection (Radio Button)
Multiple Answers Selection (Check Boxes)
Boolean Type Single Selection (Radio Button)

Single Selection (radio button):

This type of question there is only one statement is correct answers so we need select the radio button out of given choices.

Multiple Answers Selection (Check boxes)

We need to select multiple statements to give complete answers by clicking on check boxes it may be 2 or more statements we need to select from given choises.

Boolean Type Single Section (Radio Button)

Here we have two option like True/False so we need to select correct choice from given two option.

Certification Exam Marks and Weightage of Topics

Total Question: 50 (100%)
Total Time: 90 Minutes
Minimum Required Score: 75%( Minimum 36 Questions we should answer correct)

Topics and Question weightage in Each Topic

Topics Number of Questions(Total 50) % occupation in Total (100%)
Advanced Customization(Ext) 4 8%
Architecture and APIs 13 or 12 26%  or 24%
Development Best Practices 5 10%
Hook Plugins 12 24%
Layout Template Plugins 2 or 3 4% or 6%
Portlet Plugins 12 or 13 24% or 26%
Theme Plugins 3 or 2 6% or 4%

Important Points for Liferay 6.2 Portal Developer Certification.

  • We should follow Liferay Developer Guide and mandatory to cover all the topics which are specified in liferay certification blue print.
  • Need to aware of all Liferay DTD files
  • Need to aware of all Liferay Tag libraries
  • Need to have good understating of new features in Liferay 6.2

Reference Links:



Note:

My sincere request is please follow the developer guide,other liferay resources and don't depend only on the model question paper ,there are many questions we can expect from above topics but topics weightage is sample and they questions always similar to the question which specified in model paper.



Liferay 6.2 Portal Developer Certification Model Question Paper

How to add column in layout?
  1. $layout.processColumn("column-1","portlet-column-content portlet-column-content-only")
  2. $processor.processColumn("column-1","portlet-column-content portlet-column-content-only")
  3. $layoutset.processColumn("column-1","portlet-column-content portlet-column-content-only")
Answer:

$processor.processColumn("column-1","portlet-column-content portlet-column-content-only")

Explanation/Reference:


$theme VM variable is declared in?
  1. portla_noraml.vm
  2. custom_init.vm
  3. portlet.vm
  4. init.vm
Answer:

init.vm

Explanation/Reference:

All required velocity variable are declared in init.vm file

how to get theme settings?
  1. $theme.getSetting("my-setting")
  2. $layout.getSetting("my-setting")
  3. $themeDisplay.getSetting("my-setting")
Answer:

$theme.getSetting("my-setting")

Explanation/Reference:

processor.procceePortlet() what is the parameter we should pass?
  1. portlet name,
  2. Fully qualified portlet ID
  3. Portlet Instance Id
  4. portletDisplay
Answer:

Fully qualified portlet ID

Explanation/Reference:


If the portlet non instantiable and portlet is 82 then how to embedded into theme?
  1. $theme.runTime("82",””,$velocityPortletPreferences.toString());
  2. $theme.runTime("82_INSTANCE_ss33",””,$velocityPortletPreferences.toString());
  3. $theme.runTime("82_ss33",””,$velocityPortletPreferences.toString());
Answer:

$theme.runTime("82",””,$velocityPortletPreferences.toString());

Explanation/Reference:


how to get users who are added to organization?
  1. OrganizationLocalServiceUtil.getOrganizationUsers()
  2. UserLocalServiceUtil.getOrganizationUsers()
  3. GrouopLocalServiceUtil.getOrganizationUsers()
Answer:

UserLocalServiceUtil.getOrganizationUsers()

Explanation/Reference:

Read more about Group,Organization and User related service classes and its methods


The available overridden portal properties using hook are defined in which DTD file?
  1. liferay-hook_6_2_0.dtd
  2. liferay_hook6.2.0.dtd
  3. liferay.hook.6.2.0.dtd
Answer:

liferay-hook_6_2_0.dtd

Explanation/Reference:


JSR 286 Standard Portlet Modes?
  1. View,
  2. Edit,
  3. help
  4. Print
  5. Configuration
Answer:

View,
Edit,
help

Explanation/Reference:


how to run portal in developer mode?

Answer:

set JVM system variable like -Dexternal-properties= portal-developer.properties

Explanation/Reference:

Liferay in Developer Mode on a Tomcat application server, you’d add -Dexternal-properties=portal-developer.properties to the list of options for your CATALINA_OPTS variable, in your setenv.sh file (setenv.bat in Windows).

-Dexternal-properties= portal-developer.properties


Liferay developer environment properties available in properties file ?
  1. portal-developer.properties
  2. developer.properties
  3. portal.properties
  4. system.properties
Answer:

portal-developer.properties

Explanation/Reference:


What are the liferay plugins in Plugins SDK?
  1. AUI Plugins
  2. Ext,
  3. Theme,
  4. Layout,
  5. Portlet,
  6. Web
  7. Hook
Answer:

Ext,
Theme,
Layout,
Portlet,
Web
Hook

Explanation/Reference:


how to specify the Custom JSPs path in hook when we override it?
  1. <custom-jsp-dir>
  2. <custom-jsp-global/>
Answer:

<custom-jsp-dir>

Explanation/Reference:


To map Service Builder with existing table the entity name should be same as table name?
  1. True,
  2. False,
Answer:

False

Explanation/Reference:

Need not be same we can we use “table” attribute to <entity> tag.

To know more have look into liferay service builder dtd


How to specify Service Builder to generate remote services?
  1. Specify remote-service=”true” on <service-builder/> tag.
  2. Specify remote-service=”true” on <entity/> tag.
  3. Specify remote-service=”true” on <column/> tag.
Answer:

Specify remote-service=”true” on <entity/> tag.

Explanation/Reference:

<entity name="Student" local-service="true" remote-service="true" >


If we use session with application scope then the values available to?
  1. All portlet in same page,
  2. All portlets in portal application,
  3. None of these,
Answer:

All portlets in portal application

Explanation/Reference:

A Portlet Session is created for each user per portlet application. This makes the Portlet Session useful for communicating all user related information among different portlets in the same portal application.


To create IPC events among all portlets which are in different pages, what is property we need define?
  1. portlet.event.distribution= layout-set
  2. portlet.event.distribution= layout
  3. portlet.event.distribution= all-pages
Answer:

portlet.event.distribution= layout-set

Explanation/Reference:

Go through following statement in portal.propeties file

# Set this property to specify how events are distributed. If the value is
# "layout-set", then events will be distributed to all portlets contained in
# a layout set. If the value is "layout", then events will be distributed to
# all portlets that are present in a layout.
#
portlet.event.distribution= layout-set



Liferay core Java script library used by Liferay?
  1. AUI,
  2. YUI,
  3. jQuery,
  4. DOJO
Answer:

AUI

Explanation/Reference:

Liferay used AUI as it core javascript library.


To add search index for all user fileds in the search what is best practice?
  1. Use ext to create indexer,
  2. create hook for Indexer post processor
Answer:

Create hook for Indexer post processor

Explanation/Reference:


Hook can do only override global JSPs,Struts Action,portal properties?
  1. Yes,
  2. No
Answer:

No

Explanation/Reference:

Hooks have lot more capabilities it can also used overide portal services, crate Indexer Post Processor and create filters


What is method to verify valid email?
  1. HtmlUtil.isEmail(),
  2. StringUtil.isEmail(),
  3. Validator.isEmailAddress(emailAddress)
Answer:

Validator.isEmailAddress(emailAddress)

Explanation/Reference:


Hooks can be used to?
  1. override portal core struts actions
  2. override portlet struts action
  3. create web services
Answer:

override portal core struts actions,
override portlet struts action,

Explanation/Reference:


Best practice Plugin portlet can import classes from ?
  1. portal-service.jar
  2. portla-impl.jar
  3. portlet.jar
  4. ext-impl.jar
Answer

portlet.jar
portal-service.jar,

Explanation/Reference:

We can use portal-service.jat and portlet.jar related classes in plugin portlet development.
Portal-impl.jar is core portal implementation is not exposed to out side of portal,same ext-impl also not exposed out of portal.

Plugin portlet is separate context so the two(portla-impl.jar,ext-impl.jar ) jars are not available to plugin portlet.

how to defined path of resource action file in Plugin portlet?
  1. portlet property resource.action.configs
  2. portal property resource.action.configs
Answer:

portlet property “resource.action.configs”

Explanation/Reference:

We will use resource.actions.configs=resource-actions/default.xml in portlet.properties file which in respective plugin portlet


Ext should be used to ?
  1. Override JSP pages,
  2. Override portla proerprites,
  3. create fileters,
  4. Override deployment descriptors of portal portlets,
Answer:

Override deployment descriptors of portal portlets

Explanation/Reference

Hooks can do Override JSP pages,Override portla properties, create filters but it cant do override deployment descriptors of portal portlets here we need exts.

Application display implementation steps?

Answer: 

Follow the below all steps

Explanation/Reference
  1. Create and register your custom PortletDisplayTemplateHandler class.
  2. Now that we’ve created the template handler, declare it with the <template-handler>...</template-handler> tags in the Location Listing Portlet’s <portlet> element of your liferay-portlet.xml file:
  3. Since the ability to add ADTs is new to your portlet, we need to configure permissions so that administrative users can grant permissions to the roles that will be allowed to create and manage display templates. Just add the action key ADD_PORTLET_DISPLAY_TEMPLATE to your portlet’s docroot/WEB-INF/src/resource-actions/default.xml file:
  4. Now that your portlet officially supports ADTs, you’ll want to expose the ADT option to your users. Just include the liferay-ui:ddm-template-selector taglib in the JSP file you’re using to control your portlet’s configuration mode (e.g., config.jsp if you choose to have it created through Liferay Developer Studio’s New Portlet wizard), providing the required information. We’ll add the display settings to the Location Listing Portlet’s configuration.jsp file
  5. You’re almost finished, but you still have to extend your view code to render your portlet with the selected ADT. Here is where you decide exactly which part of your view will be rendered by the ADT and what will be available in the template context. To do this, add the following code outlined below to your Location Listing Portlet’s view.jsp file

Note:

They will give multiple check boxes for answers we need to select all relevant statement check boxes.

When use newly create in my account page can see
"users.form.update.main=details,password,organizations" if override this property form hook as follows "users.form.update.main=details,password,organizations,sites,roles" it can be changed the use my account page sections ?
  1. True
  2. False,
Answer:

False

Explanation/Reference:

From hook we cannot modify users.form.update.main portal property .we should use ext .


Best practice to override “UserLocalServiceUtil.authenticateByuserName()” we will use wrapper service “MyUserLocalServiceImpl”
  1. Defined service in liferay-hook.xml as follows <service><service-type>com.liferay.portal.service.UserLocalService</service-type><service-impl>com.liferay.sample.hook.MyUserLocalServiceImpl</service-impl></service>.
  2. Override authenticateByuserName() method.
  3. Implement custom Logic and call super.authenticateByuserName method if applicable.
  4. copy all methods from UserLicalServiceImpl in MyUserLocalServceImpl.
Answer:

The first three statements are correct.

Defined service in liferay-hook.xml as follows
<service>
<service-type>
com.liferay.portal.service.UserLocalService
</service-type>
<service-impl>
com.liferay.sample.hook.MyUserLocalServiceImpl
</service-impl>
</service>

Override authenticateByuserName() method,

Implement custom Logic and call super.authenticateByuserName method if applicable.

Explanation/Reference:


To populate Custom Field of Web Content in Web Content's Template what is best practice?
  1. create hook for model lister and override onAfterCreate,
  2. create hook for model lister and override onBeforeCreate,
  3. create hook for service override JournaArtilceLocalServiceImpl
  4. create ext for service override JournaArtilceLocalServiceImpl
Explanation/Reference:


To avoid duplicate Insertion of records when use refresh the page?
  1. sendRedict(),
  2. CleatRequestParameted()
Answer:

sendRedict(),

Explanation/Reference:

We can also use following tag in liferay-portlet.xml

<action-url-redirect>true</action-url-redirect>

When we extend MVCPortlet to our custom portlet class ?
  1. Override init()
  2. override processAction()
  3. override render()
  4. Non of the above
Answer:

Non of the above

Explanation/Reference:

We really not mandatory to override any method if we extend MVCPortlet class 

To write separate actions in portlet class and its extend MVCPortlet then
  1. We should implement ActionCommand Interface
  2. We should override processAction(--) method
  3. We should override renderCommand method
Answer:

We should implement ActionCommand Interface
We should processAction(--) method

Explanation/Reference:


UserLocalServiceUtil implementation available in?
  1. UserLocalServiceImpl
  2. UserService
  3. UserServiceImpl
  4. PersistnaceImpl
Answer:

UserLocalServiceImpl

Explanation/Reference:


Best Practice to customize Add Application" menu portlets?
  1. use ext to override all portlet liferay-portlet.xml file.
  2. use liferay hook plugin to override portla.proeprties by portal-ext with dockbar.add.portlets property.
Answer:

use liferay hook plugin to override portla.proeprties by portal-ext with dockbar.add.portlets property

Explanation/Reference:

Find following statements in portal.properties
## Dockbar Portlet
# Set the portlet IDs that will be shown directly in the "Add Application"
# menu.
#
dockbar.add.portlets=com_liferay_journal_content_web_portlet_JournalContentPortlet,101,110,71

Best practice to isolate global jsp pages when we override jsp page from hook
  1. crate filename-overide.jsp and include in custom jsp.
  2. use <liferay-util:buffer> to add global jsp page content.
  3. directly override global jsp page.
Answer:

use <liferay-util:buffer> to add global jsp page content

Explanation/Reference:


Expando is?
  1. Customize portlet plugin
  2. Build Liferay service
  3. Define custom set of fields /its defined dynamic data definitions
  4. All
Answer:

Define custom set of fields /its defined dynamic data definitions

Explanation and Reference


To display language key of key “apt-at”?
  1. <liferay:ui:local key="apt-at"/>
  2. <liferay:ui:language key="apt-at"/>
  3. <liferay:ui:message key="apt-at"/>
  4. <liferay:ui:success key="apt-at"/>
Answer:

<liferay:ui:message key="apt-at"/>

Explanation and Reference:



To escape the characters using following method?
  1. HtmlUtil.escape()
  2. GetterUril.escape()
  3. StringUtil.escape()
Answer:

HtmlUtil.escape()

Explanation And Reference:




Which method called for each portlet load?
  1. AUI.ready()
  2. Liferay.portlet.ready()
  3. Liferay.on()
  4. AUI.on()
Answer:

Liferay.portlet.ready()

Explanation And Reference:


If we create 2 ext-plugins & modify struts-config-ext.xml in both of them, what is the load order ?
  1. We cant do that. Once one plugin have struts-config-ext.xml, other ext plugin can’t have it.
  2. It will add all ext plugins combine and deploy
  3. all exts deployed successfully
  4. last deployed ext changed will be precedence
Answer:

We cant do that. Once one plugin have struts-config-ext.xml, other ext plugin can’t have it.

Explanation And Reference:


What are the default services which injected in each Plugin Portlet Services?
  1. Assests
  2. WorkFlow
  3. Counter Service
  4. Resource Service
Answer:

Counter Service
Resource Service

Explanation And Reference

When we implement services for plugin portlet using SB then each entity serivce depend on some required portal services that is why in each plguin portlet service by default it will be injected by some important services .

This information we can see in each plugin portlet XXXServiceBaseImpl.java

@BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
protected com.liferay.counter.service.CounterLocalService counterLocalService;

@BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;

@BeanReference(type = com.liferay.portal.service.ClassNameService.class)
protected com.liferay.portal.service.ClassNameService classNameService;

@BeanReference(type = ClassNamePersistence.class)
protected ClassNamePersistence classNamePersistence;

@BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
protected com.liferay.portal.service.ResourceLocalService resourceLocalService;

@BeanReference(type = com.liferay.portal.service.UserLocalService.class)
protected com.liferay.portal.service.UserLocalService userLocalService;

@BeanReference(type = com.liferay.portal.service.UserService.class)
protected com.liferay.portal.service.UserService userService;

@BeanReference(type = UserPersistence.class);
protected UserPersistence userPersistence;

Note:

These are sample model questions and its options. Please you should cover the specified topics from certification blue print.

Recent Posts

Recent Posts Widget

Popular Posts