CentraSite 10.7 | CentraSite Developer's Guide | Customizing CentraSite | Customization of CentraSite Control | Setting Preferred Plug-in and Order of Plug-ins
 
Setting Preferred Plug-in and Order of Plug-ins
You can adapt the URL used to invoke the pluggable user interface with a preferred plug-in by appending a query parameter such as
PLUGIN=com.centrasite.control
So the modified URL will be: http://localhost:53307/PluggableUI/servlet/StartCISPage?PAGEURL=/PluggableUI/​Login.html&PLUGIN=com.centrasite.control&LOCALE=en
The value of the PLUGIN parameter must match the value of the id parameter of a <plugin> root element in one of the plug-ins. This sets the preferred plug-in.
This implies that for all extensions for a specific extension point, the extensions belonging to the referenced plug-in is first in order (normally the order is determined by the order attribute in the plug-in configuration file).
For any extension point, the order of the associated extensions is determined by the following properties:
*The processing order of the plug-ins is controlled by the value of the order attribute of <plugin> in the plugin.xml file. Plug-ins with a smaller value of the order attribute are processed first. The preferred plug-in is always processed first.
*The order of extensions, as configured in plugin.xml, for the associated extension point.
Depending on the extension point, the order of the extensions has a specific impact, for example:
*The login screen displayed when the user interface is started in the browser.
*The initial perspective shown after login.
Installing and Uninstalling Plug-ins
Directory Structure
The plug-in environment is contained in a directory structure under the installation directory <RuntimeWebAppsDir> of the Software AG Runtime.
Under <RuntimeWebAppsDir>\PluggableUI we have the following structure:
WEB-INF/
classes/
log4j.xml
lib/ //JARs
 
cis/
 
HTMLBasedGUI/
 
PluggableUI
plugin.xml
*.html
 
accesspath/
xml/ // layout definitions
images/
 
CentraSiteControl
plugin.xml
*.html
*_SWT.xml
 
accesspath/
xml/ // layout definitions
images/ // icons
lib/ // JARs
classes/ // class files
 
MyPlugIn
plugin.xml
*.html
*_SWT.xml
 
accesspath/
xml/ // layout definitions
images/ // icons
lib/ // JARs
classes/ // class files
The structure includes a sample user-written plug-in MyPlugIn for illustration purposes.
*Installing a Plug-in
A plug-in should be provided as a ZIP archive with the directory structure.
The following actions need to be performed when installing a plug-in manually:
*Check for availability of other plug-ins.
*Copy files (except the plugin.xml configuration file) into the directory structure.
*Compile layout definitions.
Note:
Using the plug-in may require a restart of the Software AG Runtime.
*Uninstalling a Plug-in
The following actions need to be performed to uninstall a plug-in manually:
*Before you uninstall a plug-in, ensure that it is not required by another plug-in.
*Remove the plug-in configuration file plugin.xml.
*Remove the plug-in directory, for example MyPlugIn.
Note:
It might not be possible to remove files if they are in use, for example, while the application server is running.
Plug-In Management Perspective
A separate Plug-In Management perspective offers the following functions:
Function
Description
Invoke via...
Install Plug-In
Import a ZIP-file containing all required files for a plug-in
Button in toolbar
Table of Plug-ins
Similar to the About dialog
Select a node in the Plug-Ins topic
Uninstall Plug-In
Check which other plug-ins rely on the plug-in to be uninstalled. If there are no dependencies, the plug-in is uninstalled.
Select the plug-in in the table and select the command from the context menu
Compile Layouts
Required when the underlying Application Designer runtime is upgraded
Select plug-in in table and select command from context menu
Start the Application Designer layout editor
Button in toolbar
The Plug-In Management perspective is not visible by default. It is only visible if you set the preferred plug-in using PLUGIN=com.softwareag.cis.plugin in the URL that is used to start the GUI.
Example:
http://localhost:53307/PluggableUI/​servlet/StartCISPage?PAGEURL=/PluggableUI/Login.html&PLUGIN=com.softwareag.cis.plugin&LOCALE=en