Start page / Plug-In Development / Universal Extensions / Input Components / FSM Component Definition

FSM Component Definition

Contents

The input component is advertised to FirstSpirit by adding a <public /> section to the FirstSpirit Module (FSM) file's module.xml, indicating the classes and other resources required by the input component (see Module Architecture for general information about FSM structuring).

Because of the composite nature of an input component's programmatic structure (the input component consists of a number of classes), the mark-up within the <public /> tag differs somewhat from that of other plug-in types:

<module>

<!-- Module-wide tags here. -->

<components>

<!-- The public component which specifies the input component for
server-side use and use in SiteArchitect. -->
<public>

<!-- NOTE: this component name determines the XML tag by which
the input component may be referenced in form definitions! -->
<name>EXAMPLE_COMPONENT</name>

<displayname>Example Input Component</displayname>
<description>An example input component for use in SiteArchitect and ContentCreator</description>

<!-- Always reference GadgetSpecification as the component's class. This class will
manage the required objects based on the configuration given below. -->
<class>de.espirit.firstspirit.module.GadgetSpecification</class>

<!-- Configuration for the class GadgetSpecification -->
<configuration>

<!-- The class which defines the input component's GOM structure (implements GomFormElement). -->
<gom>de.espirit.firstspirit.opt.example.gadget.GomExample</gom>

<!-- The input component's ValueEngineerFactory implementation.
Only required if the gadget implementations provide a value holder aspect. -->
<value>de.espirit.firstspirit.opt.example.gadget.ExampleValueEngineerFactory</value>

<!-- SiteArchitect gadget: the gadget's SwingGadgetFactory implementation. -->
<factory>de.espirit.firstspirit.opt.example.gadget.ExampleSwingGadgetFactory</factory>

<!-- ContentCreator gadget: the gadget's WebGadgetFactory implementation. -->
<factory>de.espirit.firstspirit.opt.example.gadget.ExampleWebGadgetFactory</factory>

<!-- The scope (template types) in which use of this input component is allowed. -->
<scope unrestricted="yes" />

</configuration>

<!-- Provide a JAR file which contains all classes and supporting files
required for use of the input component in SiteArchitect. -->
<resources>
<resource>lib/gadget-example-sitearchitect-1.0.0.jar</resource>
</resources>

</public>

<!-- The web-app component specifies a JAR file containing all classes and
supporting files required for use of the input component in ContentCreator. -->
<web-app>
<name>Example Input Component: WebClient Resources</name>
<displayname>Resource component for Example Input Component</displayname>
<web-xml>web.xml</web-xml>
<web-resources>
<resource>lib/gadget-example-contentcreator-1.0.0.jar</resource>
</web-resources>
</web-app>

<!-- More components if necessary. -->

</components>

</module>

The Component Block

"public" component type

The public component type is used to reference the class de.espirit.firstspirit.module.GadgetSpecification (note: this class is not included in the FirstSpirit APIs - it can be referenced here nonetheless), which uses the data given in the <configuration /> block to identify the input component's available classes.

Block

Mandatory

Location

Description

<name></name>

yes

within <public>

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

<displayname>
</displayname>

 

within <public>

Provides a human-readable display name for this component.

<description>
</description>

 

within <public>

A terse descriptive text about the component's purpose.

<class></class>

yes

within <public>

Specifies the Java class de.espirit.firstspirit.module.GadgetSpecification, which uses the data given in the sibling <configuration /> block to identify classes belonging to the input component.

<configuration>
</configuration>

yes

within <public>

Provides a set of tags which describe the classes specifying the input component.

<gom></gom>

yes

within <configuration>

Indicates the input component's GomFormElement implementation (see GOM Form Definition).

<value></value>

 

within <configuration>

Indicates the input component's ValueEngineerFactory implementation (see Value Processing).

Only required if the SiteArchitect and/or ContentCreator gadget classes provide value holder aspects.

<factory>
</factory>

yes

within <configuration>

Indicates the input component's SiteArchitect and/or ContentCreator gadget factory classes (SwingGadgetFactory and WebPluginGadgetFactory, respectively).

This tag may be specified once for each SiteArchitect and ContentCreator gadget factory class.

<scope></scope>

yes

within <configuration>

Indicates the scope in which the input component may be used.

Attributes:
data="yes" indicates that the input component may be used within page and/or section templates.
content="yes" indicates that the input component may be used within table templates.
link="yes" indicates that the input component may be used within link templates.
unrestricted="yes" indicates that the input component may be used in all of the above template types.

<resources>
</resources>

yes

within <public>

Provides a set of <resource /> tags used to provide module resources for use in SiteArchitect.

<resource>
</resource>

yes

within <resources>

References a JAR file which provides the classes and other resources required to use the input component in SiteArchitect.

    

"web-app" component type

The web-app component type is used to specify a web application. While we are not building a full web application, this component is used to roll out the input components' classes and other supporting resources as a JAR file to a location the ContentCreator can access during server start-up (as a project-specific ContentCreator 5 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 At least one component of the type web-app must be specified in the module description of a FirstSpirit Module that provides an input component which should be used in ContentCreator.

Block

Mandatory

Location

Description

<name></name>

yes

within <web-app>

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

<displayname></displayname>

 

within <web-app>

Provides a human-readable display name for this component.

<description></description>

 

within <web-app>

A terse descriptive text about the component's purpose.

<web-xml></web-xml>

yes

within <web-app>

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

<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 a JAR file which contains the classes and other resources required to use the input component in ContentCreator. All files specified here will be rolled into the WebEdit application's WAR file at server start-up or application deployment.

    

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