Liferay-Developer-Guide-6.0.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

Liferay-Developer-Guide-6.0.Pdf Liferay Developer's Guide Liferay Developer's Guide Connor McKay, Editor Jorge Ferrer, Editor Copyright © 2011 by Liferay, Inc. This work is offered under the Creative Commons Attribution-Share Alike Unported license. You are free: ● to share—to copy, distribute, and transmit the work ● to remix—to adapt the work Under the following conditions: ● Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). ● Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. The full version of this license appears in the appendix of this book, or you may view it online here: http://creativecommons.org/licenses/by-sa/3.0 Contributors: Joseph Shum, Alexander Chow, Redmond Mar, Ed Shin, Rich Sezov, Samuel Kong, Connor McKay, Jorge Ferrer, Julio Camarero, Daniel Sanz, Juan Fernández, Sergio González, Miguel Pastor, Jim Hinkey, Greg Amerson Table of Contents CONVENTIONS...........................................................................................................................................6 PUBLISHER NOTES.....................................................................................................................................7 UPDATES...................................................................................................................................................7 November 3rd 2010.......................................................................................................................7 February 27th 2011.......................................................................................................................7 March 9th 2011..............................................................................................................................7 April 7th 2011................................................................................................................................8 April 29th 2011..............................................................................................................................8 October 11th 2011.........................................................................................................................8 1. Introduction...................................................................................................................9 DEVELOPING APPLICATIONS FOR LIFERAY....................................................................................................9 Portlets.........................................................................................................................................10 OpenSocial Gadgets....................................................................................................................10 Reusing existing web applications...........................................................................................11 Supported Technologies............................................................................................................12 EXTENDING AND CUSTOMIZING LIFERAY...................................................................................................13 Customizing the look and feel: Themes...................................................................................13 Adding new predefined page layouts: Layout Templates.....................................................13 Customizing or extending the out of the box functionalities: Hook plugins....................13 Advanced customization: Ext plugins.....................................................................................14 CHOOSING THE BEST TOOL FOR THE JOB.....................................................................................................14 2. The Plugins SDK...........................................................................................................17 INITIAL SETUP.........................................................................................................................................17 Ant Configuration.......................................................................................................................18 Plugins SDK Configuration........................................................................................................19 STRUCTURE OF THE SDK.........................................................................................................................19 3. Portlet Development.....................................................................................................21 CREATING A PORTLET..............................................................................................................................21 Deploying the Portlet.................................................................................................................22 ANATOMY OF A PORTLET.........................................................................................................................23 A Closer Look at the My Greeting Portlet................................................................................24 WRITING THE MY GREETING PORTLET.....................................................................................................27 UNDERSTANDING THE TWO PHASES OF PORTLET EXECUTION.....................................................................29 PASSING INFORMATION FROM THE ACTION PHASE TO THE RENDER PHASE.................................................33 DEVELOPING A PORTLET WITH MULTIPLE ACTIONS...................................................................................36 OPTIONAL: ADDING FRIENDLY URL MAPPING TO THE PORTLET................................................................38 4. Creating Liferay Themes...............................................................................................41 INTRODUCTION........................................................................................................................................41 CREATING A THEME.................................................................................................................................42 Deploying the Theme.................................................................................................................42 ANATOMY OF A THEME............................................................................................................................42 THUMBNAILS...........................................................................................................................................44 JAVASCRIPT............................................................................................................................................44 SETTINGS................................................................................................................................................45 COLOR SCHEMES......................................................................................................................................46 PORTAL PREDEFINED SETTINGS................................................................................................................47 THEME INHERITANCE...............................................................................................................................48 5. Hooks...........................................................................................................................51 CREATING A HOOK...................................................................................................................................51 Deploying the Hook....................................................................................................................51 OVERRIDING A JSP..................................................................................................................................52 Customizing JSPs without overriding the original................................................................52 iii PERFORMING A CUSTOM ACTION..............................................................................................................53 Extending and Overriding portal.properties..........................................................................54 OVERRIDING A PORTAL SERVICE...............................................................................................................54 OVERRIDING A LANGUAGE.PROPERTIES FILE..............................................................................................56 6. Ext plugins....................................................................................................................57 CREATING AN EXT PLUGIN.......................................................................................................................58 DEVELOPING AN EXT PLUGIN....................................................................................................................60 Set up............................................................................................................................................60 Initial deployment......................................................................................................................61 Redeployment.............................................................................................................................63 Advanced customization techniques.......................................................................................64
Recommended publications
  • Impacts of Object Oriented Programming on Web Application Development
    International Journal of Computer Applications Technology and Research Volume 4– Issue 9, 706 - 710, 2015, ISSN: 2319–8656 Impacts of Object Oriented Programming on Web Application Development Onu F. U. Osisikankwu P. U. Madubuike C. E. James G. Computer Science Department of Computer Science Computer Science Department, Computing and Department, Department, Ebonyi State Engineering, Akanu Ibiam Federal Obong University University, University of Polytechnic, Akwa-Ibom, Nigeria Sunderland, Uwanna, Nigeria UK Nigeria Abstract: Development of web application nowadays can hardly survive without object oriented approach except for the purpose of just information display. The complexity of application development and the need for content organization has raised the need for web application developers to embrace object oriented programming approach. This paper exposes the impact of object oriented programming on web application development. The exposition was done through a detailed study and analysis of information from secondary sources. The internet was usefully employed to access journal articles for both national and international sources. Our study enables web developers and designers to understand web application features, tools and methodologies for developing web application. It also keeps researchers and scholars abreast of the boost which OOP has brought into Web Applications development. Keywords: Object-Oriented Paradigm; Web; Web 2.0; RIAs; URL. 1. INTRODUCTION According to [17], Web Applications are web sites which are designers to understand web application features and popular dynamic in nature and uses server side programming to allow languages, tools, and methodologies for developing web a good interaction between the user form at the front end, and application. the database at the back-end.
    [Show full text]
  • Develop a Simple Web Application with Apache Wicket and Apache
    Develop a simple Web application with Apache Wicket and Apache Geronimo Combine Wicket, Geronimo, and Apache Derby to form an open source Java Web development platform Skill Level: Intermediate Robi Sen ([email protected]) Vice President Department 13 LLC 10 Jul 2007 Apache Wicket is an innovative Java™ Web application framework that was introduced a couple of years ago. It helps simplify Web application development by clearly separating the roles of developers and designers. It lets you remove logical code from the view layer, eliminating the need for JavaServer Pages (JSP), providing a simple plain old Java object (POJO)-centric mode of development, and removing much of the need for XML and other configuration file formats. In this tutorial, learn how to set up your system to develop a simple Web application with Wicket, using Apache Geronimo as your application server and Apache Derby as the embedded database. Section 1. Before you start This tutorial is designed for developers who have found Java frameworks, such as Struts, lacking in needed functionality. If you're interested in developing Web applications in a more object-oriented manner, where the view is clearly separated from logic and there's minimal configuration and mapping, then Wicket is for you! This tutorial walks you through the basics of how Wicket works, while using Apache Geronimo to set up a Java Platform, Enterprise Edition (Java EE) server, Web server, and embedded database in just minutes. Combining Wicket with Geronimo lets you develop data-driven, scalable Web applications using software that's all open source. Develop a simple Web application with Apache Wicket and Apache Geronimo © Copyright IBM Corporation 1994, 2008.
    [Show full text]
  • Continuous Transition from Model-Driven Prototype to Full-Size Real-World Enterprise Information Systems
    [GNM+20] A. Gerasimov, J. Michael, L. Netz, B. Rumpe, S. Varga: Continuous Transition from Model-Driven Prototype to Full-Size Real-World Enterprise Information Systems. In: 25th Americas Conference on Information Systems (AMCIS 2020), pp. 1-10, Association for Information Systems (AIS), Aug. 2020. Association for Information Systems AIS Electronic Library (AISeL) AMCIS 2020 Proceedings Systems Analysis and Design (SIGSAND) Aug 10th, 12:00 AM Continuous Transition from Model-Driven Prototype to Full-Size Real-World Enterprise Information Systems Arkadii Gerasimov RWTH Aachen University, [email protected] Judith Michael RWTH Aachen University, [email protected] Lukas Netz Chair of Software Engineering, [email protected] Bernhard Rumpe RWTH Aachen University, [email protected] Simon Varga RWTH Aachen University, [email protected] Follow this and additional works at: https://aisel.aisnet.org/amcis2020 Recommended Citation Gerasimov, Arkadii; Michael, Judith; Netz, Lukas; Rumpe, Bernhard; and Varga, Simon, "Continuous Transition from Model-Driven Prototype to Full-Size Real-World Enterprise Information Systems" (2020). AMCIS 2020 Proceedings. 2. https://aisel.aisnet.org/amcis2020/systems_analysis_design/systems_analysis_design/2 This material is brought to you by the Americas Conference on Information Systems (AMCIS) at AIS Electronic Library (AISeL). It has been accepted for inclusion in AMCIS 2020 Proceedings by an authorized administrator of AIS Electronic Library (AISeL). For more information, please contact [email protected]. Continuous
    [Show full text]
  • Open Source Katalog 2009 – Seite 1
    Optaros Open Source Katalog 2009 – Seite 1 OPEN SOURCE KATALOG 2009 350 Produkte/Projekte für den Unternehmenseinsatz OPTAROS WHITE PAPER Applikationsentwicklung Assembly Portal BI Komponenten Frameworks Rules Engine SOA Web Services Programmiersprachen ECM Entwicklungs- und Testumgebungen Open Source VoIP CRM Frameworks eCommerce BI Infrastrukturlösungen Programmiersprachen ETL Integration Office-Anwendungen Geschäftsanwendungen ERP Sicherheit CMS Knowledge Management DMS ESB © Copyright 2008. Optaros Open Source Katalog 2009 - Seite 2 Optaros Referenz-Projekte als Beispiele für Open Source-Einsatz im Unternehmen Kunde Projektbeschreibung Technologien Intranet-Plattform zur Automatisierung der •JBossAS Geschäftsprozesse rund um „Information Systems •JBossSeam Compliance“ •jQuery Integrationsplattform und –architektur NesOA als • Mule Enterprise Bindeglied zwischen Vertriebs-/Service-Kanälen und Service Bus den Waren- und Logistiksystemen •JBossMiddleware stack •JBossMessaging CRM-Anwendung mit Fokus auf Sales-Force- •SugarCRM Automation Online-Community für die Entwickler rund um die •AlfrescoECM Endeca-Search-Software; breit angelegtes •Liferay Enterprise Portal mit Selbstbedienungs-, •Wordpress Kommunikations- und Diskussions-Funktionalitäten Swisscom Labs: Online-Plattform für die •AlfrescoWCMS Bereitstellung von zukünftigen Produkten (Beta), •Spring, JSF zwecks Markt- und Early-Adopter-Feedback •Nagios eGovernment-Plattform zur Speicherung und •AlfrescoECM Zurverfügungstellung von Verwaltungs- • Spring, Hibernate Dokumenten; integriert
    [Show full text]
  • Architectural Patterns
    Architectural patterns Open Source & DOTNET platform Understanding architectural design patterns (like MVC, MVP, MVVM etc.) is essential for producing a maintainable, clean, extendable and testable source code. MVC MVC stands for Model-View-Controller. It is a software design pattern which was introduced in 1970s. Also, MVC pattern forces a separation of concerns, it means domain model and controller logic are decoupled from user interface (view). As a result maintenance and testing of the application become simpler and easier. MVC design pattern splits an application into three main aspects: Model, View and Controller MVC Model The Model represents a set of classes that describe the business logic i.e. business model as well as data access operations i.e. data model. It also defines business rules for data means how the data can be changed and manipulated. View The View represents the UI components like CSS, jQuery, html etc. It is only responsible for displaying the data that is received from the controller as the result. This also transforms the model(s) into UI. Controller The Controller is responsible to process incoming requests. It receives input from users via the View, then process the user's data with the help of Model and passing the results back to the View. Typically, it acts as the coordinator between the View and the Model. MVP This pattern is similar to MVC pattern in which controller has been replaced by the presenter. This design pattern splits an application into three main aspects: Model, View and Presenter. This pattern is commonly used with ASP.NET Web Forms applications which require to create automated unit tests for their code-behind pages.
    [Show full text]
  • Diseño E Implementación De Un Framework De Presentación Curso 2012/13
    PFC – Diseño e implementación Framework Presentación (2012/13) Licencia Esta obra está bajo una licencia Reconocimiento - No comercial- Sin obras derivadas 2.5 España de Creative Commons. Puede copiarlo, distribuirlo y transmitirlo públicamente siempre que cite al autor y la obra, no se haga un uso comercial y no se hagan copias derivadas. La licencia completa se puede consultar en: http://creativecommons.org/licenses/by-nc-nd/2.5/es/deed.es 1 PFC – Diseño e implementación Framework Presentación (2012/13) Estudios de Informática y Multimedia Proyecto Fin de Carrera Diseño e implementación de un Framework de Presentación Curso 2012/13 Nombre: Daniel Rodríguez Simó Username: drodriguezsi Tutor : Óscar Escudero Sánchez 2 PFC – Diseño e implementación Framework Presentación (2012/13) Agradecimientos Quiero agradecer el apoyo a Isabel, mi mujer, de cara a todo el tiempo invertido para poder sacar adelante estos años de estudio y esfuerzo. Y en general a toda mi familia, especialmente a mis padres Eugenia y Juan Pedro, porque sin ellos y sin la educación que se han esforzado en darme, esto nunca habría sido posible y a Pilar y Eugenia, mis abuelas, que aunque no se encuentren entre nosotros, siempre algo de ellas que nos acompaña en el día a día. Por último agradecer a mi tutor Óscar su apoyo y orientación de cara a la consecución de este objetivo y al buen desarrollo de este Proyecto Fin de Carrera. A todos vosotros, Gracias! 3 PFC – Diseño e implementación Framework Presentación (2012/13) Descripción General El presente proyecto se centra en el estudio y elaboración de un marco de trabajo basado en un Framework de Presentación, dedicado al desarrollo de aplicaciones web bajo la plataforma J2EE.
    [Show full text]
  • Reference Guide
    REFERENCE GUIDE VERSION 3.0 OpenXava 3.0 1 Table of Contents ° ° ° ° ° Table of Contents Chapter 1: Overview................................................................................................................... 4 Chapter 2: My first OpenXava project........................................................................... 7 Chapter 3: Model....................................................................................................................... 15 Chapter 4: View.......................................................................................................................... 56 Chapter 5: Tabular data ....................................................................................................... 96 Chapter 6: Object/relational mapping....................................................................... 103 Chapter 7: Controllers......................................................................................................... 114 Chapter 8: Application ........................................................................................................ 138 Chapter 9: Customizing...................................................................................................... 144 OpenXava 3.0 2 Table of Contents ° ° ° ° ° OpenXava 3.0 3 ° ° ° ° ° Chapter 1: Overview Presentation OpenXava is a framework to develop JavaEE/J2EE applications quickly and easily. The underlaying philosophy is to define with Java annotations or XML and to program with Java, the more definition and less
    [Show full text]
  • Migrating Mathematical Programs to Web Interface Frameworks
    Submitted by Hsuan-Ming Chen Submitted at Research Institute for Symbolic Computation Supervisor Prof. Wolfgang Schreiner Migrating April 2019 Mathematical Programs to Web Interface Frameworks Master Thesis to obtain the academic degree of Master of Science in the Master’s Program Internationaler Universitätslehrgang: Informatics: Engineering & Management JOHANNES KEPLER UNIVERSITY LINZ Altenberger Str. 69 4040 Linz, Austria www.jku.at DVR 0093696 ABSTRACT A mathematical software system, the RISC Algorithm Language (RISCAL), has been implemented in Java; however, it can be only executed on the local machine of the user. The aim of this master thesis is to migrate RISCAL to the web, such that users can access the software via a conventional web browser without needing a local installation of the software. In a preparatory phase, this thesis evaluates various web interface frameworks and how these can be executed on the web. Based in the result of this investigation which compares the advantages and disadvantages of the frameworks, one framework is selected as the most promising candidate for future work. The core of the thesis is then the migration of RISCAL to the web on the basis of this framework and the subsequent evaluation of how the demands have been met and how well all of the RISCAL programs are working after the migration. April 4, 2019 Hsuan-Ming Chen 2/85 ACKNOWLEDGMENT First of all, I am grateful to Professor Bruno Buchberger for providing the opportunity to attend this program and giving every resource and help which he can support. Second, I am truly thankful to my advisor, Professor Wolfgang Schreiner, for offering me everything I need and solving the issues which I encountered during the research.
    [Show full text]
  • UIMA Tutorial and Developers' Guides Written and Maintained by the Apache UIMA™ Development Community
    UIMA Tutorial and Developers' Guides Written and maintained by the Apache UIMA™ Development Community Version 3.2.0 Copyright © 2006, 2021 The Apache Software Foundation Copyright © 2004, 2006 International Business Machines Corporation License and Disclaimer. The ASF licenses this documentation to you under the Apache License, Version 2.0 (the "License"); you may not use this documentation except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, this documentation and its contents are distributed under the License on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Trademarks. All terms mentioned in the text that are known to be trademarks or service marks have been appropriately capitalized. Use of such terms in this book should not be regarded as affecting the validity of the the trademark or service mark. Publication date April, 2021 Table of Contents 1. Annotator & AE Developer's Guide ................................................................................ 1 1.1. Getting Started ................................................................................................... 2 1.1.1. Defining Types ........................................................................................ 3 1.1.2. Generating Java Source Files for CAS Types ..............................................
    [Show full text]
  • Master Thesis
    Specification and Generation of User Interfaces Based on Method-Oriented Dialog Flows by Artun Subasi in Partial Fulfillment of the Requirements for the Degree of Master of Science in Computer Science at the University of Kaiserslautern Faculty of Computer Science May 10, 2011 Thesis Supervisors: Prof. Dr. Arnd Poetzsch-Heffter Dr. Gerhard Pews Dipl.-Inf. Patrick Michel Abstract Considerable time and effort is spent on implementing user interfaces and assuring that the implementation conforms to the user interface architecture. Although existing user interface generation approaches can be used to reduce the implementation effort, the generated user interfaces are not tailored to user interface architectures. This thesis shows how dialog flow specifications can be used for the automatic generation of user interfaces with regard to user interface architectures. An abstract user interface specifi- cation approach is proposed which enables platform independent specification of dialog flows. In addition, a Java-based user interface specification language is used to inves- tigate whether dialog flows can be practically defined using the elements of the Java language, such as interfaces and annotations. As a proof of concept, a new software tool is presented which is able to generate web based graphical user interfaces with regard to a concrete user interface architecture which was developed by the \Bundesstelle f¨urInformationstechnik des Bundesverwaltungsamtes" in cooperation with Capgemini sd&m. The evaluation results show that the developed user interface specification and generation method optimizes the workflow for the creation of the user interfaces. i Declaration I declare that this thesis was composed by myself, that the work contained herein is my own except where explicitly stated otherwise in the text, and that this work has not been submitted for any other degree or professional qualification except as specified.
    [Show full text]
  • Comparison of Two Model Driven Architecture Approaches for Automating Business Processes, Moskitt Framework and Bizagi Process Management Suite
    ISSN 2039-2117 (online) Mediterranean Journal of Social Sciences Vol 6 No 2 ISSN 2039-9340 (print) MCSER Publishing, Rome-Italy March 2015 Comparison of Two Model Driven Architecture Approaches for Automating Business Processes, Moskitt Framework and Bizagi Process Management Suite Oskeol Gjoni, PHD Student European University of Tirana, Tirana, Albania Doi:10.5901/mjss.2015.v6n2p615 Abstract The Model Driven Architecture (MDA) approach to develop information systems is a model-oriented approach since it focusses on the business logic (the “what”) rather than on the specific implementation technology (the “how”). Models are the authentic protagonist of information systems development. They represent the information system developed while the implementation in a certain technology is obtained through model transformation. The business process that will be automated in both frameworks is the user access management flow that employees follow in order to gain access into systems. The same business process will be modeled in two different formalisms, UML and BPMN, as per the capabilities supported from each framework. Starting from the model the automation steps in order to have an information system which can be executed and which automates the respective process will be clarified. A comparison study in each step of the process automation for both frameworks is presented. The advantages and disadvantages of each of the approaches will be considered and also evidence which approach is more suitable in specific cases. Keywords: Model driven architecture, MOSKitt, Bizagi, UML, BPMN. 1. Introduction In order for modern companies to survive in a world always more competitive, more difficult to predict, more connected and challenging, their business environment changes and adapts dynamically.
    [Show full text]
  • A Framework for Enterprise Java
    Seam - Contextual Components A Framework for Enterprise Java 2.1.2 by Gavin King, Pete Muir, Norman Richards, Shane Bryzak, Michael Yuan, Mike Youngstrom, Christian Bauer, Jay Balunas, Dan Allen, Max Rydahl Andersen, Emmanuel Bernard, Nicklas Karlsson, Daniel Roth, Matt Drees, Jacob Orshalick, and Marek Novotny edited by Samson Kittoli and thanks to James Cobb (Graphic Design), Cheyenne Weaver (Graphic Design), Mark Newton, Steve Ebersole, Michael Courcy (French Translation), Nicola Benaglia (Italian Translation), Stefano Travelli (Italian Translation), Francesco Milesi (Italian Translation), and Japan JBoss User Group (Japanese Translation) Introduction to JBoss Seam ............................................................................................ xvii 1. Contribute to Seam ............................................................................................. xxi 1. Seam Tutorial .............................................................................................................. 1 1.1. Using the Seam examples .................................................................................. 1 1.1.1. Running the examples on JBoss AS ......................................................... 1 1.1.2. Running the examples on Tomcat ............................................................. 1 1.1.3. Running the example tests ....................................................................... 2 1.2. Your first Seam application: the registration example ............................................ 2 1.2.1.
    [Show full text]