Versions Compared

Key

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

...

Register your IContentManagerFactory implementation

Java

Annotate your implementation with the AquimaContentManagerFactory annotation and make sure the class will be scanned by Spring. Blueriq will automatically pick it up and use it where needed.

...

Code Block
@AquimaContentManagerFactory
public class CustomContentManagerFactory implements IContentManagerFactory {
	public IContentManager create(IConnection connection) throws UnsupportedConnectionException {
		if (connection instanceof ICustomConnection) {
			return new CustomContentManager((ICustomConnection) connection);
		} else {
			throw new UnsupportedConnectionException(connection);
		}
	}
}

.NET

From your IWebApplicationPlugin implementation, you may register your factory on the IRegsitractionContext in the Register method.

Code Block
languagec#
public void Register(IRegistrationContext context) {
    context.Register(new CustomContentManagerFactory());
}