The first part of the Liferay Portal Framework Analysis ... 6
Chapter Liferay Portal. 6
Section 6 Portal specifications ...
1.1.1 JSR168. 6
1.1.2 WSRP. 6
What is Portal7 II
1.2.1 Portal Server ... 7
1.2.2 Portlet Container ... 7
What is Portlet8 III
1.3.2 Portlet and Servlet relationship ... 8
1.3.3 Portlet life cycle ... 9
IV Liferay Portal works ... 9
1.4.1 Portlet style and window state ... 10
1.4.2 Portal Page ... 11
Liferay Portal's use of Chapter 13 ...
Section Liferay Portal Installation ... 13
Liferay Portal user strategy II ... 14
2.2.1 User defined ... 14
2.2.2 Add Users ... 15
2.2.3 modify the user ... 15
2.2.4 the definition of user groups ... 18
2.2.5 add, rename, user group ... 19
2.2.6 modify the user group ... 19
2.2.7 define the role ... 21
2.2.8 add, rename, role ... 21
2.2.9 modify the role of user groups ... 21
2.2.10 Portlet definition of the role of ... 22
Liferay Portal content and layout of the third quarter ... 24
2.3.1 What is the layout ... 24
2.3.2 What is the content ... 26
2.3.3 Portlet layout and content of the relationship between ... 27
2.3.4 Select the content and layout ... 28
Liferay Portal IV desktop ... 28
2.4.1 What is the Desktop ... 28
2.4.2 Definition personalized desktop ... 29
Liferay Portal V quality ... 29
2.5.1 What is quality ... 30
2.5.2 quality and Portlet, Portal's relationship ... 30
2.5.3 Definition of quality personalized ... 30
Section VI Liferay Portal deployment descriptor ... 31
2.6.7 liferay-look-and-feel. xml35
The second part of the Liferay Portal Second Development ... 36
Chapter III to develop their own Portlet. 36
Section important base class: GenericPortlet36
Section Portlet tag ... 37
3.2.1 defineObjects 37 tags ...
3.2.2 renderURL 37 tags ...
3.2.3 actionURL 38 tags ...
3.2.4 param tag ... 38
3.2.5 namespace tag ... 38
Section 38 Portal objects ...
3.3.1 Request Object ... 39
3.3.2 Response object ... 41
3.3.3 PortletConfig object ... 41
3.3.4 Session objects ... 41
3.3.5 Preference objects ... 43
Portlet class IV to write your own ... 44
3.4.1 Development Environment ... 44
3.4.2 preparations ... 44
Section V Web deployment descriptor changes ... 48
Section VI Liferay Portal deployment descriptor to create ... 49
The third part of the Liferay Portal deployment ... 54
Chapter deploy their own Portlet. 54
Section 54 Manual deployment ...
Ant II automatic deployment ... 55
Section III joined the Liferay Portal's own list ... 55
Section IV General Java Web application into a Portlet Application ... 56
Part IV Appendix ... 58
Chapter 58 related resources ...
Section 58 Resource Site ...
Section 58 of the sample ...
Chapter 59 References ...
The first part of the Liferay Portal Framework Analysis
This part of the main content
Portal Server Portal Portlet Container
Chapter Liferay Portal
Portal as an open source product, Liferay Portal provides the contents of multiple independent systems integration, to help various organizations to achieve more effective cooperation. Portal products to other businesses than, Liferay Portal has a number of good features, but do not pay.
Section Portal Specification
With the rise of Portal, a growing number of companies are involved in product development, Portal and the Portal components and set up their own based on its products, such as IBM, BEA, MicroSoft, SAP, Apache, etc.. Various manufacturers are not compatible interface to software developers and developers inconvenience.
To this end, JCP group released JSR168 (Java Specification Request), Portlet Specification V1.0, used to provide different between Portal and Portlet interoperability. As long as follow the development of Portlet JSR168, you can all follow to deploy JSR168's Portal to run.
Portal JSR168 implementation defined specifications and interfaces, and the ideal Portlet carried out a detailed plan and description.
WSRP is the OASIS Web Service for Remote Portlet initials. WSRP is a Web Service of a new business application, a new standard, mainly used to simplify the Portal for the integration of resources or the complexity of procedures, to avoid programming brought about the integration problems and issues. And Portal administrators can select the mass of WSRP services need to integrate the functions of the Portal in the currently used. It has three roles:
①, producers provide Portlet à
②, consumers use the Portlet à
③, the end-user end-user à
It features the producer is the consumer needs information through WSRP returned to the consumer, the information is relatively tag fragments, such as HTML, XHTML, etc., can be embedded directly the user's page, without resorting to develop a client Web Service Yiyang interfaces.
Achieve this standard, Portal can deal with a variety of data sources, a complete end to the dilemma of information island.
II What is the Portal
Portal is a Web-based order "application integration" and "to eliminate islands of information" as the ultimate goal, to provide single sign-on, content aggregation, personalization features such as portal customized integrated information system.
Usually complete by the Portal Server Portal, Portlet Container, Portlet form.
1.2.1 Portal Server
Portal Server is up Portlet container Portlet rendering support to the general or special Web server. Portal servers typically provide personalization, single sign-on, content aggregation, information dissemination, rights management and other functions, supports a variety of information sources of data and data on the pages of these combinations, to provide personalized content tailored different permissions visitors can browse the contents of different information. Usually, Portal provides the following features:
Single Sign: Portal usually Caiyong ACL, SSL, LDAP and other industry-standard security technology, provides access to all existing application security Ji Cheng, only the single entry in the Portal Shangdeng Lu once and can access all applications and data . For higher security requirements of applications such as e-commerce platforms, trading systems, by extending the interface to pass user identity information, such as digital certificate, digital signature information, the secondary authentication, to ensure the safety of single-point landing .
Access Control: System, LDAP right resources, a unified user management interface to provide secondary development, with other application systems user management module docking, and can Sui Xiang Guan business Xitongshishi update the access permissions. Through the improvement of the licensing mechanism and access control, user access control to field level to ensure that users can only access the applications with permissions and related information.
Content Management: Implementing real-time exchange of information between applications. Using a variety of caching mechanisms to guarantee the performance and accuracy of the content of the exchange. XML-based Rich Site Summary (RSS) standards, and rapidly spread among the various applications the latest changes.
News: Implementing a dynamic information portal content maintenance. Dynamic Website System collaboration with OA office systems, knowledge management systems integration, Web site information is subject to the approval process for transfer of OA system, or after the adoption of knowledge management platform settings with external share permissions Caike officially released, realize simultaneous internal and external information distribution .
Document Management: System for seamless integration of multiple data sources, including: databases, documents (Office documents, PDF, AutoCAD, and even ZIP document), Web pages, FTP sites, etc., and to data by business requirements and analyze the characteristics of finishing functions , take the initiative to push through a unified Web interface (Push) to the user's portal desktop to help users make timely and correct decisions.
1.2.2 Portlet Container
Portlet Portlet container provides the execution environment, including many Portlet and manage their life cycle, preservation Portlet customized information.
A Portal Portal container receives a request from then passes the request to the existence of this Portal Portlet container implementation. Portlet container Portlet no obligation to portfolio generated content, this work must be handled by the Portal. Portal and Portal Container can be put together as a single system component, or separate into two independent components.
Portlet container is an extension of ordinary Web Servlet container, so a Portlet container can be built on an existing Servlet container or may be all the Web Servlet container to achieve full functionality. Portlet containers regardless of how achieved, its operating environment is always assumed that it supports Servlet2.3 specification.
Usually, Portlet Container Servlet container extended from the ordinary.
III What is the Portlet
Portal Portlet is the most important component, is responsible for the content of the Portal in the present information, there is a corresponding life cycle. Through custom Portlet, users can easily define personalized Portal page. Managed by the Portlet container Portlet, processing the request and returns the dynamic page that can be plug and play as the Portal of the interface components.
A Portlet is a Java technology for technology's Web component, managed by the Portlet container, specializing in customer information request and produce a variety of dynamic content. Portlet for the Pluggable client interface components to provide a presentation layer of information systems.
The content generated by the Portlet is called segment, while the fragment is marked with a number of rules (HTML, XHTML, WML), and other fragments can be composed of a complex document. One or more of the Portlet's content aggregation to become a Portal page. The Portlet Portlet life cycle are managed by the container control.
Interaction between the client and by the Portal Portlet The typical request/response be achieved, the normal term, for the customers and the Portlet Chansheng the Neironghudong, example, according to the next step of the connection or is Queren send the form, the results Portal Portlet action will be received, the status of turning this into the target Portlet. The Portlet generate the content for different users may have different changes, in full accordance with customer for the Portlet settings.
1.3.2 Portlet and Servlet relationship
Portlet is defined as a new component, with a new interface and behavior clear. In order to integrate as much as possible with the existing Servlet to re-use purposes, Portlet specification use of the Servlet specification, many concepts are similar, combined with Portlet, Servlet and Jsp system at the same site, we called the Portlet Application. Portlet applications in the same, they will share the same class loader (ClassLoader), context (Context) and the Session.
① , Portlet and Servlet similarities
@ Portlet components are Java technology web
@ Portlet is a specific container in the management
@ Portlet can dynamically generate a variety of content
@ Portlet lifecycle managed by the container
@ Portlet and client interaction is through the request / response mechanism
② , Portlet and Servlet are also some different
@ Portlet markup information generated only fragments, not full page document. The Portal will be all the Portlet markup fragments into a comprehensive information Portal website.
@ Portlet will not directly related to URL
@ Client must be through the portal system and Portlet Interaction
@ Portlet some defined request processing, action request and the render request.
@ Portlet Portlet modes and window defined default state can be pointed out that the page on which the Portlet functionality is being implemented and the current state.
@ Portlet can be in the same portal into multiple pages.
③ , Portlet some additional features are not available Servlet
@ Portlet can access and permanent storage of configuration files and custom information.
@ Portlet can access user data
@ Portlet with the URL rewrite functions in the file to dynamically create links that allow portal server do not have to know how to create links among Web pages and fragments of action.
@ Portlet can store temporary data in the Portlet session being, with two different areas:
application-wide scope and Portlet private scope.
④ , Portlet does not have some features, but there is provision of Servlet
@ Servlet has set the output encoding (character set encoding) mode
@ Servlet can set the HTTP header output
@ Servlet able to receive customer requests for the portal URL given
1.3.3 Portlet life cycle
A Portlet has a good life-cycle management, defines how to load, instantiate and initialize, and how to respond to a request from the client and how to send services. The Portlet Life Cycle from the Portlet interface init, processAction, render and destroy means to express.
Loading and instantiation: Portlet Container is responsible for loading and instantiating Portlet. Portlet when the Portlet Container running applications or delay to the needs of service users Portlet request, Portlet will be loaded and instantiated. After loading class Portlet, Portlet class to be instantiated immediately.
Initialization: Portlet class is instantiated, Portlet Container also need to initialize Portlet. To invoke the Portlet to respond to client requests. Portlet container calls the init method of Portlet interface initialization Portlet. The class can be extended out from the PortletConfig defined in the deployment descriptor file in the initialization parameters, and Resource Bundle.
Initialization exception: During initialization the Portlet, Portlet may throw PortletException UnavailableException or abnormal. At this point, Portlet Container Portlet can not be activated into service, and required the release of the Portlet container Portlet. destory method can not be called because the initialization is considered to fail. After the failure occurred, Portlet container will try to re-instantiate and initialize Portlet. The exception handling rules: from a UnavailableException specify a minimum time can not be executed when this exception occurs, Portlet Container Bixu to wait until after the specified time in the past generate and initialize a new Portlet.
Throw in the initialization process of the Runtime Exception exception, be treated as PortletException to deal with.
IV Liferay Portal works
Portal system as required by one or more Portal pages, each Portal page contains zero or more of the Portlet. Each Portlet present their own content, in order to achieve content aggregation. Available by defining the rights of each Portlet realize personalized information customized desktop.
1.4.1 Portlet style and window states
JCP organization of JSR168 Portlet specification defines a standard of achievement. Each Portlet external performance of a small window, have their own default style and window state. Shown above, Portlet has its own title, visit the state to support editing , close, move up, down, maximize, minimize function, edit, state support for return and shut-down. Extracted from various data sources of information to Portlet content in the form presented in the Portal.
Portlet style that is in any mode Portlet, Portlet usually based on the mode in which the implementation of different tasks and have different content.
Portlet Portlet mode to determine what it is that the show and what action the Executive. When calling a Portlet, Portlet Portlet container provides a model for the Portlet. When the action when dealing with a request, Portlet mode can use procedures to change.
JSR168 Portlet Specification defines three modes: view, edit and help, Liferay Portal supports all three modes in which. Portal is also the role of the user to decide is to provide (display) among Portlet mode to the user operation.
For example, anonymous users can browse and help to the operation mode of the contents of the Portlet, but had only authorized users can edit the Portlet mode of operation of the content provided or action.
In view of this Portlet mode, which is expected to provide the function is to generate markup language to represent the state at this time Portlet. For example, Portlet browsing patterns can contain one or more of the screen allows users to view and interact with the user interaction or that do not require a static content.
In the edit mode this Portlet, Portlet need to provide content and logic to allow users to customize the Portlet behavior. Typical that the edit mode will set or update Portlet Portlet parameter settings.
In helping this mode, Portlet should provide help information on this Portlet. This help information can be related to the Portlet's simple and coherent explanation of Windows or detailed description of the context. The Portlet does not need to have all the help that pattern.
A Portlet window states can decide on one page, how many in the room. When you call when a Portlet, Portlet Container Portlet need to tell the current window state. Portlet window states can then decide how much information to make it the right treatment. In the course of processing the request, Portlet way through the process to change the window state.
1.4.2 Portal Page
Each Portal page contains zero or more Portlet small window presents a complete information page. Portal Portlet after startup configuration file according to information such as the title of such property to Portlet assignment, given Portlet editor, close the other control buttons, so that a standard Portlet Portlet window. Portlet Portlet window of these combined to form a complete document, that Portal page. Each Portlet which are in the appropriate layout, showing pre-defined content, the quality of the performance of Portal public. Portlet can also switch between different layouts. Portlet to respond to client requests, and submit the request to the appropriate URL for logic processing.
Portlet development is completed, the deployment to Portal Server, the Portal server is responsible for organization, access control and presentation. Portal page creation process is as follows:
The implementation of the Portlet container Portlet, Portlet Container Portlet generated content to receive. Portlet containers will normally be submitted to the Portlet the content server, Portlet Portal server set up in accordance with the content page, and then pass it to client presentation. Specific processes as below:
Portal page of the request process is as follows:
Users via client devices (such as browsers) to access Portal, Portal according to the received request to determine which need to be performed Portlet to meet the demand. Portal by Portlet container call Portlet, then the resulting fragments to establish Portal Portlet page, and transmits it back to the client presented to the user. Specific processes as below:
Related Posts of 1.Liferay Portal Framework Analysis
Rails startup process At each application of the / public directory, contain: dispatch.cgi, dispatch.fcgi, dispatch.rb 3 A distribution of documents . System configuration according to our implementation of one of the corresponding documents, call the dif
dhtmlXVault User's Guide 1 Top 2 Step 13:33 Browser (41) Comments (0) Categories: ajax Related recommend Comments Comment yinxiangbing View: 1143 times Gender: From: Beijing Details book Search this blog Recent visitors xieqinghua yh_private Sky ...
* ruby reference between all the source code are invoked, in order to standardize the management of libraries, gems emerged. gems are ruby source code management tool, code in accordance with a certain directory structure was organized into a lib. For ins
In advance, I have only a superficial Ruby. And Rails do not come into contact with. After watching the video, or can read, and perhaps what kind of grammar can guess the meaning. Now studying Grails, by Grails so want to see implementation. First analysi
Web site open quickly is very important, whether you are using what network are opened soon. We did not talk about the early stages of product development user groups because it does not matter much, if you as a student, then in accordance with our o ...
hibernate query cache Query cache is cached result set of common property On the entity object cache only the result set id Query cache life cycle, when the associated table happened to amend, then the query cache of the life cycle of The End Query cache
Carried ] [http ://www.cnblogs.com/eflylab/archive/2007/01/11/617276.html Cache is the cache, it is often to improve system performance are the most important means to serve as a reservoir of data and the role of a buffer. Cache for the substantial r ...
Understand the principle with the practice, details the relationship between thought, we'll go have selectively study the details, we must work on the details because the details are important to you to use the technical details of implementation ...
First of all, to quote another blog saying: 1.cascade ="..."? cascade is not a property of many-to-many relationship must have it just so that we insert or delete at the time like some more convenient, as long as the source of the cascade insert
Existing Table A, B Statement: A, B field id-based keys. A: [id, name] B: [id, Aid, title] B and A's set up a many-to-one relationship because of A, B two tables are the primary key id field so add B when Hibernate will automatically retrieve id ...