Core implementation module containing the fundamental services, utilities, and infrastructure components for the Liferay Digital Experience Platform.
npx @tessl/cli install tessl/maven-com-liferay-portal--com-liferay-portal-impl@113.1.0Core implementation module containing the fundamental services, utilities, and infrastructure components for the Liferay Digital Experience Platform. This module provides essential backend functionality including user management, authentication, authorization, database access layers, service implementations, and integration points for the broader Liferay ecosystem.
For dependency injection and bean access:
import com.liferay.portal.bean.BeanLocatorImpl;
import com.liferay.portal.bean.BeanPropertiesImpl;
import java.util.Map;For database and Hibernate integration:
import com.liferay.portal.dao.orm.hibernate.SessionFactoryImpl;
import com.liferay.portal.dao.orm.hibernate.SessionImpl;
import com.liferay.portal.dao.orm.hibernate.DynamicQueryFactoryImpl;For lifecycle and event handling:
import com.liferay.portal.events.GlobalStartupAction;
import com.liferay.portal.events.LoginPreAction;
import com.liferay.portal.events.ServicePreAction;// Bean location and property access
BeanLocatorImpl beanLocator = new BeanLocatorImpl();
Object bean = beanLocator.locate("myBeanName");
BeanPropertiesImpl beanProps = new BeanPropertiesImpl();
String value = beanProps.getString(bean, "propertyName");
// Database operations using Hibernate integration
SessionFactoryImpl sessionFactory = new SessionFactoryImpl();
SessionImpl session = (SessionImpl) sessionFactory.openSession();
DynamicQueryFactoryImpl queryFactory = new DynamicQueryFactoryImpl();
DynamicQueryImpl query = (DynamicQueryImpl) queryFactory.forClass(MyEntity.class);
// Template processing with FreeMarker
// Template engine integration for dynamic content generation
// Service layer operations
// Access to portal services through standardized interfacesThe Liferay portal-impl module is structured around several key architectural patterns:
Spring-based dependency injection system providing bean location, property access, and Velocity template integration for the portal framework.
public class BeanLocatorImpl implements BeanLocator {
public Object locate(String name) throws BeanLocatorException;
public <T> Map<String, T> locate(Class<T> clazz) throws BeanLocatorException;
public String[] getNames();
public Class<?> getType(String name);
public ClassLoader getClassLoader();
public ApplicationContext getApplicationContext();
public void destroy();
}
public class BeanPropertiesImpl implements BeanProperties {
// Property getters with default values
public boolean getBoolean(Object bean, String param);
public boolean getBoolean(Object bean, String param, boolean defaultValue);
public String getString(Object bean, String param);
public String getString(Object bean, String param, String defaultValue);
public int getInteger(Object bean, String param);
public int getInteger(Object bean, String param, int defaultValue);
public long getLong(Object bean, String param);
public double getDouble(Object bean, String param);
public float getFloat(Object bean, String param);
public Object getObject(Object bean, String param);
// Silent variants (no logging on errors)
public boolean getBooleanSilent(Object bean, String param);
public String getStringSilent(Object bean, String param);
public int getIntegerSilent(Object bean, String param);
// ... more silent variants
// Property manipulation
public void copyProperties(Object source, Object target);
public <T> T deepCopyProperties(Object source) throws Exception;
public void setProperty(Object bean, String param, Object value);
public void setPropertySilent(Object bean, String param, Object value);
public void setProperties(Object bean, HttpServletRequest request);
}Comprehensive Hibernate ORM integration with custom types, property accessors, database dialects, and dynamic query building capabilities.
public class SessionFactoryImpl implements SessionFactory {
public Session openSession();
public Session getCurrentSession();
}
public class DynamicQueryFactoryImpl implements DynamicQueryFactory {
public DynamicQuery forClass(Class<?> clazz);
public DynamicQuery forClass(Class<?> clazz, ClassLoader classLoader);
}
public interface DynamicQuery {
public DynamicQuery add(Criterion criterion);
public DynamicQuery addOrder(Order order);
public List<Object> list();
}Event-driven system handling portal startup, shutdown, authentication, session management, and service request processing.
public class GlobalStartupAction extends Action {
public void run(HttpServletRequest request, HttpServletResponse response);
}
public class LoginPreAction extends Action {
public void run(HttpServletRequest request, HttpServletResponse response);
}
public class SessionCreateAction extends SessionAction {
public void run(HttpSession session);
}Core portal services providing business logic implementations, HTTP endpoints, and permission checking capabilities.
// Service implementations for portal entities
// HTTP-specific service endpoints and utilities
// Permission checking implementations for securityServlet implementations, request filters, authentication verification, and security utilities for web request processing.
// Core servlet implementations and utilities
// Request processing filters
// Authentication verification filters
// Security-related language and utility classesTemplate engine integrations including FreeMarker support and generic template processing utilities for dynamic content generation.
// FreeMarker template engine integration
// Generic template processing utilitiesCore utilities including formatting, minification, file operations, XML processing, and portal-specific utility implementations.
// Configuration management, file operations, localization
// Text and content formatting utilities
// CSS and JavaScript minification
// File upload processing
// XML processing and manipulationComplete portlet framework implementation including containers, request/response handling, asset management, and document library functionality.
// Core portlet framework implementations
// Asset framework implementations
// Document Library portlet implementations
// Expando (custom fields) implementationsVersion-specific database migration utilities supporting upgrades between Liferay 7.x versions with schema transformation capabilities.
// Utilities for database schema upgrades
// Version-specific upgrade implementationsSpring Framework configuration, development tools, plugin management, and hot deployment capabilities.
// Spring Framework integration and configuration
// Development and build tools
// Hot deployment functionality for plugins
// Plugin management and deployment utilitiesThe portal-impl module provides comprehensive database support through custom Hibernate dialects:
The exported API provides extensive integration capabilities for:
The portal-impl module handles various types of exceptions and errors:
Common error handling patterns include comprehensive logging, exception transformation, and graceful degradation for non-critical failures.