Version 9.6
 —  CentraSite Control Pluggable Architecture  —

Customizing Content Pages


Extension Points

An extension point is characterized by the following properties:

An extension point provides the name of a class that implements the interface and property values. In general, if there is an abstract base class, its usage is strongly encouraged.

The available extension points are described in the following sections.

I18N for Layouts

Usage Use this when the layout of a plug-in needs to be localized.
Attributes
  • point="com.softwareag.cis.plugin.i18n"

  • id

  • class

  • project (name of the plug-in directory)

  • prefix (as used by messages)

  • file (name of the property file to be used)

Interface I18NHandler

Standard class

Common18NHandler

Processing

Class I18NManager inside PluggableUI handles this extension point. If an I18Message or a text ID in a layout definition (as created using the Application Designer) refers to a source ID that starts with the given prefix, the I18Manager will attempt to resolve this reference using the given property file. In the case of a text ID, the corresponding layout must be part of the plug-in whose directory is indicated by the project attribute.

Provided by PluggableUI
Example
<extension point="com.softwareag.cis.plugin.i18n" 
     id="CentraSiteControl"
     class="com.softwareag.cis.plugin.ext.Common18NHandler"
     project="CentraSiteControl"
     prefix="INMCS"
     file="com.centrasite.control.adapters.util.INMMessages"
     >
</extension>

Parameters for Plug-ins

Usage
  • Use this to get parameters for a plug-in.

Attributes
  • point="com.softwareag.cis.plugin.parameter"

  • id

  • value

Interface No interface to be implemented.
Processing Use the plug-in call ApplicationContext.getParameter() to obtain value.
Provided by PluggableUI
Example
<extension point="com.softwareag.cis.plugin.parameter" 
     id="welcomePageDefault" 
     value="true">
</extension>

ConnectionHandler - Logon and Logoff / Exit

Usage
  • Use at the start or end of a session of CentraSite Control .

Attributes
  • point="com.softwareag.cis.plugin.connectionHandler"

  • id

  • value

Interface

ConnectionHandler

  • void init (CommonAdapter ca)

  • void connect (Credentials c, CommonAdapter ca) throws Exception

  • void notifyConnected (CommonAdapter ca)

  • boolean isConnected()

  • void prepareDisconnect (CommonAdapter ca) throws Exception

  • void disconnect (CommonAdapter ca);

Processing
  • Logon:

    • Obtain credentials from the login screen

    • Call connect(Credentials) for each extension

    • If an exception occurs:

      • Show a popup with the exception

      • Disconnect each extension which is already connected

      • Restart

    • If all successful: start the workplace

  • Logoff:

    • Call prepareDisconnect() for each extension

    • If an exception occurs:

      • Show a popup with the exception

      • Done

    • Disconnect each extension which is already connected by calling the disconnect() method

Provided by PluggableUI
Example
  <extension point="com.softwareag.cis.plugin.connectionHandler" 
             id="login"
             class="com.centrasite.control.ext.CentraSiteConnectionHandler">
  </extension>

Perspectives

Perspectives allow certain predefined screen layouts to be stored. When several perspectives are defined, it is possible to switch from one to the other easily.

The Perspective button will only be shown if more than one perspective is available. When you click the button, a popup dialog appears, which allows you to select the required perspective.

The perspective can be switched in two ways:

Multiple perspectives will be represented in a way that the union of the corresponding topics is displayed on the right hand side. The header will be changed depending on the perspective to which the currently selected topic belongs.

The following features are provided for perspectives:

Usage
  • Each plug-in may contribute a perspective to contain its own topics or the topics of other plug-ins (see next section)

Attributes
  • point="com.softwareag.cis.plugin.perspective"

  • id

  • class

Interface

Perspective

  • String getTitle()

    ( used in dynamically generated Select Perspective dialog)

  • String getImageURL()

    (used to represent a perspective by an icon in the Select Perspective dialog)

  • Toolbar:

    • ICONLISTInfo getToolbar()

  • Logo

    • String getLogoImageURL ()

      (used for header frame)

  • Handling of the View listbox:

    • String getViewLabel()

    • String[] getViewValues()

    • String getView()

      (returns the currently selected view)

    • void setView(String view)

      (called when the user changes the view selection)

  • Default layout used for perspective background

    • String getWorkplaceDefaultLayout();

      (used for background of workplace if no activity is opened)

Abstract base class

AbstractPerspective

Provided by PluggableUI
Example

(CentraSite Control/plugin.xml)

<extension point="com.softwareag.cis.plugin.perspective" 
     id="controlPerspective"                                   <---+
     class="com.centrasite.control.ext.ControlPerspective">        |
</extension>                                                       |
<extension point="com.softwareag.cis.plugin.topic"                 |
     id="registry"                                                 |
     perspective="com.centrasite.control.controlPerspective"    ---+
     class="com.centrasite.control.ext.ImportantTypesTopic">
</extension>

If a perspective is selected for display, all topics belonging to that perspective become visible. If one of these perspectives is selected in the navigation pane, the content of the header frame is adjusted with respect to the toolbar, the View listbox and the visible logo.

Topic

Usage
  • Add a topic in the navigation view.

Attributes
  • point="com.softwareag.cis.plugin.topic"

  • id

  • perspective (see the section Perspectives)

  • class

Interface

Topic

  • String getImageURL()

  • boolean isVisible()

    (used when switching views)

Abstract base class AbstractTopic
Processing
  • When starting the user interface, a topic is added to the active perspective for each known extension that refers to the perspective.

  • The first topic is selected.

  • When switching to a different topic, replace the content of the HEADER frame according to the data provided by the corresponding perspective.

Provided by PluggableUI
Example
<extension point="com.softwareag.cis.plugin.topic" 
     id="registry"
     perspective="com.centrasite.control.perspective"
     class="com.centrasite.control.ext.ImportantTypesTopic">
</extension>

Command for Item

Usage
  • Add a command to a menu.

Attributes
  • point="com.centrasite.control.itemCommand"

  • id (default: name of implementing class)

  • class

Interface

ExtensionCommand

  • boolean appliesTo (Item)

  • String getName()

  • String getImageURL()

  • int getCategory()

    (used for grouping of commands)

  • abstract void execute(ActionContext actionContext)

Abstract base class

AbstractExtensionCommand
Processing
  • When a list of commands for a menu item is retrieved (e.g. for context menu or toolbar), the following steps are performed for each known extension:

    • create an instance of class and invoke appliesTo(Item).

    • If "true" is returned, the command is added to the list.

Provided by CentraSite Control
Example
<extension point="com.centrasite.control.itemCommand" 
     id="test"
     class="com.centrasite.control.extpt.junit.DisplayRegObjKeyCommand">
</extension>

Bulk Command for Items

Usage
  • Add a command to a menu in which bulk actions are permitted.

Attributes
  • point="com.centrasite.control.itemBulkCommand"

  • id (default: name of implementing class)

  • class

Interface

ExtensionCommand

  • boolean appliesTo (Item)

  • String getName()

  • String getImageURL()

  • int getCategory()

    (used for grouping of commands)

  • abstract void execute(ActionContext actionContext)

Abstract base class

AbstractExtensionCommand
Processing
  • When a list of commands for a menu item is retrieved (e.g. for context menu or toolbar), the following steps are performed for each known extension:

    • create an instance of class and invoke appliesTo(Item).

    • If "true" is returned, the command is added to the list.

Provided by CentraSite Control
Example
<extension point="com.centrasite.control.itemBulkCommand" 
     id="test"
     class="com.centrasite.control.extpt.junit.DisplayRegObjKeyCommand">
</extension>

Add Property

Usage
  • Add a property to a registry object.

Attributes
  • point="com.centrasite.control.registryObjectProperty"

  • d

  • class

  • (boolean) visible by default

Interface

ExtensionPropertyAccessor

  • boolean appliesTo (String objectTypeQName, Connector con)

  • String getDisplayName(Locale locale)

  • String getDescription(Locale locale)

  • String getInternalName()

  • boolean getVisibleByDefault()

  • String getValue(Item item) throws Exception

  • void setValue(Item item, String value) throws Exception

Abstract base class

AbstractPropertyAccessor (must be explicitly implemented)

Processing
  • When opening a report, all extensions are checked whether they want to contribute.

  • The corresponding accessors are added to the report.

Provided by

CentraSite Control

Example
<extension point="com.centrasite.control.registryObjectProperty" 
     id="test"
     class="com.centrasite.control.extpt.junit.LastModifiedPropertyAccessor">
</extension>

Note:
Additional columns might also show up in upper table of the General tab.

Tab in Detail View

Usage
  • Add a tab in the detail view of an object.

Attributes
  • point="com.centrasite.control.detailViewTab"

  • id

  • class

Interface

DetailViewTab

  • String getTitle()

  • String getImageURL()

  • String getLayout()

  • void initAdapterFor (Item, DetailViewTabAdapter)

  • protected String getAdapterClass();

  • boolean appliesTo (Item)

    (If this is returned, the tab will be displayed for the corresponding Item if isVisible() returns true as well, otherwise the tab will not be displayed)

  • void setDetailsTabContext (DetailTabContext)

  • boolean isVisible(Item)

Abstract base class

AbstractDetailViewTab
Processing
  • If the detail view for an Item is opened, it is checked for each known extension.

    • Create an instance of class and invoke appliesTo(Item). If "true" is returned, getLayout() is invoked and the layout is added as a tab. The respective adapter will be created implicitly by the Application Designer when processing the layout.

    • The title of the tab is set with the result from calling getTitle().

    • Currently, items on tabs are not supported. Hence, the result from getImageURL() is ignored.

Provided by CentraSite Control
Example
<extension point="com.centrasite.control.detailViewTab"
     id="lifecycle"
     class="com.centrasite.control.lifecycle.LifeCycleDetails"
>
</extension>

Add Source of Notification

Usage
  • Add a source of a notification.

Attributes
  • point="com.centrasite.control.addRowToMyNotifications"

  • id (default: name of implementing class)

  • class

Interface

ReportExtensionItemsProvider

  • Collection getItems() throws Exception;

  • void setConnector(Connector connector);

  • boolean isContributedItem(Item item);

  • String getChangedImageURL (Item item);

Abstract base class

AbstractReportExtensionItemsProvider
Processing
  • The extension is initialized via the setConnector() method.

  • Obtain all items to be added to the list of items with pending notification via the getItems() method.

  • isContributedItem() can be used to check whether this extension has contributed the given item via getItems().

  • getChangedImageURL() is used to control the icon representing the reason for the notification.

Provided by CentraSite Control
Example
<extension point="com.centrasite.control.addRowToMyNotifications" 
     id="MyNotificationsApprovalItemsProvider"
     class="com.softwareag.centrasite.control.lms.ext.
                  MyNotificationsApprovalItemsProvider">
</extension>

Impact Analysis: NodeDecorator

Usage
  • Change the visual representation of registry objects

Attributes
  • point="com.centrasite.control.assocNavigatorNodeDecorator"

  • id (default: name of implementing class)

  • class

Interface

NodeDecorator

  • String getImageURL(Item)

Abstract base class

(none)
Processing
  • If the item is to be rendered in Impact Analysis, check all known extensions to determine if they contribute to the item's visualization;

    • If getImageURL(item) returns null: check for the next extension

    • otherwise: use the URL being returned for secondary icon within visualization of node in graphical impact analysis.

Provided by CentraSite Control
Example
<extension point="com.centrasite.control.assocNavigatorNodeDecorator" 
     id="ExternalLinkNodeDecorator"
     class="com.centrasite.control.ext.ExternalLinkNodeDecorator">
</extension>

The following picture illustrates how ExternalLinks objects are decorated with icons representing the type of the object they are referencing:

graphics/image033.png

Append Root Node to Topic

Usage
  • Append a root node to an existing topic.

Attributes
  • point="com.centrasite.control.topicItems"

  • id

  • class

Interface

TopicItems

  • boolean appliesTo (Topic)

  • Collection getItems()

Abstract base class

AbstractTopicItems
Processing
  • For each topic whose implementation class is derived from a class named BaseTopic (true for all topics contributed by CentraSite Control) it is checked whether there are any extension for the topicItems extension point. Each extension whose appliesTo() method returns "true", the collection of Item objects returned by getItems() is appended to the set of root nodes for the corresponding topic.

Provided by CentraSite Control
Example
<extension point="com.centrasite.control.topicItems" 
     id="filesystem"
     topic="com.centrasite.control.administration"
     class="com.centrasite.control.ext.junit.FileSystemTopicItems">
</extension>

Note:
Here, the FileSystemTopicItems extension is an extension of the base class AbstractTopicItems whose appliesTo() method returns "true" if the value of the topic attribute matches the ID of the topic being passed.

Replace Standard Detail View by another Editor

Usage
  • Add an editor that can be configured per object type, even per object instance.

Attributes
  • point="com.centrasite.control.itemEditor"

  • id (default: name of implementing class)

  • class

Interface

ItemEditor

  • public boolean appliesTo (Item item, Connector connector);

  • public String getLayout();

  • public String getTitle(Item item);

  • public String getAdapterClass();

    (must return a class implementing the ItemEditorAdapter interface)

Abstract base class

AbstractItemEditor
Processing
  • If appliesTo() returns true, the editor will be used when opening the detail for the item being passed:

    • The given adapter class will be instantiated and initialized.

    • The given layout (=pageURL) is opened in the CONTENT frame on the right hand side.

    • The title returned by getTitle() is used as the label for the activity.

Provided by CentraSite Control
Example
<extension point="com.centrasite.control.itemEditor" 
     id="DataType"
     class="com.softwareag.centrasite.ext.DataTypeEditor">
</extension>

Extend Search Dialog by Additional Conditions

Usage
  • Extend the search dialog by additional conditions, for example, you can add specific search predicates for your own object types.

Attributes
  • point="com.centrasite.control.searchPredicate"

  • id

  • class

Interface

PredicateEditor

  • Predicate getPredicate()

    (Get predicate to be added by this editor)

  • String getLayout()

    (Get URL of layout to be rendered)

  • String getAdapterClass()

    (Get name of adapter class to be used for rendering, must be a subclass of AbstractPredicateAdapter)

  • String getPredicateClass()

    (Get name of predicate class to be used for rendering, must be a subclass of AbstractPredicate)

The interface Predicate (many implementing classes are already available in CentraSiteUtils.jar) with its abstract subclass AbstractPredicate has the following methods

  • boolean appliesTo(String objectTypeValue, CentraSiteQueryManager qm)

    (Check whether this predicate applies to objects of given object type)

  • String getInternalType ()

    (Get unique internal string representation of type of predicate; not to be localized. You may use a namespace-like notation for your own.)

  • String getDisplayType ()

    (Get human readable localized representation of type of predicate; CentraSite Control will // display it on the left hand side in the Add Condition dialog)

  • void validate() throws InvalidPredicateException

    (Validate parameters set for this predicate. The InvalidPredicateException should contain a localized message text)

  • String getDisplayString () throws Exception

    (Get human readable localized string representation of predicate including values predicate; CentraSite Control will display it in the condition table in the header section of the Search Registry dialog)

  • boolean requiresEnterpriseLicense()

    (Check whether this predicate requires an Enterprise license)

  • void addTo (BusinessQuery bq) throws JAXRException

    (Add contribution of predicate to given BusinessQuery. This is the worker method applying the predicate to the search result.)

AbstractPredicate also provides implementations for the following methods

  • Used for I18N support

  • Locale getLocale()

  • Void setLocale(Locale)

  • used for persisting predicates as part of queries.

  • String toXML ();

  • void setFromDom(Element predicateEement, Connection connection)

  • used to initialize the search dialog with readonly predicates / conditions which can neither modified or removed:

  • void setReadOnly(boolean readOnly);

  • boolean isReadOnly();

Abstract base class

AbstractPredicateEditor
Processing
  • When you click the appropriate button, this invokes the user-defined Adapter (layout) screen for entering custom search related settings.

    • Create an instance of the class

    • Execute

Provided by CentraSite Control
Example
<extension point="com.centrasite.control.searchPredicate" 
     id="ObjectTypePredicateEditor"
     class="com.centrasite.control...ObjectTypePredicateEditor">             
</extension>

Download Documents

There is a menu entry in each asset's context menu that allows you to create a zipped archive of the asset and optionally any attached documents, and to download the zipped archive to the file system. You can customize the way in which the download feature behaves:

Making the download menu entry visible/invisible for guest users

If a user with the Guest role can access an asset and view its context menu, the context menu entry Download Document is visible by default. You can specify whether this entry is visible or invisible for such users as follows:

Start of instruction setTo make the download menu entry visible/invisible for guest users

  1. Locate the configuration file plugin.xml in the <RuntimeDir>\workspace\webapps\PluggableUI\CentraSiteControl directory.

  2. Open the file and locate the entry:

    <extension point="com.softwareag.cis.plugin.parameter"
     id="guestCanDownloadDocuments" value="true" />
  3. To make the context menu entry invisible for guest users, change "true" to "false" and restart Software AG Runtime. Similarly, if the context menu entry is already invisible and you want to make it visible for guest users, set the value to "true" and restart Software AG Runtime.

Changing the text string displayed in the context menu

The text string displayed in the context menu is by default "Download Document". If you wish to change this, you can do so by extending the CentraSite Control functionality via the extension point downloadDocumentCommand. This extension point has the following definition:

Usage
  • Change the text string displayed in the context menu for downloading an asset.

Attributes
  • com.centrasite.control.downloadDocumentCommand

  • id (default: name of implementing class)

  • class

Interface

See the sample code.

Abstract base class AbstractExtensionCommand
Provided by CentraSite Control
Example

See the sample code.

To change the text displayed for the context menu, your implementation of the extension point must define a method getName() of type String. The return value of this method is the text that will be displayed in the context menu.

You can find sample code for defining the extension point in the file DownloadDocumentCustomCommand.java that is provided in the demo folder under the CentraSite installation folder.

Changing the format of the zipped archive

By default, the zipped archive contains the folder structure of the asset and its attached documents. If you wish to change this, you can do so by extending the CentraSite Control functionality via the extension point downloadDocumentCommand. The definition of the extension point is given above.

To change the format of the zipped archive, your implementation of the extension point must define a method that extends the base class DownloadOperation.

You can find sample code for defining the extension point in the files DownloadDocumentCustomCommand.java and DownloadCustomOperation.java that are provided in the demo folder under the CentraSite installation folder.

Attach Documents

Some assets include file-related attributes that allow you to attach supporting document(s) such as programming guides, sample code and script files with the asset. When trying to attach a supporting document with an asset, CentraSite Control displays the available documents underneath their respective organization directory by default. If you wish to change this (that is, simply display the documents by the side of its organization directory), you can do so by extending the CentraSite Control functionality via the extension point attachDocumentCommand.

Start of instruction setTo customize the document layout:

  1. Locate the configuration file plugin.xml in the <RuntimeDir>\workspace\webapps\PluggableUI\CentraSiteControl directory.

  2. Open the file and locate the entry:

    <extension point="com.softwareag.cis.plugin.parameter" id="isCustomAttachDocument" value="false" />
    <extension point="com.centrasite.control.attachDocumentCommand" id="AttachDocumentCustomCommand" class="com.centrasite.control.extpt.AttachDocumentCustomCommand" />

    Where com.centrasite.control.extpt.AttachDocumentCustomCommand is the name of the abstract base class that implements the interface.

  3. To define your custom document layout, change "false" to "true" and restart Software AG Runtime. Similarly, if the document layout is already customized and you want to revert back to the standard layout, set the value to "false" and restart Software AG Runtime.

Usage
  • Use this to define a custom layout of the documents while attaching to an asset via the Attach Document dialog.

Attributes
  • com.centrasite.control.attachDocumentCommand

  • id (default: name of implementing class)

  • class

Interface

See the sample code.

Abstract base class AbstractExtensionCommand
Processing
  • When you click the appropriate button, this invokes the user-defined Adapter (layout) screen displaying all documents that are available for attaching to an asset.

    • Create an instance of the class

    • Execute

Provided by CentraSite Control
Example
<extension point="com.centrasite.control.attachDocumentCommand" id="AttachDocumentCustomCommand" class="com.centrasite.control.extpt.AttachDocumentCustomCommand" />

You can find sample code for defining the extension point in the files AttachDocumentCustomCommand.java , AttachFile.xml and AttachFileAdapter.java that are provided in the demo folder under the CentraSite installation folder.

Top of page

Activating the IDE

The CentraSite distribution kit contains an IDE (integrated development environment) that you can use to create and design a layout page. The IDE is a web application whose clients run inside a web browser. The URL (assuming installation defaults) to start the IDE on a machine where CentraSite is installed is:

http://localhost:53307/PluggableUI/HTMLBasedGUI/workplace/ide.html

The IDE is deactivated by default. In order to activate the IDE, set the attribute plugindevelopment in the file cisconfig.xml to "true". This file is located in the CentraSite Control web application (in the Application Server or Software AG Runtime location) in the folder cis/cisconfig.

The following example illustrates the required configuration setting:

<cisconfig plugindevelopment="true" ...>
 ...
</cisconfig>

Security Considerations

When activated, the IDE and included development tools do not require further authentication. The following example illustrates the security-constraint and login-config elements to protect the IDE and development tools with the HTML basic authentication method.

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Plugin Development</web-resource-name>
            <url-pattern>/HTMLBasedGUI/workplace/*</url-pattern>
            <url-pattern>/servlet/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>developer</role-name>
        </auth-constraint>
    </security-constraint>
    <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>Plugin Development</realm-name>
    </login-config>

In order to protect passwords transmitted in clear text between a browser and development tools running on the application server, it is recommended to protect the communication through the use of SSL. For information about SSL, refer to the section Configuring Secure Communication between CentraSite Components in the document Basic Operations.

Top of page

Step-by-Step Guide

A step-by-step guide of how to create customized plug-ins for the CentraSite Control content pages is provided in Appendix A: Step-by-Step Guide.

Top of page