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.

Popular Posts

Recent Posts

Recent Posts Widget