ebook img

Content Server Development PDF

494 Pages·2006·2.58 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Content Server Development

CYAN YELLOW MAGENTA BLACK PANTONE 123 CV BOOKS FOR PROFESSIONALS BY PROFESSIONALS® THE EXPERT’S VOICE® IN STELLENT Companion eBook Available The Definitive Guide to Stellent Content Server Development The Definitive Guide to Dear Reader, S You have probably heard of content management; your organization probably The Definitive Guide to has a system already deployed. But is your system flexible, easy to customize, and enterprise scalable? If you don’t own the Stellent Content Server, probably not. People are always amazed when I show them how quickly they can set up t Stellent and modify the Content Server. You can create customizations, integrations, and content-centric applications very rapidly by leveraging the right pieces of e Stellent’s framework. The goal of this book is to show you how and to help you do so in the most effective way. This book is organized in two halves. The first is a guide to Stellent’s frame- l work. It explains the core Java-based, service-oriented architecture—and how all the pieces fit together. It contains several dozen sample customizations of l the front-end interface, the back-end services, and integrations with other e applications. The second half is a developer’s reference manual on core Stellent functionality and the internal API. Throughout the book I reveal tips and tricks Content Server on security, performance, metadata design, maintenance, hidden features, and general best practices. n You need enterprise software that can change with you. This book contains the resources and samples you need to ensure that your content management system will adapt to future requirements. It is also a testament to the unparalleled Development t flexibility of data-driven programming and service-oriented architectures. It doesn’t matter whether you are just contemplating an enterprise-level deployment or whether you own Stellent and want to push it to its limits. Either way, you will benefit from this book. Enjoy! DC Brian “Bex” Huff eo Join online discussions: vn forums.apress.com et FBOY RP RPOROFEFSESSISOIONNALASLS™ “Finally,a comprehensive reference book of Stellent’s framework and methodology! le A comprehensive guide and reference for A true testament of why Stellent is #1!” on all Stellent administrators and developers Companion eBook —Heidi Kujawa, PMP pt Director, Enterprise Applications m Sony Pictures Entertainment S ee “I would highly recommend this book to anyone interested in customizing See last page for details Stellent Content Server.” nr on $10 eBook version v —George Annen, t e Hyundai Information Service North America (HISNA) Brian “Bex” Huff r ISBN 1-59059-684-6 SOURCECODEONLINE 90000 www.apress.com Huff Shelve in Web Applications User level: Intermediate–Advanced 6 89253 59684 5 9 781590 596845 this print for content only—size & color not accurate 7" x 9-1/4" / CASEBOUND / MALLOY (1.0 INCH BULK -- 496 pages -- 50# Thor) 6846fm.qxd 5/26/06 10:56 AM Page i The Definitive Guide to Stellent Content Server Development Brian “Bex” Huff 6846fm.qxd 5/26/06 10:56 AM Page ii The Definitive Guide to Stellent Content Server Development Copyright © 2006 by Brian Huff All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13: 978-1-59059-684-5 ISBN-10: 1-59059-684-6 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Jonathan Hassell Technical Reviewer: Samuel White Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick, Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser, Keir Thomas, Matt Wade Project Manager: Elizabeth Seymour Copy Edit Manager: Nicole LeClerc Copy Editor: Nancy Sixsmith Assistant Production Director: Kari Brooks-Copony Production Editor: Kelly Gunther Compositor: Molly Sharp Proofreader: Dan Shaw Indexer: Toma Mulligan Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or visit http://www.springeronline.com. For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail [email protected], or visit http://www.apress.com. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at http://www.apress.comin the Source Code section. 6846fm.qxd 5/26/06 10:56 AM Page iii Contents About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii (cid:2) CHAPTER 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Enterprise Content Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Stellent Content Server (SCS). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Getting Started with Stellent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Customizing the Content Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 (cid:2) CHAPTER 2 Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Service-Oriented Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Modifying the Content Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Dynamic Server Page Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Component Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 (cid:2) CHAPTER 3 Using HCSTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Simple HCSTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Search Results Portal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Advanced Search Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Custom Check-In Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 (cid:2) CHAPTER 4 Using JSPs and Servlets in Stellent . . . . . . . . . . . . . . . . . . . . . . . 65 Initial Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Simple JSPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Search Results Portal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Advanced Search Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Custom Check-In Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 iii 6846fm.qxd 5/26/06 10:56 AM Page iv iv (cid:2) CONTENTS Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 (cid:2) CHAPTER 5 Using HCSPs and HCSFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Designing Simple HTML Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Designing Comments Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Forms to Generate Comment Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Option Lists on Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Updating and Deleting Values on a Form . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 (cid:2) CHAPTER 6 Leveraging IDOC Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 IDOC Pages and Portals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 IDOC and HTML Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Overriding Metadata Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 (cid:2) CHAPTER 7 Introduction to Custom Components . . . . . . . . . . . . . . . . . . . . . 133 Tools and References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Hello User Include. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Hello User Service and Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Overriding an Include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 (cid:2) CHAPTER 8 Customizing Layouts and Skins . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Creating a New Skin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Adding and Modifying Navigation Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Custom Action Popup Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Custom Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 (cid:2) CHAPTER 9 Customizing Forms and Core Templates . . . . . . . . . . . . . . . . . 157 Finding the Template Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Finding the Correct Include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Finding Includes and Templates in Other Components . . . . . . . . . . . . . . 159 Adding Search Feedback Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 6846fm.qxd 5/26/06 10:56 AM Page v (cid:2) CONTENTS v Personalized Quick Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Hidden and Preset Metadata Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Component Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 (cid:2) CHAPTER 10 Advanced Component Architecture . . . . . . . . . . . . . . . . . . . . . . 187 Advanced Component Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Setup of a Java Development Environment . . . . . . . . . . . . . . . . . . . . . . . . 203 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 (cid:2) CHAPTER 11 Custom Java Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Dynamic AutoNumber Prefix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Hello World Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 Add Alternate File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 Creating Custom IdocScript Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 Executing a Service Call from a Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Database Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 (cid:2) CHAPTER 12 Advanced Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Web Services and SOAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 J2EE Application Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Active Server Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Site Studio and Dynamic Converter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 WebDAV and Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Security Customizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 The Future . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 (cid:2) APPENDIX A IdocScript Language Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Lexical Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Expressions and Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Dynamic HTML Resource Includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 Flow Control Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 6846fm.qxd 5/26/06 10:56 AM Page vi vi (cid:2) CONTENTS (cid:2) APPENDIX B Common IdocScript Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 IdocScript Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 (cid:2) APPENDIX C IdocScript Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Top 50 Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Top 50 Computed Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 Top 50 Local Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 (cid:2) APPENDIX D Dynamic HTML Resource Includes . . . . . . . . . . . . . . . . . . . . . . . 367 (cid:2) APPENDIX E Stellent Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 Top 50 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 (cid:2) APPENDIX F Tomcat Integration Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 idcserver.ServerBean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 idcserver.ServerResultSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 idcserver.ServerFieldInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 idcserver.ContentServerException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 (cid:2) APPENDIX G Layout Manager API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 The navBuilder Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 navBuilder Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 Global Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 (cid:2) APPENDIX H Java Filter Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 (cid:2) APPENDIX I Aliasable Java Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 (cid:2) APPENDIX J HyperData Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 HDA File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 Internal Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 (cid:2) INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 6846fm.qxd 5/26/06 10:56 AM Page vii About the Author (cid:2) BRIAN “BEX”HUFFhas been programming computers since the age of ten, like many developers these days. He holds several degrees, including Physics, Mathematics, Philosophy, Civil Engineering, and Computer Science. Despite a highly technical background, he has always believed that the greatest skills a technical person can possess are the abilities to communicate and teach. Brian has worked at Stellent for seven years and has worn many hats in the company. He has been an architect, designer, and developer and has performed training, documentation, and consulting. He is a moderator and frequent contributor to the intradoc_users Yahoo group for Stellent users: http://groups.yahoo.com/group/intradoc_users/. He lives in Minneapolis with his wife, Michelle, and two noisy cockatiels. vii 6846fm.qxd 5/26/06 10:56 AM Page viii 6846fm.qxd 5/26/06 10:56 AM Page ix About the Technical Reviewer (cid:2) SAMUEL WHITE grew up in Kampala, Uganda, and Silver Springs and Columbia, MD. After completing a Mathematics Ph.D. at the University of California, Berkeley in 1989, Sam spent four years as a postdoctoral researcher before becoming a full-time software developer. He joined Stellent as a software designer in 1996 and was appointed Vice President of Server Products in 2003. Sam’s free time is spent raising a five-year-old daughter with his wife of 16 years, reading books (both nonfiction and fiction), and playing/studying games (particularly bridge). ix

Description:
For information on translations, please contact Apress directly at 2560 Ninth Street, .. □APPENDIX D Dynamic HTML Resource Includes guage called IdocScript, which is a straightforward language that you can learn in . You can install the Content Server on a test machine in a matter of minutes.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.