API Business Services (Extensions)
It is possible to extend some part of the standard services with Java code. To do this, create a plugin and then copy the jar restapibs.jar
from the REST API plugin (WXM_RESTAPI) to its lib folder and, from version 2022.3 onwards, add the following entry (one time only) in the section services
of the config.xml
file of the plugin:
<service provides="com.noheto.extensions.interfaces.services.InstallableService">
com.noheto.restapi.startup.ApiBusinessServiceStartup
</service>
Then implements the adapter you need, include it in a jar and deploy it to the lib plugin folder (as you do for any other class in your plugin), then include the plugin in your configuration.
Some extension components must be configured in api service (they are said to be referenced) and some are automatically loaded.
Â
Any adapter provides a method getPlugin()
to retrieve the plugin instance, especially if you need to retrieve a plugin configuration for your adapter.
Graddle dependency
2024.1
Add this dependency to your build.gradle
file:
dependencies {
implementation "com.wedia-group.nar:restapiBusinessServices:${rootProject.ext.VERSION_ORIGINAL}"
}
In this case, the jar name will be restapiBusinessServices-{version}.jar
. You'll need to delete restapibs.jar
from your lib folder if you were using it before this direct dependency.
To depend on the last version (beta):
dependencies {
implementation "com.wedia-group.nar:restapiBusinessServices:${rootProject.ext.VERSION_ORIGINAL}+"
}
List of available extensions
Adapter class | Description |
---|---|
com.noheto.restapi.APIBusinessServiceAdapter | Triggers (creation or modification with createorupdate actions) |
com.noheto.restapi.APIBaseWhereBusinessServiceAdapter | Base wheres |
com.noheto.restapi.OAuth2IdTokenValidatorAdapter | OAuth2 id_token validation |
com.noheto.restapi.OAuth2UserBindingAdapter | OAuth2 user binding and mapping, and triggers |
com.noheto.restapi.UserBindingAdapter | OAuth2 user binding |
com.noheto.restapi.RESTAPIValueToIdAdapter | By value binding |
com.noheto.restapi.ConfigContributionAdapter | Contribution to api services configuration 2022.3 No longer supported |
com.noheto.restapi.SwaggerContributionAdapter | Contribution to Swagger documentation 2022.3 No longer supported |
com.noheto.restapi.APICustomSectionAdapter | Add custom data section in API response |
com.noheto.restapi.APIBusinessServiceAdapter | API triggers for update or create actions |
com.noheto.restapi.DamContributionAdapter | Allows to provide an API Business Service contribution for a DAM service (instead of use the json configuration to do it). Works only for APIBusinessServiceAdapter/RESTAPIBusinessService for the moment. |
com.noheto.restapi.APIBusinessExceptionInterceptorAdapter | Allows to indicate a circumstantial sub-message on an API error of functional type (BusinessException) |
com.noheto.restapi.DXMJWTClaimsAdapter | deprecated/do not use it (allows to add DXM claims for the obsolete DXM V0) 2022.3 No longer supported |
com.noheto.restapi.ProcessEndHookAdapter | End of process trigger. Used, for example, to send a notification after mass processing. 2024.1 |
Â