You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

A custom connection can be created if your project needs a connection that is not provided by Blueriq. Creating your own connection is easy and quick if you follow these steps:

1. Create the connection

Go to your plugin project and add a class. Pick a name for the class and let the class implement IConnection (com.aquima.interactions.foundation.connectivity.IConnection). 

2. Implement the connection

Annotate the class and implement the two functions. See example below. In this class you can add methods to let your custom connection work. 

import com.aquima.interactions.foundation.connectivity.ConnectionType;
import com.aquima.interactions.foundation.connectivity.IConnection;
import com.aquima.web.config.annotation.AquimaConnection;

@AquimaConnection(connectionType = "custom", value = "OtherConn")
public class OtherConnection implements IConnection {
	
	@Override
	public String getName() {
		return "OtherConn";
	}
		
	@Override
	public ConnectionType getType() {
		return ConnectionType.CUSTOM;
	}
}

3. Load your custom connection

There are multiple ways to let Spring load the connection but it's recommended to add a reference to your custom connection class in the Spring beans configuration file. 

	<context:component-scan base-package="your.own.package.connection" />

 

Thats all you have to do to create a custom connection for your plugin!

  • No labels