Start page / Plug-In Development / Implementation and Deployment / Module Architecture / Module Definition

Module Definition

Contents

The file module.xml defines the module structure as seen by FirstSpirit servers. It contains information about the FirstSpirit Module (FSM) itself, including name, version number and vendor, as well as segments on each individual plug-in component.

It follows a mandatory XML structure that specifies which Java classes included in the FSM file implement plug-in interfaces and will be advertised to ContentCreator. Furthermore, the XML mark-up is used to define resources that should be included in the roll-out process of plug-in code to a project-specific ContentCreator web application.

Example: module.xml

Important In the ContentCreator Example module framework, the file module.xml is stored at the module's root directory. If you wish to move this file, you must also modify the Ant build configuration so that it can be located while assembling the FSM file.
<!DOCTYPE module SYSTEM "http://www.FirstSpirit.de/module.dtd">

<module>

<name>FirstSpirit WebEdit Examples</name>
<displayname>FirstSpirit WebClient Examples</displayname>
<version>5.2</version>
<description>>WebClient API examples: client interface extensions and management plug-ins</description>
<vendor>e-Spirit GmbH</vendor>

<components>

<!-- Make plug-in classes known to the FirstSpirit server -->
<public>
<name>FirstSpirit WebEdit Examples - Client Action - JavaScript Example</name>
<class>de.espirit.firstspirit.opt.example.webedit.plugin.ExampleActionsPlugin</class>|
</public>

<!-- Specify a JAR file that contains plug-in and other classes for roll-out to WebClient -->
<web-app>
<name>FirstSpirit WebEdit Examples - Run-Time Library</name>
<web-xml>web.xml</web-xml>
<web-resources>
<resource>lib/fs-we5examples.jar</resource>
<resource target="/we5example">we5example/</resource>
</web-resources>
</web-app>

</components>

<resources>
<resource scope="server" name="we5examples">lib/fs-we5examples.jar</resource>
</resources>

</module>

This file, which is a shortened version of the module definition file used to build the FirstSpirit Module “WebEdit Example Plug-Ins”, specifies basic information about the FSM itself (name, version, description and vendor), two plug-in components (one of type public, the other of type web-app) as well as one resource (fs-we5examples.jar, referenced both as a resource of the web-app component as well as of the FSM itself).

The component specified in the <public> block of this file will be used by the ContentCreator module manager to identify which plug-in actions are available in each user interface context, while the <web-app> block of this file specifies at least one JAR file and, optionally, further files that will be rolled out to the ContentCreator web application upon deployment. The tags available in each block are described in the section Component Model.

Mandatory XML Blocks

Block

Mandatory

Location

Description

<module></module>

yes

top-level

The top-level container.

<name></name>

yes

within <module>

The technical name of the FirstSpirit Module; can only contain alphanumeric as well as several punctuation marks:
A-Z a-z 0-9 ; , _ -

<version></version>

yes

within <module>

The FSM version number; this should be written in dot notation (e.g. 0.0.1) and may optionally include a revision number (e.g. 1.0.5_16).

<components></components>

yes

within <module>

The container for all plug-in components of this FSM.
While the <components> block itself is mandatory, it may be left empty if the FSM is not to have any components.

    

Optional XML Blocks

Block

Mandatory

Location

Description

<displayname></displayname>

 

within <module>

Provides a human-readable display name for the module. If no display name is defined, the technical name (<name>) is displayed in all FirstSpirit interfaces.

<description></description>

 

within <module>

A short text description of the FSM's purpose and contents.

<vendor></vendor>

 

within <module>

The name of the module's vendor or author.

<class></class>

 

within <module>

Specifies a Java class that implements specific methods that react to module installation, update and uninstallation.

<resources></resources>

 

within <module>

The container for all resource entries of this FSM; may be specified but left empty.

<resource></resource>

 

within <resources>

A resource entry, containing a file system path relative to WebEdit's root directory.

<dependencies></dependencies>

 

within <module>

The container for all dependency entries; may be specified but left empty.

<depends></depends>

 

within <dependencies>

A dependency on another FirstSpirit Module; the block contains the dependency module's name (as defined in its <name> block).

<min-fs-version></min-fs-version>

 

within <module>

The minimal FirstSpirit server version required by this module.

    

Example for <min-fs-version>

<min-fs-version>5.2.230909</min-fs-version>

This syntax can be used, for example, to ensure that a module can only be installed on a FirstSpirit server with version 5.2.230909 or newer.

The syntax is <FSMajorVersion>.<FSMinorVersion>.<FSBuildNnumber>, where

  • <FSMajorVersion>: 5
  • <FSMinorVersion>: 2
  • <FSBuildNumber>: 6-digit number consisting of two digits each for <year>, <version in year>, <build number>.

"service" component type

The service component type is used to specify a server-wide service. The component definition requires specification of a Java class which implements the Service interface of the FirstSpirit Access API.

Block

Mandatory

Location

Description

<name></name>

yes

within <service>

The component's name; will be used in module listings and dependency definitions.

<displayname></displayname>

 

within <service>

Provides a human-readable display name for the component. If no display name is defined, the technical name ()

<description></description>

 

within <service>

A terse descriptive text about the component's purpose.

<class></class>

 

within <service>

Specifies a Java class that implements the service interface Service.

<configurable></configurable>

 

within <service>

If this component includes a Java class that implements configuration functionality (for use in Server and Project Configuration), the full class name is specified here.

<resources></resources>

yes

within <service>

A container for resource definitions.

<resource></resource>

yes

within <resources>

Specifies the path (relative to the WebEdit web application's WEB-INF directory) and file name of one or several JAR files that contains the module's classes as resources; additionally, other application server-compatible files (such as JSP files) may be specified. All files specified here will be rolled into the WebEdit application's WAR file at server start-up or application deployment.

    

"web-app" component type

The web-app component type is used to specify a web application. Specific to ContentCreator plug-ins, this component is used to roll out plug-in components as a JAR file to a location ContentCreator can access during server start-up (as the global or a project-specific ContentCreator application is started)--during start-up, the contents of this and other modules' JAR files are added to the ContentCreator code set that will be used by the application server.

Important FirstSpirit Modules which provide ContentCreator extensions must include at least one component of type web-app. These web-app components are used to roll out JAR files containing the extension components' classes into the global or project-specific ContentCreator web applications.

Block

Mandatory

Location

Description

<web-app></web-app>

yes

within <components>

This top-level container specifies a web application component.

Optional attributes:
scopes="<value>"
Defines a comma-separated list of scopes in which this web-app component may be added to FirstSpirit web applications.
Possible values:

  • project (default)
    The web-app component may be added to project-specific web applications, which may be configured in project settings of FirstSpirit ServerManager.
  • global
    The web-app component may be added to global web applications, which may be configured in the server settings panel of FirstSpirit ServerManager.

<name></name>

yes

within <web-app>

The component's name; will be used in module listings and dependency definitions.

<displayname></displayname>

 

within <web-app>

Provides a human-readable display name for the component. If no display name is defined, the technical name (<name>) is displayed in all FirstSpirit interfaces.

<description></description>

 

within <web-app>

A terse descriptive text about the component's purpose.

<class></class>

 

within <web-app>

Specifies a Java class that implements the web application interface AbstractWebApp; not used for components that are intended to simply provide JAR resources for WebClient use.

<web-xml></web-xml>

yes

within <web-app>

Specifies the path within the FSM directory structure at which the file web.xml is located.

<configurable></configurable>

 

within <web-app>

If this component includes a Java class that implements Configuration<E> functionality (for use in FirstSpirit ServerManager), the full class name is specified here.

<web-resources></web-resources>

yes

within <web-app>

A container for resource definitions; all files specified in <resource> tags will be included in the WebEdit web application's WAR file.

<resource></resource>

yes

within <web-resources>

Specifies the path (relative to the WebEdit web application's WEB-INF directory) and file name of one or several JAR files that contains the module's classes as resources; additionally, other application server-compatible files (such as JSP files) may be specified. All files specified here will be rolled into the WebEdit application's WAR file at server start-up or application deployment.

    

Component Blocks

The following component types may be specified within the XML block <component>. Each component type implies a specific use, and thus each type requires certain sets of XML tags.

"public" component type

The public component type is used to specify all module components that implement client extension interfaces. For each class that implements an individual plug-in, a separate <public> block is specified in module.xml.

Important At least one component of the type public must be specified in the module description of a FirstSpirit Module that provides client plug-ins.

Block

Mandatory

Location

Description

<name></name>

yes

within <public>

The component's technical name; will be used in module listings and dependency definitions.

<displayname></displayname>

 

within <public>

Provides a human-readable display name for the component. If no display name is defined, the technical name (<name>) is displayed in all FirstSpirit interfaces.

<class></class>

 

within <public>

Specifies a Java class that implements an interface to extend client functionality.

<configurable></configurable>

 

within <public>

If this component includes a Java class that implements configuration functionality (for use in Server and Project Configuration), the full class name is specified here.

    

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy