liferay configuration and customization
TRANSCRIPT
![Page 1: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/1.jpg)
Liferay Configuration and Customization
April 10 2013Nguyen Trung Thanh
1DIRECTV Proprietary
![Page 2: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/2.jpg)
Agenda
IntroductionConfiguration OptionsCustomizing Liferay with pluginsDeployment of pluginsDemoQ & A
DIRECTV Proprietary 2
![Page 3: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/3.jpg)
Configuration OptionsCombination of setting
Stored in databaseStored in properties files.Stored in xml files
Liferay ‘s CustomizationOverride properties of its configuration files Plugin managementLiferay SOA
DIRECTV Proprietary 3
![Page 4: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/4.jpg)
Override configurationDefault configuration
portal.properties,system.propertiesOveridden configuration: portal-ext.properites, system-ext.propertiesLanguage_xxx.properties
Overridden configurationportal-ext.properties,
System-ext.properties Location
Main ( default ) configuration: resides inside the portal-impl.jar file. This .jar file is in Liferay Portal's WEB-INF/lib Extention (overridden) configuration:Liferay Portal's WEB-INF/classes
DIRECTV Proprietary 4
![Page 5: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/5.jpg)
Liferay Specific DescriptorsExtended Portlet Definition
Provides the ability to use Liferay specific features and the second one permits the configuration of the UI that will allow users to select the portlets.(liferay-portlet.xml )
Organizing Portlets in CategoriesThe interface provided to a user to select a portlet to be added to a page shows the portlets organized in categories to make it easier to find them ( liferay-display.xml )
LocationLocated in Liferay Portal's WEB-INF folder
DIRECTV Proprietary 5
![Page 6: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/6.jpg)
Liferay Specific DescriptorsCustomize Control Panel
Put portlets anywhere, whether or not a portlet shows up inside of the Control Panel epends on whether or not you've set the following nodes in your liferay-portlet.xml<portlet>
<portlet-name>125</portlet-name> …. <control-panel-entry-category>portal</control-panel-entry-category>
<control-panel-entry-weight>1.0</control-panel-entry-weight> <control-panel-entry-class>
com.liferay.portlet.enterpriseadmin.UsersControlPanelEntry </control-panel-entry-class> ... </portlet>
DIRECTV Proprietary 6
![Page 7: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/7.jpg)
Liferay Specific DescriptorsCustomize Control Panel
control-panel-entry-category: The 'category' where your portlet will appear. There are currently 4 valid values for this element: 'my', 'content', 'portal', and 'server'.control-panel-entry-weight: Determines the relative ordering for your portlet within a given category. The higher the number, the lower in the list your portlet will appear within that category.control-panel-entry-class: The name of a class that implements the ControlPanelEntry interface which determines who can see the portlet in the control panel via an isVisible method.
DIRECTV Proprietary 7
![Page 8: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/8.jpg)
Customizing Liferay with plugins
DIRECTV Proprietary 8
Liferay support 5 types of deployable plugins PortletThemesLayout templateHookWeb
All packaged as WAR packages with specific configuration files
![Page 9: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/9.jpg)
Deployment of plugins
Deploying Liferay plugins with Maven Quick introduction to MavenLiferay Maven supportCreate Maven Project for Liferay PortletHot Deploy porlet to LiferayDemo
DIRECTV Proprietary 9
![Page 10: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/10.jpg)
Quick introduction to Maven
Project management tool ( build, test, report ,assemble,release )Small core expandable with pluginsConvention over configurationDependency managementCommon lifecycle
DIRECTV Proprietary 10
![Page 11: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/11.jpg)
Liferay Maven support
Liferay ArchetypesGroupId: com.maven.liferay.archetyesArtifactId:
liferay-ext-archetypeliferay-hook-archetypeliferay-layouttpl-archetypeliferay-portlet-archetypeliferay-servicebuilder-archetypeliferay-theme-archetypeliferay-web-archetype
DIRECTV Proprietary 11
![Page 12: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/12.jpg)
Create Maven Project for Liferay Portlet
Two ways : Command lineIDE
Step by step :Create archetypeBuild and packageDeploy
DIRECTV Proprietary 12
![Page 13: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/13.jpg)
Create archetype for project
Command line Create root folder for project with pom files
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.liferay.sample</groupId><artifactId>sample-project</artifactId><version>1.0-SNAPSHOT</version><packaging>pom</packaging><name>sample-project</name><url>http://www.liferay.com</url><properties><liferay.auto.deploy.dir>C:/liferay-portal-6.1.1-ce-ga2/deploy</liferay.auto.deploy.dir><liferay.version>6.1.1</liferay.version></properties></project>
DIRECTV Proprietary 13
![Page 14: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/14.jpg)
Create archetype for project
Command lineAt root folder . Run : mvn generate:archetypeResult Console:
Choose archetype:1: local -> liferay-portlet-archetype (Liferay portlet archetype)2: local -> liferay-theme-archetype (Liferay theme archetype)3: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF)4: internal -> appfuse-basic-spring (AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC)...Choose a number: (1/2/3/4/...) :1
DIRECTV Proprietary 14
![Page 15: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/15.jpg)
Create Maven Project for Liferay Portlet
Type number to choose liferay-portlet-archetype
Then provide groupId, artifactId, package, version
DIRECTV Proprietary 15
![Page 16: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/16.jpg)
Create Maven Project for Liferay Portlet
IDE ( SpringToolSuite )
DIRECTV Proprietary 16
![Page 17: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/17.jpg)
Create Maven Project for Liferay Portlet
DIRECTV Proprietary 17
![Page 18: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/18.jpg)
Create Maven Project for Liferay Portlet
DIRECTV Proprietary 18
![Page 19: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/19.jpg)
Create Maven Project for Liferay Portlet
DIRECTV Proprietary 19
![Page 20: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/20.jpg)
Create Maven Project for Liferay Portlet
DIRECTV Proprietary 20
![Page 21: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/21.jpg)
Create Maven Project for Liferay Portlet
DIRECTV Proprietary 21
![Page 22: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/22.jpg)
Build and pakage
Go to project directory Run “mvn package”. War file is created at C:\workspace-liferay\sample-portlet\target\sample-portlet-0.0.1-SNAPSHOT.war.
DIRECTV Proprietary 22
![Page 23: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/23.jpg)
Deployment
Command lineGo to project directory Run “mvn liferay:deploy”. War file is created at C:\workspace-liferay\sample-portlet\target\sample-portlet-0.0.1-SNAPSHOT.war.
DIRECTV Proprietary 23
![Page 24: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/24.jpg)
Create Maven Project for Liferay Portlet
Command line : Go to project directory Run “mvn liferay:deploy”. porlet is hot deployed on Liferay portal
DIRECTV Proprietary 24
![Page 25: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/25.jpg)
Create Maven Project for Liferay Portlet
IDE :Start up tomcat bundled with Liferay and login in as admin. Click on ‘Add’ then ‘More…’ then ‘Install More Applications’.
DIRECTV Proprietary 25
![Page 26: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/26.jpg)
Create Maven Project for Liferay Portlet
IDE :
DIRECTV Proprietary 26
![Page 27: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/27.jpg)
Integrate porlet to portal
DEMO
DIRECTV Proprietary 27
![Page 28: Liferay Configuration and Customization](https://reader036.vdocuments.net/reader036/viewer/2022062503/587fdc1f1a28ab58248b68cd/html5/thumbnails/28.jpg)
Q & A
Any Questions?
DIRECTV Proprietary 28