Start page / Plug-In Development / Examples / Module: Editorial Search and Replace / Module Structure / Client Service

Chapter “Report” >>

<< Chapter “Project Configuration”

Package: Client Service

The Client Service package is tasked with making central, administrative module functionality available during the FirstSpirit clients' run-time. Functionality within this package includes

  • determining if the project is configured for use with the Editorial Search and Replace module and registering a Client Service object for use within the scope of the client session, and
  • providing access to project configuration for other module components, indicating the set of templates enabled for search and replace processes.

Package Overview: Project ConfigurationPackage Overview: SearchClass Description: Client ServicePackage Overview: ReportClass Description: Permanent Plug-In

Permanent Plug-In

de.espirit.firstspirit.opt.example.editorialsar.clientservice.EditorialSARPermanentPlugin
Access API documentation: JavaClientPermanentPlugin, WebeditPermanentPlugin
ODFS Plug-In Developer documentation: Permanent Plug-In

The Permanent Plug-In is instantiated in every ContentCreator and SiteArchitect session, immediately after project selection. Its sole task is to determine if the Project Application component exists in the currently active project (by attempting to obtain a valid path for that Project Application's configuration path in the file system) and, if so, to register a Client Service object using the ClientServiceRegistryAgent so that the Client Service is available to other module components during the client session.

Important The Editorial Search and Replace report will only be available (i.e. visible) during a client session if the Permanent Plug-In has registered the module's Client Service object.

Client Service

de.espirit.firstspirit.opt.example.editorialsar.clientservice.EditorialSARClientService
Does not implement FirstSpirit API.
ODFS Plug-In Developer documentation: Client Services

The Client Service provides components within the Report and Search packages with access to project configuration, specifically, identifying if template elements as well as the project's metadata template have been configured as valid for search and replace processes.

When registered during a SiteArchitect or ContentCreator session, the Client Service object can be obtained by other module components using a ServicesBroker object (obtained as a specialist through a context object, e.g. a BaseContext object or a sub-type made available in many client plug-in interfaces):

final ServicesBroker servicesBroker = baseContext.requestSpecialist(ServicesBroker.TYPE);
if (servicesBroker != null) {
try {
final EditorialSARClientService clientService =
servicesBroker.getService(EditorialSARClientService.class);
} catch (final ServiceNotFoundException e) {
// Handle recovery if the EditorialSARClientService is not registered in the
// current client session.
}
}

Chapter “Report” >>

<< Chapter “Project Configuration”

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