About portals
About the eXo platform
Technical question
The first goal of the RI is to be the basic implementation of the specifications. Pluto has been implemented in that goal and is not ready or even intended for production.
Some companies have realized that fact and are bundling the eXo portlet container with their portal to offer a powerfull JSR 168 portlet container to their customers.
The eXo platform is clearly leading the innovation in the Open Source portal space.
UIPortal --> customized renderer UIPortlet(header portlet) --> customized renderer UIPage --> customized renderer UIMainColumn --> customized renderer UITab --> customized renderer UIRow --> customized renderer UIColumn --> customized renderer UIPortlet --> customized renderer UIPortlet --> customized renderer UIPortlet --> customized renderer ...... UIPage --> customized renderer ..... UIPortlet(footer portlet) --> customized renderer
Therefore, it is possible to access JSR 168 compliant portlets from a non Java portal through the WSRP channel.
important: by default the tomcat.server.dir , jetty.server.dir, jboss.server.dir
are sibbling to your exoplatform directory. If you don't change those properties in
global.properties file, you need to have the exo-tomcat, exo-jetty, exo-jboss in the
parent directory of your exoplatform.
important: If you do not copy the build.properties file in exo-build to your
user home directory. You will not be able to run the maven task in sub module.
Tip: To avoid rebuild the whole platform when you make a small change to a portlet
or a service. There are many task that allow you to deploy the modified module to
the server location:
* exo-tomcat:deploy-war, exo-jetty:deploy-war: this task compile and copy the portlet
application to the webapps directory
* exo-tomcat:deploy-service, exo-jetty:deploy-service: this task compile and copy
the service jar file to the service deploy dir common/lib for tomcat and ext/ dir
for jetty
* exo-tomcat:deploy-lib and exo-jetty:deploy-lib: this copy the jar file to common/lib
directory of tomcat and ext/ directory of jetty
* exo-tomcat:deploy-portal-lib and exo-jetty:deploy-portal-lib: this copy the jar file to
shared/lib directory of tomcat and ext/ directory of jetty
exoplatform/ exo-commons/ exo-services-container/ exo-services/ exo-base-services/(cache, log, threadpool, database services) api impl exo-portlet-container-service/ api impl wsrp-service/ api/ impl/ portal-service/ api impl .................. .................. exo-portal/ exo-web/ exo-portlet-framework/ exo-framework jsf-framework velocity-framework struts-framework exo-portlets/ core/ user/ content/ ...... ...... sample/ hello-world/ sun-samples/ velocity-eaxmples ................ third-party exo-server/
public class CacheService { public CacheService() { } } public class DatabaseService { CacheService cacheService_ ; public DatabaseService(CacheService cService) { cacheService_ = sService ; } }
All the exo services are deployed when the method ServicesManager.getInstance() is called for the first time. Usually it is called in PortalContextListener class and this class is called when you deploy the portal.war package.
When ServicesManager singleton initialize, it call method ClassLoader.getResources("exo/services/exo-service.xml"). This method will return all the xml file in in service impl jar file. The service manager read all the xml file and add the service to the picocontainer. For more information , please read our exo acticle 2
In each portlet application, you have this configuration in web.xml
<listener> <listener-class> exo.services.portletcontainer.impl.servlet.PortletApplicationListener </listener-class> </listener>
When a war in deployed into webapps dir , The web server will call the listener that you configure in web.xml. In our case the method in PortletApplicationListener.contextInitialized(..) will be called and we call ServicesManager.getInstance() , get the portlet container and register the i portlets that configure in porlet.xml file
When you remove the war file from webapps directory , the method PortletApplicationListner.contextDestroyed(..) is called and we remove the portlets in PortletContainerService.
We currently support en, fr, vn, no, sk locales. To configure the properties file you need to create an properties file in exo/WEB-INF/classes and specify the location of the properties file in pages.xml. You can hand code for the default user-pages.xml or change it later by the portlet customizer
<personal-pages> <resource-name>locale.users.community</resource-name> [...] </personal-pages> <group-pages> <resource-name>locale.users.community</resource-name> [...] </group-pages> And for the page , tab , portlet title you can use <page default="true"> <title>${home}</title> [...] <tab default="true"> <title>${welcome}</title> [...] <portlet> <title>${news}</title> [...] </portlet> </tab> </page>
You also need to translate all the properties files of each portlet. You can find those properties file in /WEB-INF/classes of each portlet application.
The banner and footer is the portlets themself. and user cannot remove or add it. Only admin can configure it before he start the server. to replace the banner or footer portlet, write a new portlet by your self and edit the portlet.xml file in web portlet application. Replcace the old one with your banner and footer portlet. By default , exo provide the banner and footer portlet that read a html fragment in /web/banner/community.html and /web/footer/community.html
You can let user change the banner and footer by written a customizable banner and footer portlet and let user configure the look and feel in the edit mode
Exo Portal use heavily css stylesheet to customize the look and feel of a portlet. To understand how it work you need to understand how the css matching rule work. Please refer to CSS-2 document for more detail.
Consider the following portlet block
-------------------------------------------------- | | | portlet title | -------------------------------------------------- | | | | | portlet content | | | | | |------------------------------------------------|
If you look at the html src code you will see some thing like
<table class="default-portlet"> <tr> <td class="portlet-title">Portlet title</td> </tr> <tr> <td class="portlet-content">Portlet Content</td> </tr> </table>
and default-portlet.css
.default-portlet { } .default-portlet .portlet-title { color: black ; } .default-portlet .portlet-content { color: black ; }
So You can see that any block with portlet-title and portlet-content class and has block default-portlet as parent will have the black color for the text. To change look and feel of the portlet block, you need to change the class of the table tag to
<table class="customized-portlet"> [...] </table>
and create the customized-portlet.css
.customized-portlet { } .customized-portlet .portlet-title { color: blue ; } .customized-portlet .portlet-content { color: blue ; }
So the text of the portlet-title and portlet-content block will change to the blue color without the need of changing the class name for the portlet-title and portlet-content block.
With exo platform , you can customized the the class name of a portlet block in pages.xml of each user and the user later user can use the portlet customizer to change the style of each portlet block.
The renderer is a class that convert the internal representation of UIComponent to the html presentation or wrml presentation. For example: You have UIPortlet component that hold the information of a portlet
class UIPortlet { String style_ ; String portletTitle_ String portletContent_ ; }
You need to a portlet renderer to convert the UIPortlet component to
Portlet title Portlet Content
a. Create a class which implements the exo.services.organization.OrganizationService b. create an ex-service.xml that configure to use your OrganizationServiceImpl c. package the your implementation as organization.jar/ exo/services/exo-service.xml my.compnay.organization.impl.* d. Replace exo organization implementation file by your organization implementation file