Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Notes and Domino Application Development wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
API Documentation > XPages Extensibility API > XPages Library Versioning
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

XPages Extension Library - Dojo Grid & REST Services Controls

This video demonstrates the Dojo Grid and REST Services controls from the XPages Extension Library

XPages Extension Library - Application Layout & Page Navigator Controls

This video demonstrates the Application Layout and Page Navigator controls from the XPages Extension Library

XPages Extension Library - Value Picker & Dojo List TextBox Controls

This video demonstrates the Value Picker and Dojo List TextBox controls from the XPages Extension Library

XPages Extension Library - In Context Editing with the Dialog Control

This video demonstrates "In Context Editing with the Dialog Control" using the XPages Extension Library

XPages Extension Library - Overview

This video demonstration provides an overview of the XPages Extension Library
Community articleXPages Library Versioning
Added by ~Denise Feznilyynds | Edited by IBM contributor~Sanjay Eklutherettu on August 30, 2010 | Version 3
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
This article describes how to implement incremental releases (versioning) of an XPages library.
Tags: XPages, 8.5.2
ShowTable of Contents
HideTable of Contents
  • 1 Introduction
  • 2 Versioning
    • 2.1 Update the library class
    • 2.2 Mark the new tags

Introduction


This article is part of the XPages Extensibility API Developers Guide.

This article describes how to implement incremental releases (versioning) of an XPages library. It is assumed that you have an existing XPages library containing some extensions; if not, please start with the article "Creating an XPages Library". Suppose in the latest release of an XPages library, there are some new features that are not available in the previous release. If an application uses the new features on a server that only has the previous release of the library then the application will fail to run. XPages library versioning provides a more descriptive message instead; explaining that a later version of the library is required.

With Versioning

Versioning can be applied to extensions which create and contribute XPages tag elements to the library. The supported definition elements are:
  1. attribute
  2. complex-type
  3. component
  4. composite-component
  5. converter
  6. property
  7. validator

There are two steps to implement versioning in XPages libraries:
  1. Set the tag version of the library (getTagVersion) to the latest release
  2. In the xsp-config file, mark the new tags with the latest release version using the since element

There is a runtime check when an XPage uses a tag marked with a release version. If the library method getTagVersion does not return the tag's release version or later, then it is assumed that the initial version of the library is installed and the application will fail to run.

In the first release of a library, the method getTagVersion can return null and the initial tags do not need to be marked with a release version. However, if subsequent releases of the library contain new features then they must define their version.

Versioning


Update the library class


In the library class, implement the method getTagVersion to return the latest release version.


package com.example.library;

import com.ibm.xsp.library.AbstractXspLibrary;

public class ExampleLibrary extends AbstractXspLibrary {

  public String getTagVersion() {
    return "2.0.0";
  }

  public String getLibraryId() {
    return "com.example.library";
  }

  public String getPluginId() {
    return "com.example.xsp";
  }

  public String[] getXspConfigFiles() {
    return new String[] {
      "META-INF/exampleExtensions.xsp-config",
    };
  }

  public String[] getFacesConfigFiles() {
    return new String[] {
      "META-INF/example-faces-config.xml",
    };
  }
}


Once some tags are marked with a release version, the method getTagVersion should be updated to return that version or later.

Mark the new tags


When developing later releases of your library, new features must be marked with the latest release version using the element since in the xsp-config file. New features are marked by adding the element since to their respective definition extension element.


<component>
  <description>An example control.</description>
  <display-name>Example Control</display-name>
  <component-type>com.example.examplecontrol</component-type>
  <component-class>com.example.component.ExampleControl</component-class>

  <component-extension>
    <since>2.0.0</since>
    <tag-name>exampleControl</tag-name>
    <component-family>com.example.examplecontrol</component-family>
    <renderer-type>com.example.examplecontrol</renderer-type>
  </component-extension>
</component>


These are the respective extension elements for the supported definitions.
  1. attribute-extension
  2. complex-extension
  3. component-extension
  4. composite-extension
  5. converter-extension
  6. property-extension
  7. validator-extension

When adding a new tag, the since element should only be added to the tag itself, not to all the new properties within the tag. However, when adding a new property to an existing tag, the since element should only be added to the new property.

For further information, you may read the article "XPagesPageVersions.htmCreate New Article" which explains how page versioning works in the XPages runtime. Library Tag Versioning uses a similar mechanism.

  • Actions Show Menu▼


expanded Attachments (1)
collapsed Attachments (1)
Edit the article to add or modify attachments.
File TypeSizeFile NameCreated OnDelete file
image/jpeg 20 KB withVersioning.jpg 8/23/10, 3:28 PM
expanded Versions (3)
collapsed Versions (3)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (3)Aug 30, 2010, 11:06:01 AM~Sanjay Eklutherettu  IBM contributor
2Aug 25, 2010, 8:39:42 AM~Phil Fezhipivitchader  IBM contributor
1Aug 25, 2010, 7:45:16 AM~Ted Chukrotheroni  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL
  • Privacy
  • Accessibility