Overview

Nsys plugin modules allow add-ons to extend the functionality of the UCW Platform. Nsys plugin modules are commonly used to extend the user interface by adding links, tabpanels, dashboards, reports, etc. Plugin modules for UCW platform such as support of new devices for management and monitoring, sensor types for data processing, new storage systems for data streams and more can be found here.

Using Nsys plugin modules

You can use a Nsys plugin module by declaring it in your plugin (add-on) descriptor, with the appropriate properties. For example, the following code uses a navigation section and navigation item to add a 'UCW Dashboard’ menu to the main navigation.

nsys-plugin.xml
<navigation-section key="ucw-portal-tutorial_nav-main_demo" name="UCW Demo" location="system.top.navigation.bar/ucw.demo" weight="1000">
    <label>UCW Demo</label>
    <description>UCW Demo Examples</description>
</navigation-section>

<navigation-item key="ucw-dashboard_nav-main_dashboard" name="UCW Dashboard" section="system.top.navigation.bar/ucw.demo" weight="0">
    <label>UCW Dashboard</label>
    <link>/dashboard/view/ucw-dashboard</link>
</navigation-item>

List of modules

Navigation Section

Navigation Section plugin module allow plugins to define new sections in application menus. Each section can contain one or more links.

nsys-plugin.xml
<navigation-section key="ucw-portal-tutorial_nav-main_demo" name="UCW Demo" location="system.top.navigation.bar/ucw.demo" weight="1000">
    <label>UCW Demo</label>
    <description>UCW Demo Examples</description>
    <conditions>
        <condition class="org.nsys.portal.conditions.UserIsLoggedInCondition" />
    </conditions>
</navigation-section>

The root element for the Navigation Section plugin module is navigation-section It allows the following attributes and child elements for configuration:

Attributes

NameDescription
keyThe unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code or JavaScript resources.
nameThe human-readable name of the plugin module. Only used in the plugin's administrative user interface.
locationThe location into which this navigation item should be placed.
weightDetermines the order in which navigation items appear. Items are displayed top to bottom or left to right in order of ascending weight. The lightest weight is displayed first, the heaviest weights sink to the bottom.

*key, name, location and weight attributes are required

Elements

NameDescription
labelIs the i18n key that will be used to look up the textual representation of the link.
descriptionThe description of the plugin module. Use this element to describe the navigation section.
conditionsDefines the logical operator type to evaluate its condition elements. By default 'AND' will be used.
conditionDefines a condition that must be satisfied.


Navigation Item

Navigation Item plugin module allow plugins to define new links in application menus.

nsys-plugin.xml
<navigation-item key="ucw-dashboard_nav-main_dashboard" name="UCW Dashboard" section="system.top.navigation.bar/ucw.demo" weight="0">
    <label>UCW Dashboard</label>
    <link>/dashboard/view/ucw-dashboard</link>
    <conditions>
        <condition class="org.nsys.portal.conditions.UserIsLoggedInCondition" />
    </conditions>
</navigation-item>

The root element for the Navigation Item plugin module is navigation-item. It allows the following attributes and child elements for configuration:

Attributes

NameDescription
keyThe unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code or JavaScript resources.
nameThe human-readable name of the plugin module. Only used in the plugin's administrative user interface.
section

Location into which this navigation item should be placed.

weightDetermines the order in which navigation items appear. Items are displayed top to bottom or left to right in order of ascending weight. The lightest weight is displayed first, the heaviest weights sink to the bottom.

*key, name and section attributes are required

Elements

NameDescription
labelIs the i18n key that will be used to look up the textual representation of the link.
link

Defines where the navigation item should link to.

conditionsDefines the logical operator type to evaluate its condition elements. By default 'AND' will be used.
condition

Defines a condition that must be satisfied.


Dashboard

Dashboard plugin module allow plugins to add multiple gadgets.

nsys-plugin.xml
<dashboard key="ucw-dashboard_dashboard" name="UCW Dashboard">
    <description>This dashboard provides an overview about UCW Dashboard.</description>
    <label>UCW Dashboard</label>
    <viewId>ucw-dashboard</viewId>
    <imageUri>${portalResourcesUrl}/resources/images/ucw_logo.png</imageUri>
    <actionButtons>ucw.tutorial.dashboard.header.actions</actionButtons>
</dashboard>

The root element for the Dashboard plugin module is dashboard. It allows the following attributes and child elements for configuration:

Attributes

NameDescription
keyThe unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code or JavaScript resources.
nameThe human-readable name of the plugin module. Only used in the plugin's administrative user interface.

*key and name attributes are required

Elements

NameDescription
descriptionThe description of the plugin module. Use this element to describe the dashboard.
labelIs the i18n key that will be used to look up the textual representation of the link.
viewId

The unique identifier of the dashboard.

imageUriDefines the URI address of the dashboard icon.
actionButtons

Defines a navigation section that adds buttons to the header of the dashboard


Dashboard Gadget

Dashboard plugin module allow plugins to provides dynamic content that a user can use to customize their dashboard.

nsys-plugin.xml
<dashboard-gadget key="ucw-dashboard_data-measurement-gadget1" name="Data Measurement Gadget # 1" class="com.unitycloudware.portal.tutorial.dashboard.gadget.DataMeasurementGadget">
    <description>Provides information about data measurement.</description>
    <label>Data Measurement</label>
    <column>left</column>
    <order>0</order>
    <view>ucw-dashboard</view>
</dashboard-gadget>

The root element for the Dashboard Gadget plugin module is dashboard-gadget. It allows the following attributes and child elements for configuration:

Attributes

NameDescription
keyThe unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code or JavaScript resources.
nameThe human-readable name of the plugin module. Only used in the plugin's administrative user interface.
classThe class which implements this plugin module. The class you need to provide depends on the module type. For dashboard-gadget it has to implement org.nsys.portal.gadget.Gadget interface.

*key, name and class attributes are required

Elements

NameDescription
descriptionThe description of the plugin module. Use this element to describe the dashboard gadget.
labelIs the i18n key that will be used to look up the textual representation of the link.
column

Defines in which column (left, right) the gadget is displayed.

orderDetermines the order in which dashboard gadgets appear. The lightest order is displayed first, the heaviest order sink to the bottom.
view

Defines the dashboard where gadget is displayed.


Admin Gadget

Administration gadget plugin module allow plugins to add a gadget to the administration dashboard where you can see lot of links to pages with general information about the application, list of users and so on. This is the place where all plugins should register their administration interfaces.

nsys-plugin.xml
<admin-gadget key="ucw-dashboard_admin-gadget_dashboard" name="UCW Dashboard Admin Gadget" class="com.unitycloudware.portal.tutorial.dashboard.gadget.DashboardAdminGadget">
    <description>Provides an overview for the UCW Dashboard gadget.</description>
    <label>UCW Dashboard</label>
    <column>left</column>
    <order>2</order>
</admin-gadget>

The root element for the Admin Gadget plugin module is admin-gadget. It allows the following attributes and child elements for configuration:

Attributes

NameDescription
keyThe unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code or JavaScript resources.
nameThe human-readable name of the plugin module. Only used in the plugin's administrative user interface.
classThe class which implements this plugin module. The class you need to provide depends on the module type. For admin-gadget it has to implement org.nsys.portal.gadget.Gadget interface.

*key and section attributes are required

Elements

NameDescription
descriptionThe description of the plugin module. Use this element to describe the administration gadget.
labelIs the i18n key that will be used to look up the textual representation of the link.
column

Defines in which column (left, right) the gadget is displayed.

orderDetermines the order in which dashboard gadgets appear. The lightest order is displayed first, the heaviest order sink to the bottom.


Portal Resource

Portal Resource plugin module allow plugins to define downloadable resources. If your plugin requires the application to serve additional static JavaScript or CSS files, you will need to use downloadable web resources to make them available. Portal resources are added at the top of the page in the header. In addition, you can specify portal resources like JavaScript and CSS to be included in specific contexts within the application.

nsys-plugin.xml
<portal-resource key="ucw-dashboard_monitoring-resources" name="UCW Dashboard Monitoring Web Resources">
    <context>ucw.dashboard.monitoring</context>
    <resource type="download" name="dashboard-monitoring.css" location="/resources/css/dashboard-monitoring.css" />
    <resource type="download" name="dashboard-monitoring.js" location="/resources/js/dashboard-monitoring.js" />
</portal-resource>

The root element for the Portal Resource plugin module is portal-resource. It allows the following attributes and child elements for configuration:

Attributes

NameDescription
keyThe unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code or JavaScript resources.
nameThe human-readable name of the plugin module. Only used in the plugin's administrative user interface.

*key and name attributes are required

Elements

NameDescription
descriptionThe description of the plugin module. Use this element to describe the portal resource.
contextUse this element to include portal resources like JavaScript and CSS on all screens of a specific type in the application.
resource

Use this element to define resource like JavaScript and CSS to be included within the particular portal resource.