Cq5 Guide Developer

  • View
    12

  • Download
    3

Embed Size (px)

Transcript

CQ5 WCM Developer's Guide

CQ5 WCM Developer's Guide

CQ 5.1 WCM Copyright 1993-2008 Day Management AG

Contents1. Introduction ........................................................................................................................ 1 1.1. Introduction ............................................................................................................. 1 1.2. Purpose of this Document ........................................................................................ 1 1.3. Target Audience ...................................................................................................... 1 1.4. Prerequisites for development within CQ .................................................................. 1 2. CQ in-depth ....................................................................................................................... 2 2.1. JSR-170 and the JCR API ....................................................................................... 2 2.2. CQ DAM ................................................................................................................. 2 2.3. Widgets .................................................................................................................. 2 2.4. FileVault (source revision system) ............................................................................ 2 2.5. Workflow Engine ..................................................................................................... 2 2.6. Dispatcher ............................................................................................................... 2 2.7. Localization ............................................................................................................. 2 2.8. Sling Request Processing ........................................................................................ 3 2.8.1. Introduction to Sling ...................................................................................... 3 2.8.2. Sling is Content Centric ................................................................................ 3 2.8.3. RESTful Sling ............................................................................................... 3 2.8.4. URL Decomposition ...................................................................................... 3 2.8.5. From URL to Content and Scripts .................................................................. 4 2.8.6. Sling API ...................................................................................................... 8 2.8.7. Referencing existing elements using sling:include ........................................... 8 2.8.8. First Steps - an example for using Sling ......................................................... 8 2.9. OSGI ...................................................................................................................... 8 3. CQ5 WCM - Architecture and Concepts ............................................................................ 10 3.1. Development objects ............................................................................................. 10 3.2. Structure within the repository ................................................................................ 11 4. Development Tools ........................................................................................................... 12 4.1. Working with the CQ Development Environment (CQDE) ......................................... 12 4.1.1. Setting up CQDE ........................................................................................ 12 4.1.2. Configuring CQDE ...................................................................................... 12 4.2. How to Set Up the Development Environment with Eclipse ....................................... 13 4.2.1. Creating the Project Structure in CQ5 .......................................................... 13 4.2.2. Installing FileVault (VLT) ............................................................................. 13 4.2.3. Installing Eclipse ......................................................................................... 14 4.2.4. Creating the Project Structure in Eclipse ...................................................... 15 4.2.5. Scripting with Eclipse and CQ5 .................................................................... 19 4.2.6. Java Developing with Eclipse and CQ5 ........................................................ 21 4.2.7. Building collaborative and automated projects ............................................... 23 5. Designer .......................................................................................................................... 24 6. Templates ........................................................................................................................ 25 6.1. What are Templates? ............................................................................................ 25 6.2. Overview of templates ........................................................................................... 25 6.3. How Templates are structured ................................................................................ 25 6.3.1. The structure of a Template ........................................................................ 25 6.3.2. The content produced by a Template ........................................................... 27 6.4. Developing Page Templates ................................................................................... 28 6.4.1. Creating a new Template (based on an existing template) ............................. 28 6.5. Summary .............................................................................................................. 29 7. Components ..................................................................................................................... 30 7.1. What exactly is a Component? ............................................................................... 30 7.2. Overview of components ........................................................................................ 30 7.3. Components and their structure .............................................................................. 32 7.3.1. Component definitions ................................................................................. 32 7.3.2. Component definitions and the content they create ....................................... 35 7.3.3. Component Hierarchy and Inheritance .......................................................... 36

Page iii of 72

CQ 5.1 WCM Copyright 1993-2008 Day Management AG

CQ5 WCM Developer's Guide

7.3.4. Summary .................................................................................................... 7.4. Developing Components ........................................................................................ 7.4.1. Developing a new component by adapting an existing component .................. 7.4.2. Adding a new component to the paragraph system (design mode) .................. 7.4.3. Extending the Text and Image Component - An Example .............................. 7.5. Scripts .................................................................................................................. 7.5.1. global.jsp .................................................................................................... 7.5.2. JSP Tag Libraries ....................................................................................... 7.6. A closer look at a few of the foundation components... ............................................. 7.6.1. Top Navigation Component ......................................................................... 7.6.2. List Children Component ............................................................................. 7.6.3. Logo Component ........................................................................................ 7.6.4. Paragraph System ...................................................................................... 7.6.5. Image Component ...................................................................................... 7.6.6. Text & Image Component ........................................................................... 7.6.7. Search Component ..................................................................................... 8. Guidelines for Using Templates and Components .............................................................. 9. Java WCM API ................................................................................................................ 10. Data Modelling ............................................................................................................... 10.1. Data Modeling - David Nuescheler's Model ........................................................... 10.1.1. Source ...................................................................................................... 10.1.2. Introduction from David ............................................................................. 10.1.3. Seven Simple Rules .................................................................................. A. Keyboard Shortcuts .......................................................................................................... B. Security Checklist ............................................................................................................ B.1. Security Checklist for Developers ........................................................................... B.1.1. Use the user session, not the administrative session ..................................... C. Copyright, Licenses and Formatting Conventions ............................................................... C.1. Formatting Conventions ...............................................................................