Font Size:

Activation Aware Plugin

Introduction

This plugin type marked a plugin aware of the plugin install & uninstall event.

Commons Use Cases:

  • Register and unregister something when plugin install and uninstall from the system. 

  • Create and clean resources when plugin install and uninstall from the system. 

Activation Aware Plugin Class

Interface

  • org.joget.plugin.base.ActivationAwarePlugin

    • This plugin interface can used together with other plugin types

    • The plugin implemented this interface will aware of the plugin installing and uninstalling event

org.joget.plugin.base.ActivationAwarePlugin

Methods

  • void afterRegister()

    • This method will be called after the plugin is registered to the service

  • void beforeUnregister()

    • This method will be called before the plugin is going to unregister from the service

Sample Plugins

All Web Filter plugins are sample of this plugin interface as the web filter plugin using it to auto register and unregister the filter after installed and before uninstalling.

  • SampleHeaderFilter

    • Add header to the response of /web/login

    • Run before security chain and order after SampleLoginFormEncryption even it register before it.

  • SampleWebFilterPlugin

    • Intercept /web/login request and auto login as Admin when the saved URL is assignment link. Then, it direct to the configured redirect url or home.

  • SampleLoginFormEncryption

    • Intercept the /web/login to inject script to encrypt the login credentials before body end tag

    • Intercept /j_spring_security_check to decrypt the credentials before passing to security chain.

    • Run before security chain

 

Created by Debanraj Last modified by Debanraj on Apr 17, 2025