Liferay DXP Interview Questions


Question

What is Display context 
Answer - A Display Context is a Java class that controls access to a portlet screen's UI elements .
 
Reference 


Question

What is Service context

Answer - In Liferay DXP, the ServiceContext is an object that provides information about the environment in which a service is being called. It can be used to pass information to the service about the current user, the locale, the timezone, and other contextual information. This information can be used by the service to tailor its behavior to the current context.

For example, a service that creates a new asset in the portal might use the ServiceContext to set the asset's creator and create date based on the current user and the current time, as well as to associate the asset with a particular group or site based on the current context.

The ServiceContext is often passed as an argument to service methods when they are called, and it is typically created using the ServiceContextFactory, which is a utility class that provides a convenient way to create ServiceContext objects with the appropriate values for the current context.



The ServiceContext class holds contextual information for a service. It aggregates information necessary for features used throughout Liferay’s portlets, such as permissions, tagging, categorization, and more.



Question

What is Service Trackers  (is a way for Calling an OSGI from a Non Component Or Non OSGI)
Answer - If you’re able to use DS and leverage the @Component and @Reference annotations, you should. DS handles much of the complexity of handling service dynamism for you transparently.
If you can’t use DS to create a Component, keep reading to learn how to implement a Service Tracker to look up services in the service registry.What scenarios might require using a service tracker? Keep in mind we’re focusing on scenarios where DS can’t be used. This typically involves a non-native (to OSGi) Dependency Injection framework.
Calling OSGi services from a Spring MVC portlet
Calling OSGi services from a JSF portlet
Calling OSGi services from a WAR-packaged portlet that’s been upgraded to run on Liferay DXP 7.0, but not fully modularized and made into an OSGi moduleR


Question

How is unicast multicast implemented in Liferay for Caching ? 
https://help.liferay.com/hc/en-us/articles/360017847231-Managing-Distributed-Cache-in-Liferay-DXP

Question

  • how to workflow implementing steps ? 
TODO

Question

  • What exactly annotations component and references do ?

Answer 
Reference

  • Steps to do clustering . (https://help.liferay.com/hc/en-us/articles/360018175191-Liferay-DXP-Clustering)
  1. All nodes should be pointing to the same Liferay DXP database or database cluster.

  2. Documents and Media repositories must have the same configuration and be accessible to all nodes of the cluster.

  3. Search should be on a separate search server that is optionally clustered.

  4. Cluster Link must be enabled so the cache replicates across all nodes of the cluster.

  5. Hot deploy applications to each node individually.


  • What is Code less OR Theme-less approach in LR.

https://liferay.dev/blogs/-/blogs/-code-less-site-building

  • How to create configurations in Liferay DXP ?
Answer - In portlet  extends DefaultConfigurationAction  & in System level u create via extending ConfigurationBeanDeclaration

  • https://help.liferay.com/hc/en-us/articles/360029316311-Resolving-Bundle-Requirements



Question

workflow code in liferay - 

https://www.anblicks.com/blog/how-to-apply-custom-entities-workflow-in-liferay-dxp/



Question

how to refer a non osgi like war in ur code

NOT SURE BUT MAY BE BY ADDING DEPENDENCIES

Question

Very Important --- https://liferay.dev/blogs/-/blogs/liferay-osgi-annotations-what-they-are-and-when-to-use-them


Question

If u want portlet in left panel (Control Panel)  -

 This class must extend the BasePanelApp Class and declare it as a service using

 service = PanelApp.class. (https://ignek.com/blog/add-custom-portlet-into-control-panel-in-liferay-7-2)


Question

Most challenging things you have faced in Liferay

Question 

Most enjoying thing you faced in Liferay

Question 

Data upgrade for module - https://help.liferay.com/hc/es/articles/360018162851-Creating-Data-Upgrade-Processes-for-Modules

Some changes you make to a module involve modifying the database. These changes bring with them the need for an upgrade process to move your module’s database from one version to the next. Liferay has an upgrade framework you can use to make this easier to do.


Liferay DXP’s upgrade framework executes your module’s upgrades automatically when the new version starts for the first time. You implement concrete data schema changes in upgrade step classes and then register them with the upgrade framework using an upgrade step registrator. 

public class UpgradeSchema extends UpgradeProcess {

------------------------

URL Pattern in Liferay

  • p_p_id
  • p_p_col_id – page column id
  • p_p_col_count
  • p_p_lifecycle –  0 -> render, 1->action, 2->resource
  • p_p_state – window state (ex normal)
  • p_p_mode – edit, view, help,print, preview,config,edit guest, edit defaults

-------------------

Headless Architecture

Liferay's headless APIs allow RESTful interaction with Liferay DXP resources .
Backend resources are not tightly coupled with Frontend.
Backend apis are machine readable and uses Open API
Any frontend tech like react etc can be used
We can leverage this across channels.
Example - you want to show the same Blog etc from Liferay in multiple channels so when u use Liferay Headless api you dont need to keep changing all the channels and UIs


---------

Liferay Extension points using Blade sample projects
https://github.com/liferay/liferay-blade-samples

Keywords - REST


Comments

Popular posts from this blog

Azure App Service for Liferay DXP Installations

What Azure Infrastructure is better for Liferay DXP