Table Of ContentAlfresco One 5.x Developer’s
Guide
Second Edition
Discover what it means to be an expert developer by
exploring the latest features available to you in Alfresco One
5.x
Benjamin Chevallereau
Jeff Potts
BIRMINGHAM - MUMBAI
Alfresco One 5.x Developer’s Guide
Second Edition
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the authors, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be caused
directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2008
Second edition: February 2017
Production reference: 1220217
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78712-816-3
www.packtpub.com
Credits
Authors Copy Editor
Benjamin Chevallereau Safis Editing
Jeff Potts
Reviewer Project Coordinator
Bindu Wavell Ritika Manoj
Commissioning Editor Proofreader
Amarabha Banerjee Safis Editing
Acquisition Editor Indexer
Shweta Pant Tejal Daruwale Soni
Content Development Editor Graphics
Aditi Gour Jason Monteiro
Technical Editor Production Coordinator
Anushree Arun Tendulkar Melwyn Dsa
About the Authors
Benjamin Chevallereau is a French software architect, based in London, who has been
working on Alfresco projects for the last 8 years and Ephesoft projects for the last 3 years.
He implemented solutions for small companies and global organizations in different
domains such as transport, finance, and government.
He has worked for different Alfresco-recognized partners in France, the UK, and USA,
including Armedia LLC, Zaizi, Michelin / Wipro, and BlueXML. He is also one of the
committers and PMC members of the Apache CMIS Chemistry project.
Jeff Potts is the founder of Metaversant Group, Inc., a consulting firm focused on content
management, search, and workflow. Jeff brings over 20 years of Enterprise Content
Management implementation experience to organizations of all sizes including the Fortune
500. Throughout his consulting career he has worked on a number of projects for clients
across the media and entertainment, airline, consumer packaged goods, and retail sectors.
Jeff began working with and blogging about Alfresco in November of 2005. In 2006 and
2007, he published a series of Alfresco tutorials and published them on his blog,
ecmarchitect.com. That work, together with other Community activity in Alfresco's forum,
Wiki site, and JIRA earned him Alfresco's 2007 Community Contributor of the Year Award.
In the past, Mr. Potts has worked for Alfresco Software, Inc. as Chief Community Officer,
Optaros as Senior Practice Director, and Hitachi Consulting as Vice President where he ran
the ECM practice.
About the Reviewer
Bindu Wavell is the chief architect at Zia Consulting. He has been doing enterprise system
integration consulting for the past 24 years. At Zia, Bindu provides guidance and mentoring
around Alfresco architecture and design in addition to working hands on with customers.
He develops processes and technologies to streamline onboarding new developers, delivers
trainings for customer developers and provides support for implementations and delivered
projects.
I would like to thank the whole team at Zia for providing an amazing environment for
learning, discovery and excellence. I’d also like to thank everyone at Alfresco for delivering
such a great content management platform and for continuing to focus on being the best in
the industry.
www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a
print book customer, you are entitled to a discount on the eBook copy. Get in touch with us
at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a
range of free newsletters and receive exclusive discounts and offers on Packt books and
eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt
books and video courses, as well as industry-leading tools to help you plan your personal
development and advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial
process. To help us improve, please leave us an honest review on this book's Amazon page
at https://www.amazon.com/Alfresco-One-5-x-Developers-Guide-ebook/dp
/1787128164.
If you'd like to join our team of regular reviewers, you can e-mail us at
[email protected]. We award our regular reviewers with free eBooks and
videos in exchange for their valuable feedback. Help us be relentless in improving our
products!
Table of Contents
Preface
1
Chapter 1: The Alfresco Platform
8
Alfresco in the real world 8
Basic document management 9
Web content management 12
Content authoring tools 12
Separation of presentation from content 13
Systematic publication or deployment 14
Alfresco WCM example 14
Custom content-centric applications 14
Example used throughout this book 16
Alfresco architecture 18
High-level architecture 19
Add-ons 20
Open source components 20
Major standards and protocols supported 22
Customizing Alfresco 23
Basic customization 23
Dashlets 24
Custom site configuration 26
Rules and actions 27
Simple workflow 27
Advanced customization 28
Examples of advanced customizations 28
Extend the content model 28
Perform automatic operations on content 29
Customize Alfresco Share 29
Create a RESTful API 29
Streamline complex business processes with advanced workflows 30
Integrate with other systems 30
Dusting off your toolbox 30
Understanding Alfresco's editions 31
Significant feature differences 32
What's used in this book 32
Summary 33
Chapter 2: Getting Started with Alfresco
34
Introduction to the Alfresco SDK 35
Maven archetypes 35
Install prerequisites 36
Spring Loaded 36
JDK 37
Maven 38
Install STS 39
Create your first application 41
Rapid application development 41
Traditional approach 47
Install Alfresco 50
Download Alfresco 51
Create your virtual machine 51
Deploy your modules 58
Check that your modules are installed 60
Extending Alfresco 61
Understanding the extension mechanism 61
Standard Java web application files 62
Framework files 62
Spring configuration files 62
Alfresco configuration files 63
Solution-specific files 64
Avoid Modifying Alfresco Code and Configuration 65
Troubleshooting 65
Log4j 66
Step-by-step – debugging from within Eclipse 66
Node browser 70
Starting over 72
Summary 73
Chapter 3: Working with Content Models
74
Defining SomeCo's content model 74
Step-by-step – starting the custom content model with custom types 74
Types 78
Properties and property types 79
Constraints 80
Step-by-step – adding properties to types 80
Step-by-step – relating types with associations 82
Associations 83
Step-by-step – adding aspects to the content model 84
Aspects 86
Step-by-step – finishing up the model 87
Manage property indexing 89
[ ii ]
Description:Discover what it means to be an expert developer by exploring the latest features available to you in Alfresco One 5.xAbout This BookCreate reliable and secure enterprise apps with the latest Alfresco One 5.x platformExplore all the latest Alfresco One 5.x APIs such as the CMIS API, Alfresco One API