No Results
Anatomy of a Web Adapter

Module Zip File

A web adapter module is a zip file that normally contains:

File(s) Description
Manifest.json
Standard module manifest file: vendor, name, and version information
types/*.json
Custom connection and feed types
webrules/<name>/appdef.json
The application definition – this is used to generate the custom type definitions, as well as some run-time lookups for application version information and connect/feed type compatibility.
webrules/<name>/web/*.js
Application-specific web content rules
webrules/<name>/data/*.js
Application-specific web data rules
webrules/<name>/sso/*.js
Application-specific authentication rules
messages/<name>/messages*.properties
Message catalog

Other items that can potentially be included (these apply to any module):

File(s) Description
static-web
Static web content; static HTML, CSS, JS, resources. Files placed here are mapped to: http://edge_host/modules/vendor.web_adapter_name/
OnLoad.js
Run after the adapter module is loaded into edgeCore: all types, static content, and resources will have been loaded and copied into the appropriate places.
PreInstall.js
Run prior to restoring the configuration instances provided by the adapter
PostInstall.js
Run after the adapter module has been successfully installed: everything will be loaded, including configuration instances
PreUninstall.js
Run before uninstalling the adapter module
<ServiceName>/*
Predefined configuration instances, of the type seen in backup archives.
upgrade
Upgrade bundles – defines any logic required to upgrade the adapter module from previously released versions.
lib
Java libraries

 

Adapter Versioning

Adapter modules must be versioned according to the Semantic Versioning Specification.
The adapter module version is listed in Manifest.json.

Type Definitions

Custom type definitions are in the types directory of the module zip file.  Each type is defined in a separate JSON file.  These are imported by the module framework when the module is loaded and injected into the PropertyService, which checks that the definition is consistent with the existing configuration.  Once the types are understood by the PropertyService, they are available to be used in pipeline configurations.  These type definitions can be generated by the server, based on definitions in appdef.json.

The webrules Directory

The contents of the webrules directory from the module zip file are copied directly to the modules/webrules directory in the product installation.  The subdirectory containing the web, data, and SSO directories must be named the same as the adapter (<vendor name>.<adapter name>) for the included rules files to be correctly associated with the types defined by the adapter.  Strictly speaking, the adapter is free to place rules files wherever it likes – it may make sense to add some rules to the generic directory, for example.

Install Script Hooks

Hooks at various points during module install and uninstall where custom actions can be performed.

Upgrade

If the current version of an adapter is not backward compatible, upgrade bundles provide a mechanism for making any required changes to the existing configuration.  If it is not possible to create a valid configuration, the minimum effort that should be made is to flag any configuration that is no longer valid as a problem (for example, make sure it is flagged in the pipeline view after upgrading).

Java Libraries

It is possible to include Java libraries in a module.  Installation of a module containing any libraries will require the EdgeCore web application to be restarted (normally, installation of a module only requires that the EdgeCore services are reinitialized).


Terms | Privacy