Ad103 - Have it Your Way: Extending IBM Lotus Domino Designer


Published on

With release 8.5.1, the new Lotus Domino Designer Extension API supports custom extensions to operate on selections of design elements. We'll details several sample applications; 1) validate references to views, forms, etc in XPages and Custom controls, 2) re-factoring tool to rename a design element and update references, 3) synchronize files between NSF and local file system (stylesheets, etc) and 4) select a form, create view with all fields from the form. We'll provide boilerplate code for common types of plugins, so you can just add your own code. You'll see how
to control whether your extension is visible/enabled based on selection contents - visit for more! After attending this session, you can make your own contributions!

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Ad103 - Have it Your Way: Extending IBM Lotus Domino Designer

  1. 1. AD103 Have It Your Way: Extending IBM Lotus® Domino® Designer Andre Guirard | Product Developer Xin Rang Wang ("Grace") | Software Engineer
  2. 2. Agenda ● Eclipse-based Domino® Designer Architecture ● What you will need ● The Designer Extensibility API ● Example applications ● Demonstration ● Q&A 2
  3. 3. Extensibility in Domino Designer ● Extend Domino Designer. ▬ Use Eclipse development skills to create plug-in in Java™. ▬ Or, integrate existing Eclipse based plug-in ▬ Create ● Publish your Designer plug-in to ▬ Please! ● Or sell them for $$$
  4. 4. Designer and Eclipse ● Eclipse: Lotus rich client technology Lotus Lotus Lotus Expeditor Domino Notes Sametime (standalone) Designer Lotus Expeditor Eclipse 3.4 Foundation
  5. 5. What You Will Need ● Eclipse 3.4 or later development environment (FREE!) ● Eclipse plugin development skills ● Domino Designer 8.5.1 or later
  6. 6. Capabilities of Designer Extensibility API ● Let custom plugins tell what's selected ▬ Which Notes application ▬ Which design elements ▬ (if no design elements) which navigator heading or design list ▬ Whether a core editor window has focus ● Get / set basic properties (title, alias, template name, etc.) ● Combine with Notes Java API (lotus.domino.*) and DXL, to manipulate design elements in other ways.
  7. 7. Other Things You Can Do Just Because it's Eclipse ● Combine with Eclipse standard interfaces, listeners and extension points to build onto the UI. ▬ e.g. Register code to run when selection changes, or when something is saved. ● Get the project path of a database and open it on screen. ● Get / set the “contents” of a file-based design element ● Get / set DXL of other design elements ● Open a design element for editing using its resource path ● Add preference page to control the configuration of your new plugin ● ... whatever else you know how to do with Iresource/IFile/IProject/ViewPart/EditorPart. ● Integration with other, non-Domino related plugins. ● Etcetera
  8. 8. Limitations of new API ● Only gives access to subset of design element & database properties. ▬ Use lotus.domino.* classes, DXL for other properties. ● Can’t detect selection in "core windows" below design element level ▬ E.g. can’t tell which column is selected while editing a view. ▬ But you can tell you’re editing a view, and which one.
  9. 9. Core Window ● The "old style" design element editors
  10. 10. Eclipse-based Editor ● The newer design elements and new LotusScript editor
  11. 11. Demo Use Cases ● Selection tracker ● Assign Comment on Multiple Design Elements ▬ etc... ● Create View From Form ● Refactor plugin for Domino Designer ● References validation plugin for Domino Designer ● Import/Export plugin for Domino Designer 11
  12. 12. Extensibility API Classes/Interfaces ● Class DesignerResource ▬ Static methods for working with Designer selections and objects ● Interface DesignerDesignElementSelection ▬ The description of “what Domino- based elements are selected”. ● Interface DesignerProject ▬ IProject object representing “Notes Database” ● Interface DesignerDesignElement ▬ Object representing “Notes design element” ● Class DesignerException ▬ Exception object for all problems using methods of DesignerDesignElement and DesignerProject ● Property tester* ▬ What sort of thing is selected? 12
  13. 13. Context Menu extension – Design Element
  14. 14. Context Menu extension – Design Element org.eclipse.ui.popupMenus org.eclipse.core.resources.IFile
  15. 15. Context Menu extension – Application
  16. 16. Context Menu Extension – Application org.eclipse.ui.popupMenus org.eclipse.core.resources.IProject
  17. 17. To Make Menu Appear (only) in Designer <extension point="org.eclipse.ui.perspectiveExtensions"> <perspectiveExtension targetID=""> <actionSet id="ID of your action set which is defined elsewhere"> </actionSet> </perspectiveExtension> </extension>
  18. 18. Controlling Menu/Control Enablement ● Enable when selection is anywhere in a Domino application: ▬ <enablement> <reference definitionId="" /> </enablement> ● Enable when exactly one form is selected: ▬ <enablement> <with variable="selection"> <test property="" value="1,forms" /> </with> </enablement>
  19. 19. DesignerResource static DesignerDesignElement getDesignElement(IResource resource) Convert IResource to Notes design element. static DesignerProject getDesignerProject(IProject project) static getDesignerSelection(ISelection selection) DesignerDesignElementSelection Returns object with info about everything Domino-related in current selection. static IResource getResourceFromEditor(IEditorPart part) Answers the question “What design element am I editing here?” static DesignerProject openDesignerProject(java.lang.String server, java.lang.String filepath) Kicks off a background process that adds a bookmark to the Notes application into Designer. 19
  20. 20. Interface DesignerDesignElementSelection java.lang.String getCategory() int getDesignElementCount() java.lang.String getDesignElementType() java.util.List<DesignerDesignElement> getSelectedDesignElements() DesignerProject getSelectedDesignerProject() boolean isDominoProjectSelected() 20
  21. 21. Interface DesignerProject java.lang.String getDatabaseTitle() (also set!) java.lang.String getServerName() java.lang.String getDatabaseName() The filepath of the application. java.lang.String getReplicaId() void refresh() Update UI to reflect recent changes. java.lang.String getInheritTemplateName() (also set!) Which template this application inherits its design from (null=none). java.lang.String getMasterTemplateName() (also set!) If application is a template, "template name" by which other applications can inherit its design (null = none). DesignerDesignElement getDesignElement(IPath path) To get an object to work with a design element even if it's not selected. boolean isMultiLingual() boolean isDesignHidden() ... 21
  22. 22. Interface DesignerDesignElement java.lang.String getName() (also set!) java.lang.String getAlias() (also set!) Multiple aliases delimited with “|” java.lang.String getComment() (also set!) The filepath of the application. java.lang.String getNoteId() IResource getResource() boolean isProhibitRefresh() (also set!) Whether design element protected from design refresh/replace. java.lang.String getDesignElementTemplateName() (also set!) If design element inherits design individually from a template, which template. java.lang.String getDesignElementType() String from IMetaModelConstants telling whether this is a form, view or what. java.lang.String getLanguage() ... 22
  23. 23. you’d like to see a demonstration. Click to edit the title text format So why don’t we just do that?
  24. 24. References ● Domino Designer help contains javadoc ● Look for upcoming article on Designer Wiki ▬ ● Download demos from ▬ Search for “extensibility” ● Eclipse help site ▬
  25. 25. Legal Disclaimer © IBM Corporation 2009. All Rights Reserved. The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International Business Machines Corporation in the United States, other countries, or both. Unyte is a trademark of WebDialogs, Inc., in the United States, other countries, or both. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. 25