Customizing and Extending IBM Content Navigator
Total Page:16
File Type:pdf, Size:1020Kb
Front cover Customizing and Extending IBM Content Navigator Understand extension points and customization options Create an action, service, feature, and custom step processor Use widgets in apps, mobile development, and more Wei-Dong Zhu Brett Morris Tomas Barina Rainer Mueller-Maechler Yi Duan Ron Rathgeber Nicole Hughes Jana Saalfeld Marcel Kostal Jian Xin Zhang Chad Lou Jie Zhang ibm.com/redbooks International Technical Support Organization Customizing and Extending IBM Content Navigator May 2014 SG24-8055-01 Note: Before using this information and the product it supports, read the information in “Notices” on page xi. Second Edition (May 2014) This edition applies to Version 2, Release 0, Modification 0 of IBM Content Navigator found in IBM FileNet Content Manager (product number 5724-R81), IBM Content Manager (product number 5724-B19), and IBM Content Manager OnDemand (product number 5724-J33). © Copyright International Business Machines Corporation 2012, 2014. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . xi Trademarks . xii Preface . xiii Authors . xiv Now you can become a published author, too! . xvii Comments welcome. xvii Stay connected to IBM Redbooks . xviii Summary of changes . xix May 2014, Second Edition . xix Part 1. Introduction . 1 Chapter 1. Extension points and customization options . 3 1.1 Before you begin . 4 1.1.1 IBM Content Navigator terms . 4 1.2 Development options with IBM Content Navigator . 6 1.2.1 Configuring IBM Content Navigator . 6 1.2.2 Implementing the EDS interface . 7 1.2.3 Implementing a plug-in . 9 1.2.4 Developing or integrating a custom application . 11 1.2.5 Delivering mobile access . 13 1.2.6 Common use cases and their development options summary . 14 1.3 IBM Content Navigator development architecture. 18 1.3.1 Programming interfaces . 19 1.3.2 Communication flows . 20 1.4 Developing with IBM Content Navigator APIs . 23 1.4.1 URL API . 23 1.4.2 External data services. 24 1.4.3 Plug-in API . 27 1.4.4 Content Navigator JavaScript API. 47 1.5 IBM Content Navigator samples . 55 1.5.1 Sample external data service . 55 1.5.2 Sample web pages . 55 1.5.3 Sample plug-in application . 56 1.5.4 Sample mobile application . 57 1.5.5 Sample mobile plug-in. 57 1.6 Samples we developed for this book. 58 © Copyright IBM Corp. 2012, 2014. All rights reserved. iii 1.7 Conclusion. 60 Chapter 2. Customizing desktop appearance . 61 2.1 Customizing the desktop appearance . 62 2.2 Adding a logo and banner color . 62 2.3 Adding login notes. 65 2.4 Adding password rules . 68 2.4.1 Testing the password rules . 70 2.5 Conclusion. 72 Chapter 3. Setting up the development environment . 73 3.1 Prerequisites for plug-in development. 74 3.1.1 IBM Rational Application Developer . 74 3.1.2 Eclipse development environment . 75 3.1.3 WebLogic and Eclipse. 76 3.2 Setting up development environment . 76 3.2.1 Installing the Eclipse plug-in in base Eclipse environments . 77 3.2.2 Installing the Eclipse plug-in in Rational Application Developer . 77 3.2.3 Troubleshooting Eclipse plug-in installation . 78 3.2.4 Verifying Eclipse plug-in installation . 78 3.3 Plug-in development . 81 3.3.1 Creating a simple plug-in project using the wizard . 81 3.3.2 Creating plug-in extension . 85 3.3.3 Packaging and building a plug-in . 90 3.3.4 Registering and testing a plug-in. 94 3.4 Creating a new empty EDS project using the wizard . 101 3.5 Getting started with the SamplePlugin . 106 3.6 Building a plug-in JAR manually . 109 3.7 Debugging plug-ins . 110 3.7.1 Remote debugging . 110 3.7.2 Local debugging . 113 3.8 Conclusion. 113 Part 2. Customizing Content Navigator . 115 Chapter 4. Developing a plug-in with basic extension points. 117 4.1 Example overview . 118 4.2 Developing the Create Dossier action. 120 4.2.1 Setting up a new plug-in project . 120 4.2.2 Packaging and deploying . 121 4.2.3 Adding the action . 122 4.2.4 Implementing the action JavaScript . 124 iv Customizing and Extending IBM Content Navigator 4.2.5 Preparing ECM system and deploying current version . 127 4.3 Developing a plug-in service to create the substructure of the dossier. 133 4.3.1 Server type independent code: CreateSubStructureService . 136 4.3.2 IBM FileNet P8 code: CreateSubStructureServiceP8 . 138 4.3.3 IBM Content Manager code: CreateSubStructureServiceCM. 140 4.3.4 Deploying and verifying. 145 4.4 Developing the Open Dossier action. 145 4.4.1 Adding an action to the plug-in . 146 4.4.2 Extending the Action model . 147 4.4.3 Packing, deploying, and configuring . 152 4.4.4 Enhancing the Create Dossier action to also open the dossier . 156 4.5 Open dossier view in its own feature. 156 4.5.1 Adding the feature. 157 4.5.2 Deploying and configuring the feature . 158 4.5.3 Developing a dossier feature by using the browse feature . 159 4.6 Adding configuration . 161 4.6.1 Adding a configuration panel. 161 4.6.2 Adapting code to use configuration values . 167 4.7 Dossier management in the real world . 170 4.8 Conclusion. 170 Chapter 5. Building a custom repository search service . 173 5.1 Example overview . 174 5.2 Viewing results in ContentList widget . 174 5.3 Custom repository search service in sample.