Q. What is Portal?
Portal is platform to create web applications where portal provides commonly used features such as user management, authentication, sites, web content management to avoid creating from scratch. Portal assembles multiple portlet applications to form a page
Q. What is Portlet?
Portlet is single application fragment on Portal
Q. What is Liferay portal and how it differs from other portals IBM WCM,Web logic?
Liferay Portal is platform contains common applications used to create web application
Liferay provides a development framework with highly customization components for building a site.
Liferay Portal can be used for content management, be it web content management
Liferay Portal offers a rich collaborative application suite with:
- Calendars
- Blogs
- Wikis
- Workflow
- User Management
Q. is Liferay is JSR-168 compliant or JSR-286?
JSR – 286
Q. Which all methods JSR-286 supports?
init(),render(),processAction(),processEvent(),serveResource(),destroy()
Q. Which JSR-286 portlet class extends?
GenericPortet
Q. What class LiferayMVCPortlet extends?
LiferayPortlet -> GenericPortlet
Q. What is Use of <portlet:defineObject> and <liferaytheme:defineObject>?
These are liferay tag libs and provide access to below list of objects in JSP:
portlet:defineObject will provide following variables
- renderRequest and renderResponse
- actionRequest and Response
- eventRequest and Response
- resourceRequest and Response
- portletConfig
- portletSession
- portletSessionScope
- portletPreference
- portletPreferencesValues
- liferay-theme:defineObject will provide following variables
- themeDisplay
- company
- user
- realUser
- contact
- layout
- plid
- layoutTypePortlet
- portletGroupId
- permissionChecker
- locale
- timeZone
- theme
- colorScheme
- portletDisplay
Q. Explain IPC(Inter portlet communication)?
Portlet 1.0 did not offer any standard method for portlets to communicate with each other
Portlet 2.0 (JSR – 286 ) addresses this issue with 2 different mechanisms for IPC.
Public Render Parameters
Portlet Events
Q. What property is used to publish event to all portlets on different pages in portal-ext.properties?
portlet.event.distribution=layout-set
Q. Which property is used to publish event to all portlets on different pages ?
public.render.parameter.distribution=layout-set
Q. What is the use of the PortletPreferences interface?
Portlet Preferences are properties for storing basic portlet configuration data. Administrators often use preferences to provide a customized view of a portlet to users based on preferences.
Q. How to Use LDAP Authentication with Liferay?
LDAP is a lightweight index that gets to the convention that is most normally utilized for verification and approval of clients. LDAP principally comprises clients and user groups of any association with certain search channels like DN sections. In the control board of Liferay, we have an alternative to giving the LDAP settings with the goal that entry can contact the outsider like LDAP and bring the necessary clients and gatherings according to given mappings.
For instance, the Active catalog is an LDAP execution that can store clients. Liferay bolster joining of any LDAP usage through its administrator control board.
We have to give the settings in control board – > entrance settings – > LDAP
This will require LDAP URL, username, secret phrase, clients search channels mappings, bunches search channels mapping and so forth.
Q. What Is Portal-ext properties File? How This Can Be Configured And Used In Liferay?
Liferay Portal accompanies default setups that are put away in the portal.Property record. You can utilize entryway ext.properties record to supersede the qualities in the portal.properties document.
This permits you a spotless method to keep your own duplicate of designs that can be utilized outside the entryway simultaneously you can without much of a stretch redesign the gateway.
Q. What Is Inter-portlet Communication? Why Is It Required To Use JSR Style Inter-portlet Communication?
Now and then we have the necessity where we have to build up a correspondence in the middle of two portlets, for instance, any activity is done in one portlet diverting the end client to other portlets where an outcome is showing according to activity done on the first portlet.
So right now we need to utilize Liferay between portlet correspondence instrument which serve the activity performed by end client in one portlet and give the outcome to the second portlet where the activity result should be shown. We can say that it takes a shot at the striker-catcher instrument.
JSR style entombs portlet correspondence guarantees that your portlets are getting down to business on some other JSR agreeable entryway server. In the event that you utilize a Liferay explicit approach to convey between portlets than you will most likely be unable to send and run the equivalent portlet war on another JSR agreeable gateway (for example Apache Pluto)
Q. What Is A Liferay Portal Instance?
Liferay entrance ships with the one Liferay entry tomcat wrap which is fully operational in any server with certain database settings. We can have more than one Liferay examples running from one database.
Liferay Portal permits you to run more than one entrance example on a solitary server. The Portal Instances page of the control board lets you deal with these cases. Information for every entry occurrence is kept discrete. All entryway information, in any case, is kept in a similar database.
Every entrance example requires its own area name. Liferay will guide clients to the correct entry occasion dependent on this area name. So before you arrange an example, we have to design its space name in our system first. At the point when we are prepared to include an occurrence, click the Instances tab – > Add button.
It will be incited for four fields and a checkbox:
Web ID: A general show is to utilize the space name for this. It’s a client created an ID for the case.
Virtual Host: Put the space name you arranged in your system here. At the point when clients are coordinated to your Liferay server by means of this area name, Liferay will at that point have the option to send them to the best possible entrance case.
Mail Domain: Enter the space name for the mail to have for this case. Liferay will utilize this to send email warnings from the entryway.
Max Users: Enter the greatest quantities of client accounts you might want your gateway occasion to help.
Active: Use this checkbox to pick whether to make a functioning or a dormant entry example.
Presently we have to click Save. Presently explore to the gateway utilizing a new area name. We will see that it seems as though a clean introduction of Liferay. This is our new entry occurrence which would now be able to be ready for action.
Q. How Can I Configure Two Different Domain Names (for example First.example.com And Second.example.com) On Liferay?
At the hour of formation of any site, we have to give area names which further accept it as site space name. We have to give the specific space name as required through the control board of Liferay entry. A single example of Liferay Portal underpins the facilitating of at least two space names by means of communities(sites).
At the point when we will go to control board – > Site settings – > we can give the site URL, subtleties like the site(community) portrayal, participation type, dynamic status, and virtual host.
Q. How Can I Configure Liferay To Use Email Address As User Name Instead Of Screen Name?
We can set this from control board – > gateway settings – > Authentication – > LDAP – > How do clients confirm?. Here we can choose whatever we require from an email address, screen name or client ID. At the hour of LDAP confirmation, we have to give the required LDAP mappings which essentially peruses every one of the subtleties identified with clients and user groups from the LDAP catalog and import into Liferay entry. At the hour of this association with the outsider, we have to give the necessary field like validation ought to be by email address or screen name or client ID.
Q. How To Customize The Behavior Of Liferay Default Out Of The Box Portlets (for example Record View, Calendar, Blog, Wiki Etc)?
In the event that we need any customization, identified with JSP and UI then we can execute this utilizing Hooks. Liferay entryway accompanies a pack where all the default worked in portlets exist. On the off chance that any customization required in the center level classes, at that point it tends to be done through EXT, for instance, LDAP clients and client bunches import change. in any case, here in EXT, the restart would be required.
Q. What Is Liferay Service Builder? Is There Any Alternative To Use Service Builder? What Are The Advantages And Disadvantages Of Using It?
Liferay administration manufacturer is fundamentally used to make the administration layers for any business rationale execution. From the engineering perspective, it is very helpful as it used to make all the administration layers programmed. Assume we need to build up a portlet, for this, we have to compose all the necessary execution classes, utility classes, and other required classes. Administration manufacturer is utilized to make every one of these classes for the engineer, where they can include their business rationale further and process the information and render the yield to see according to the prerequisite.
According to the favorable position, this administration manufacturer will make the entire structure of the administration layers for designers essentially. It truly causes them to compose the code and their rationale in administration developer made model executions and administration usage classes. These classes accompany typical CRUD (make, update and delete)operations. For a designer, no compelling reason to include anything extra as entire assistance and utility layers are as of now got made by administration developer. It truly accelerates the development procedure.
Administration developer requires service.xml which is having a portion of the necessary sections. Every one of the sections is essentially called substance, which is having its essential key fields with some other required fields. On the off chance that we need to execute request and discoverer technique, we can actualize it by utilizing this service.xml.
Every substance makes a table into Liferay arranged database with the given segment names and their sorts. We can make service.xml related neighborhood administration and remote-administration by setting them esteem as “genuine”. At the point when we would run this fabricate administration like underneath, this would make all the administration layers(implementation, utility and so on.) where the engineer can compose their necessary business rationale further. Formation of all the administration classes would be finished by the build.xml, we have to manufacture administrations utilizing this XML document into Ant perspective on IDE.
Q. How To Set The Display Category Of A Custom Built Liferay Portlet?
We can set the presentation class like underneath referenced Liferay-display.xml. Assume we have created one portlet where the portlet ID we have given. We have to enter the exclusively incorporated Liferay portlet with the certain classes like name “category.cms”, “category.collaboration” and so on. By doing this exclusively fabricated Liferay portlet would come in the required class by tapping the include application highlight of Liferay as there would be a significant number of portlets under various classifications. So beneath the label, we have to enter for the passage of a portlet into a certain class.
<display>
<category name=”category.cms”>
<portlet id=”20″/>
</category>
</display>
Q. How To Support Internationalization (i18n) On Liferay Portlets? How Do You Support Multiple Languages Without Writing Java Code In Liferay?
We can bolster internationalization (i18n) on Liferay portlets and all through this entire Liferay entrance. We have to give whatever language we have to help into Liferay gateway. This is mostly perused the area’s number and give the accessible language like en_US(English), SG(Singapore), zh_CN(simple Chinese), zh_TW(traditional Chinese), ja_JP(Japanese).
Similarly to offer help of various dialects without composing java code in Liferay, we can utilize Locales this all through the entrance, portlet, snares, and topics. This section we can give into the same gateway ext.properties which Liferay entryway would peruse and give all the interpretation appropriately.
locales=en_US,zh_CN,zh_TW,ja_JP,ko_KR
On the off chance that we are keeping in touch with some custom messages in out code, at that point we have to give the beneath property records additionally according to the called language and utilizing of Locales would change over it appropriately. We can utilize LocaleUtil in our code which will change over the specific message given in language records.
For instance, we need the asset category title in multi dialects then we have to utilize this asset category.getTitle(locale). So here whatever district we have referenced before would be in real life and pick the given title name from certain area related language. property document.
Language_en_US.properties
Language_zh_CN.properties
Language_zh_TW.properties
Q. What Are The Advantages Of Using Tomcat Bundle Of Liferay Against Other App Servers (for example JBoss, Glassfish Or Others)?
It is conceivable to utilize Liferay
with Liferay IDE with other then tomcat server packages, however, there are a
few highlights or advantages that won’t be accessible:
- Local shroud server connector that supports propelling and troubleshooting.
- Organization by means of include/expel modules wizard would not be accessible.
- Auto redeployment dependent on changes to extend assets.
Q. Which One Is Best To Start In A Clean Setup?
Liferay pack with the tomcat
application server is the best one to begin in a spotless arrangement.
Q. How Do You Perform Junit Tests On Your Portlet?
Junit tests are there to check the code for the most part by giving the estimation of any technique input parameter, how the strategy would work and gives the qualities.
open class MyEmployeeTest {
ClassPathXmlApplicationContext setting = new ClassPathXmlApplicationContext(
“ApplicationContext-service.xml”);
open void testMyMethod() {
UserService employeeService = (UserService) context.getBean(“userService”);
/Provide the client Id as 101581
Client = storeService.findUserByUserId(1234);
/get the representative
Set representative = user.getEmployeesForUserId();
System.out.println(“Employee Name : “+employee.getName());
}
}
For more Click Here