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?
- $layout.processColumn("column-1","portlet-column-content portlet-column-content-only")
- $processor.processColumn("column-1","portlet-column-content portlet-column-content-only")
- $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?
- portla_noraml.vm
- custom_init.vm
- portlet.vm
- init.vm
Answer:
init.vm
Explanation/Reference:
All required velocity variable are declared in init.vm file
how to get theme settings?
- $theme.getSetting("my-setting")
- $layout.getSetting("my-setting")
- $themeDisplay.getSetting("my-setting")
Answer:
$theme.getSetting("my-setting")
Explanation/Reference:
processor.procceePortlet() what is the parameter we should pass?
- portlet name,
- Fully qualified portlet ID
- Portlet Instance Id
- portletDisplay
Answer:
Fully qualified portlet ID
Explanation/Reference:
If the portlet non instantiable and portlet is 82 then how to embedded into theme?
- $theme.runTime("82",””,$velocityPortletPreferences.toString());
- $theme.runTime("82_INSTANCE_ss33",””,$velocityPortletPreferences.toString());
- $theme.runTime("82_ss33",””,$velocityPortletPreferences.toString());
Answer:
$theme.runTime("82",””,$velocityPortletPreferences.toString());
Explanation/Reference:
how to get users who are added to organization?
- OrganizationLocalServiceUtil.getOrganizationUsers()
- UserLocalServiceUtil.getOrganizationUsers()
- GrouopLocalServiceUtil.getOrganizationUsers()
Answer:
UserLocalServiceUtil.getOrganizationUsers()
Explanation/Reference:
Read more about Group,Organization and User related service classes and its methods
http://cdn.docs.liferay.com/portal/6.1/javadocs/com/liferay/portal/service/UserLocalServiceUtil.html
The available overridden portal properties using hook are defined in which DTD file?
- liferay-hook_6_2_0.dtd
- liferay_hook6.2.0.dtd
- liferay.hook.6.2.0.dtd
Answer:
liferay-hook_6_2_0.dtd
Explanation/Reference:
JSR 286 Standard Portlet Modes?
- View,
- Edit,
- help
- 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 ?
- portal-developer.properties
- developer.properties
- portal.properties
- system.properties
Answer:
portal-developer.properties
Explanation/Reference:
What are the liferay plugins in Plugins SDK?
- AUI Plugins
- Ext,
- Theme,
- Layout,
- Portlet,
- Web
- Hook
Answer:
Ext,
Theme,
Layout,
Portlet,
Web
Hook
Explanation/Reference:
how to specify the Custom JSPs path in hook when we override it?
- <custom-jsp-dir>
- <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?
- True,
- 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?
- Specify remote-service=”true” on <service-builder/> tag.
- Specify remote-service=”true” on <entity/> tag.
- 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?
- All portlet in same page,
- All portlets in portal application,
- 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?
- portlet.event.distribution= layout-set
- portlet.event.distribution= layout
- 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?
- AUI,
- YUI,
- jQuery,
- 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?
- Use ext to create indexer,
- 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?
- Yes,
- 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?
- HtmlUtil.isEmail(),
- StringUtil.isEmail(),
- Validator.isEmailAddress(emailAddress)
Answer:
Validator.isEmailAddress(emailAddress)
Explanation/Reference:
Hooks can be used to?
- override portal core struts actions
- override portlet struts action
- create web services
Answer:
override portal core struts actions,
override portlet struts action,
Explanation/Reference:
Best practice Plugin portlet can import classes from ?
- portal-service.jar
- portla-impl.jar
- portlet.jar
- 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?
- portlet property resource.action.configs
- portal property resource.action.configs
Answer:
portlet property “resource.action.configs”
Explanation/Reference:
We will use resource.actions.configs=resource-actions/default.xmlin portlet.properties file which in respective plugin portlet
Ext should be used to ?
- Override JSP pages,
- Override portla proerprites,
- create fileters,
- Override deployment descriptors of portal portlets,
Answer:
Override deployment descriptors of portal portlets
Explanation/Reference
Hooks can do Override JSP pages,Overrideportla 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
- Create and register your custom PortletDisplayTemplateHandler class.
- 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:
- 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:
- 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
- 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 ?
- True
- 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”
- 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.
- 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?
- create hook for model lister and override onAfterCreate,
- create hook for model lister and override onBeforeCreate,
- create hook for service override JournaArtilceLocalServiceImpl
- create ext for service override JournaArtilceLocalServiceImpl
Explanation/Reference:
To avoid duplicate Insertion of records when use refresh the page?
- sendRedict(),
- 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 ?
- Override init()
- override processAction()
- override render()
- 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
To write separate actions in portlet class and its extend MVCPortlet then
- We should implement ActionCommand Interface
- We should override processAction(--) method
- We should override renderCommand method
Answer:
We should implement ActionCommand Interface
We should processAction(--) method
Explanation/Reference:
UserLocalServiceUtil implementation available in?
- UserLocalServiceImpl
- UserService
- UserServiceImpl
- PersistnaceImpl
Answer:
UserLocalServiceImpl
Explanation/Reference:
Best Practice to customize Add Application" menu portlets?
- use ext to override all portlet liferay-portlet.xml file.
- 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
- crate filename-overide.jsp and include in custom jsp.
- use <liferay-util:buffer> to add global jsp page content.
- directly override global jsp page.
Answer:
use <liferay-util:buffer> to add global jsp page content
Explanation/Reference:
Expando is?
- Customize portlet plugin
- Build Liferay service
- Define custom set of fields /its defined dynamic data definitions
- All
Answer:
Define custom set of fields /its defined dynamic data definitions
Explanation and Reference
To display language key of key “apt-at”?
- <liferay:ui:local key="apt-at"/>
- <liferay:ui:language key="apt-at"/>
- <liferay:ui:message key="apt-at"/>
- <liferay:ui:success key="apt-at"/>
Answer:
<liferay:ui:message key="apt-at"/>
Explanation and Reference:
To escape the characters using following method?
- HtmlUtil.escape()
- GetterUril.escape()
- StringUtil.escape()
Answer:
HtmlUtil.escape()
Explanation And Reference:
Which method called for each portlet load?
- AUI.ready()
- Liferay.portlet.ready()
- Liferay.on()
- 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 ?
- We cant do that. Once one plugin have struts-config-ext.xml, other ext plugin can’t have it.
- It will add all ext plugins combine and deploy
- all exts deployed successfully
- 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?
- Assests
- WorkFlow
- Counter Service
- 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.
0 comments:
Post a Comment