close

Filter

loading table of contents...

Studio Developer Manual / Version 2301

Table Of Contents

9.28.1 Basic Setup

The following part explains which interfaces have to be implemented in your studio-lib extension. The Error handling and its localization for the client is explained in Section 9.28.4, “Error handling”. How to configure your Adapter bindings is explained in Section 9.28.2, “Adapter Configuration”.

<YOUR_ADAPTER_NAME>Settings

First it is necessary to provide a Settings interface, which has getters for the configurable data of your Adapter. Settings interfaces are used to map Adapter specific connection parameters (like credentials) to Java code. You only have to declare the Settings interface according to the data your Adapter needs. Implementations are generated automatically, backed with the data of your configuration. The getter methods of these interfaces must match the corresponding fields of the settings struct as described in Section 9.28.2, “Adapter Configuration”. The name of the interface is arbitrary, the Settings suffix is just a convention.

com.coremedia.feedbackhub.adapter.FeedbackHubAdapterFactory

An implementation of a FeedbackHubAdapterFactory delivers instances of a FeedbackHubAdapter, that is used for the actual connection to an external system. The id that is returned within the getId method, has to match the factoryId value from your Section 9.28.2, “Adapter Configuration”. In the create method you must return an instance of the specific FeedbackHubAdapter. The method receives the adapter specific settings as parameter. Any errors that occur during the creation of a FeedbackHubAdapter can be thrown as FeedbackHubException (described in Section 9.28.4, “Error handling”) if they should result into a specific error message at the client. Any other exceptions result in a general error message at the client.

The factory needs to be available as a Spring bean within the Spring context of the studio-server. Therefore, you also must provide a Spring configuration file that instantiates the FeedbackHubAdapterFactory as Spring Bean (@Bean), so that it can be collected by the Feedback Hub framework.

com.coremedia.feedbackhub.adapter.keywords.BlobKeywordsFeedbackHubAdapter

A BlobKeywordsFeedbackHubAdapter is a predefined adapter which delivers a list of KeyWords for a given blob and a locale. The result type of the getKeywords method is java.util.concurrent.CompletionStage. This enables you to implement long running operations, like round trips to external systems, with the stage's asynchronous execution facilities so that no threads are blocked. getKeywords is called, when a user requests keywords for CoreMedia content. It will receive a blob from the content (which is configured in the Section 9.28.2, “Adapter Configuration”) and the locale from the content. Any errors that occur during the calculation of keywords can be thrown as FeedbackHubException (described in Section 9.28.4, “Error handling”) if they should result into a specific error message at the client. Any other exceptions will result in a general error message at the client.

The following table shows the settings that are configurable for the BlobKeywordsContentFeedbackProviderSettings interface.

Name Type Description
sourceBlobProperty String The name of the content blob property to analyze and compute keywords for.

Table 9.9.  Settings Struct Properties


com.coremedia.feedbackhub.adapter.text.TextContentFeedbackProvider

A TextContentFeedbackProvider is a predefined adapter which delivers a list of FeedbackItems for a given list of property values. The result type of the analyzeText method is java.util.concurrent.CompletionStage. This enables you to implement long running operations, like round trips to external systems, with the stage's asynchronous execution facilities so that no threads are blocked. Any errors that occur during the calculation of keywords can be thrown as FeedbackHubException (described in Section 9.28.4, “Error handling”) if they should result into a specific error message at the client. Any other exceptions will result in a general error message at the client.

The following table shows the settings that are configurable for the TextContentFeedbackProviderSettings interface.

Name Type Description
sourceProperties String A comma separated list of property names that are used to extract text from. If the text is a markup field, the markup will be converted to plain-text automatically. Invalid properties will be ignored since it is possible to configure the adapter for multiple document types.

Table 9.10.  Settings Struct Properties


com.coremedia.feedbackhub.adapter.FeedbackHubErrorCode

The FeedbackHubErrorCode is part of the error handling, described in Section 9.28.4, “Error handling” and needs to be implemented by an enum. The enum stores all error codes for errors that can occur within the specific adapter implementation or its factory. In case of an error the code is transferred to the client where it is shown as an error message in Feedback Hub's window nagbar.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.