Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Usages

  • API Element Plugin is used as an extension of functions on top of the default API elements available in the API Builder.
  • This plugin type must extend org.joget.api.model.ApiPluginAbstract abstract class.

POM file adjustments

  • Add the project dependency below:

    Code Block
    languagexml
    <dependency>
    	<groupId>org.joget.api</groupId>
        <artifactId>apibuilder_api</artifactId>
        <version>${project.version}</version>
        <scope>provided</scope>
    </dependency>

Abstract Class

org.joget.api.model.ApiPluginAbstract

  • Under apibuilder_api module
  • Extended org.joget.plugin.base.ExtDefaultPlugin. Please refer to Plugin Base Abstract Class and Interface.
  • Implemented org.joget.api.model.ApiPlugin.
  • A base abstract class to develop a custom API Element Plugin.

Abstract Methods

authenticate
public boolean authenticate(HttpServletRequest request, HttpServletResponse response);

Used to authenticate API calls on an existing API document.

Parameters:

request - the http request information

response - the http response to write

Overridable Methods

authenticate
public boolean authenticate(HttpServletRequest request, HttpServletResponse response);

Used to authenticate API calls on an existing API document.

Parameters:

request - the http request information

response - the http response to write

Plugin Properties Options

Sample Plugins