CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-com-liferay-portal--com-liferay-portal-impl

Core implementation module containing the fundamental services, utilities, and infrastructure components for the Liferay Digital Experience Platform.

Pending
Overview
Eval results
Files

framework-integration.mddocs/

Framework Integration

Spring Framework configuration, development tools, plugin management, and hot deployment capabilities providing comprehensive integration support for the Liferay portal framework.

Capabilities

Spring Framework Integration

Comprehensive Spring Framework integration providing dependency injection, configuration management, and lifecycle coordination.

/**
 * Spring configurator for portal integration
 */
public class SpringConfigurator {
    
    /**
     * Configures Spring application context for portal
     * @param servletContext servlet context
     * @return configured ApplicationContext
     */
    public ApplicationContext configureApplicationContext(ServletContext servletContext);
    
    /**
     * Registers portal beans in Spring context
     * @param applicationContext Spring application context
     */
    public void registerPortalBeans(ApplicationContext applicationContext);
    
    /**
     * Sets up Spring profiles for different environments
     * @param profiles active Spring profiles
     */
    public void setActiveProfiles(String... profiles);
}

Development Tools

Development and build tools for portal customization and extension development.

/**
 * Development utilities for portal development
 */
public class DevelopmentUtil {
    
    /**
     * Enables development mode features
     * @param enabled true to enable development mode
     */
    public static void setDevelopmentMode(boolean enabled);
    
    /**
     * Generates portal extension scaffolding
     * @param extensionName name of extension to create
     * @param extensionType type of extension (portlet, theme, hook)
     * @return generated extension structure
     */
    public static ExtensionStructure generateExtension(String extensionName, String extensionType);
    
    /**
     * Validates portal configuration
     * @return list of configuration issues found
     */
    public static List<ConfigurationIssue> validateConfiguration();
}

Hot Deployment

Hot deployment functionality enabling runtime plugin deployment and updates without server restart.

/**
 * Hot deploy manager for plugin deployment
 */
public class HotDeployManager {
    
    /**
     * Deploys plugin from file
     * @param pluginFile plugin WAR file
     * @throws DeploymentException if deployment fails
     */
    public void deployPlugin(File pluginFile) throws DeploymentException;
    
    /**
     * Undeploys plugin by name
     * @param pluginName plugin name to undeploy
     * @throws DeploymentException if undeployment fails
     */
    public void undeployPlugin(String pluginName) throws DeploymentException;
    
    /**
     * Lists deployed plugins
     * @return Set of deployed plugin names
     */
    public Set<String> getDeployedPlugins();
    
    /**
     * Checks if plugin is deployed
     * @param pluginName plugin name to check
     * @return true if plugin is deployed
     */
    public boolean isPluginDeployed(String pluginName);
}

/**
 * Hot deploy event listener for plugin lifecycle events
 */
public interface HotDeployListener {
    
    /**
     * Called before plugin deployment
     * @param event hot deploy event
     */
    void invokeDeploy(HotDeployEvent event);
    
    /**
     * Called before plugin undeployment
     * @param event hot deploy event
     */
    void invokeUndeploy(HotDeployEvent event);
}

Plugin Management

Comprehensive plugin management system for portal extensions and customizations.

/**
 * Plugin manager for managing portal plugins
 */
public class PluginManager {
    
    /**
     * Installs plugin from repository
     * @param pluginName plugin name to install
     * @param version plugin version
     * @throws PluginException if installation fails
     */
    public void installPlugin(String pluginName, String version) throws PluginException;
    
    /**
     * Updates plugin to newer version
     * @param pluginName plugin name to update
     * @param newVersion new plugin version
     * @throws PluginException if update fails
     */
    public void updatePlugin(String pluginName, String newVersion) throws PluginException;
    
    /**
     * Uninstalls plugin
     * @param pluginName plugin name to uninstall
     * @throws PluginException if uninstallation fails
     */
    public void uninstallPlugin(String pluginName) throws PluginException;
    
    /**
     * Gets plugin information
     * @param pluginName plugin name
     * @return PluginInfo object or null if not found
     */
    public PluginInfo getPluginInfo(String pluginName);
    
    /**
     * Lists available plugins in repository
     * @return List of available plugins
     */
    public List<PluginInfo> getAvailablePlugins();
}

/**
 * Plugin information container
 */
public class PluginInfo {
    
    /**
     * Gets plugin name
     * @return plugin name
     */
    public String getName();
    
    /**
     * Gets plugin version
     * @return plugin version
     */
    public String getVersion();
    
    /**
     * Gets plugin description
     * @return plugin description
     */
    public String getDescription();
    
    /**
     * Gets plugin dependencies
     * @return List of plugin dependencies
     */
    public List<String> getDependencies();
    
    /**
     * Checks if plugin is installed
     * @return true if plugin is installed
     */
    public boolean isInstalled();
}

Usage Examples

Spring Configuration:

// Configure Spring application context
SpringConfigurator configurator = new SpringConfigurator();
ApplicationContext context = configurator.configureApplicationContext(servletContext);

// Register custom beans
configurator.registerPortalBeans(context);

// Set development profile
configurator.setActiveProfiles("development");

Hot Deployment:

// Deploy plugin
HotDeployManager manager = new HotDeployManager();
File pluginFile = new File("/path/to/plugin.war");
manager.deployPlugin(pluginFile);

// Check deployment status
boolean isDeployed = manager.isPluginDeployed("my-plugin");

// Custom deployment listener
public class CustomHotDeployListener implements HotDeployListener {
    @Override
    public void invokeDeploy(HotDeployEvent event) {
        System.out.println("Deploying: " + event.getPluginName());
    }
    
    @Override
    public void invokeUndeploy(HotDeployEvent event) {
        System.out.println("Undeploying: " + event.getPluginName());
    }
}

Plugin Management:

// Install plugin
PluginManager manager = new PluginManager();
manager.installPlugin("sample-portlet", "1.0.0");

// Get plugin information
PluginInfo info = manager.getPluginInfo("sample-portlet");
System.out.println("Version: " + info.getVersion());
System.out.println("Description: " + info.getDescription());

// List available plugins
List<PluginInfo> available = manager.getAvailablePlugins();
for (PluginInfo plugin : available) {
    System.out.println(plugin.getName() + " - " + plugin.getVersion());
}

Integration with Portal Framework

Framework integration provides:

  • Dependency Injection - Spring-based bean management
  • Configuration Management - Centralized configuration system
  • Plugin Architecture - Extensible plugin system
  • Development Support - Tools for portal development
  • Runtime Deployment - Hot deployment capabilities
  • Extension Points - Hooks for customization

Error Handling

Framework integration exceptions:

  • DeploymentException - Plugin deployment failures
  • PluginException - Plugin management errors
  • ConfigurationException - Configuration issues
  • HotDeployException - Hot deployment problems
  • SpringException - Spring framework errors

Best practices include comprehensive error logging, graceful fallback procedures, proper resource cleanup, and validation of plugin compatibility before deployment.

Install with Tessl CLI

npx tessl i tessl/maven-com-liferay-portal--com-liferay-portal-impl

docs

bean-management.md

database-orm.md

database-upgrades.md

framework-integration.md

index.md

lifecycle-events.md

portlet-framework.md

service-layer.md

template-processing.md

utility-services.md

web-security.md

tile.json