Top level component class(es)

A component is a class implementing the com.exalead.mercury.component.CVComponent interface.

This top-level interface is an empty interface (no defined method inside) designed to be automatically detected by the framework.

All available non-inner classes implementing this interface are collected during startup while scanning all JARs, and allow to list a subset of components implementing a specialized class or interface at runtime. For example, all components deriving from the com.exalead.papi.framework.connectors.Connector class are listed to collect the list of available connectors in the product.

See Also
About the CVPlugin public class
Top level component class(es)
Top level configuration class(es)
Table 1. Top level component class annotations

Annotation

Description

@CVComponentDescription

(com.exalead.mercury.component. CVComponentDescription)

If specified, this is the short description of the connector used in the select box of the Add connector dialog box in the Administration Console.

Example:

@CVComponentDescription("My Wonderful Connector Component")

@CVComponentConfigClass

(com.exalead.mercury.component.config. CVComponentConfigClass)

This annotation defines the:

The associated CVComponentConfig derived class used for the configuration.

CVComponentConfigCheck (com.exalead.mercury.component.config.CVComponentConfigCheck) used to enhance the configuration check of the CVComponent.

Example:

@CVComponentConfigClass(configClass = FilesystemConnectorConfig.class, configCheckClass = ConnectorConfigCheck.class)

@CVComponentLabel (com.exalead.mercury.component.CVComponentLabel)

If specified, this is the label of the component. The label is used in the Administration Console when selecting a custom document processor, semantic processor, or query prefix handler.

For example: @CVComponentLabel("My document processor")

@PropertyLabel (com.exalead.config.bean.PropertyLabel)

DEPRECATED

Similar to the @CVComponentDescription annotation.

@IsEmptyConfig (com.exalead.config.bean.)

The given configuration class is empty (no setters at all). Without this annotation, an empty class would be rejected at configuration build time.

@IntrospectableComponent

(com.exalead.mercury.component. IntrospectableComponent)

This annotation defines the:

CVComponentIntrospector (com.exalead.mercury.component.CVComponentIntrospector) derived co-class used for introspection queries, for example the Check connectivity operation available in the Administration Console.

and a list of supported query classes derived from SupportedQuery (com.exalead.mercury.component.SupportedQuery).

Example:

@IntrospectableComponent(introspectorClass = MyConnectorIntrospector.class, supportedQueries = {
         @SupportedQuery(queryClass = CheckConnectivity.class),
 @SupportedQuery(queryClass = TestConnection.class),
         @SupportedQuery(queryClass = ListDirs.class),
 @SupportedQuery(queryClass = ListFiles.class),
         @SupportedQuery(queryClass = ListForms.class),
 @SupportedQuery(queryClass = ListItems.class),
         @SupportedQuery(queryClass = ListViews.class) })