6.12 Plugins

Plugin-implementations are accessed using the fully qualified name of the interface defining the behavior of the plugin. Suppose your project decides to implement a plugin for searching customers in the customer-database and the designers agree on the following interface:

package at.spardat.xy;

public interface ICustomerSearch {
    public List search (String lastNamePraefix);
} 
Then, the name at.spardat.xy.ICustomerSearch denotes the fully qualified interface name which is needed below to access the implementations.

At runtime, the implementation-class, i.e., the class implementing ICustomerSearch, is retrieved using the class PluginManager . The following code-fragment shows how the implementation is accessed at the Xma client:

    PluginManager      piManager = yourSession.getPluginManager();
    ICustomerSearch    impl = (ICustomerSearch) piManager.getPlugin (ICustomerSearch.class);

Here, the session is used as starting-point to get the PluginManager . At the server-side of XMA, the PluginManager is a singleton within the web-application:

    PluginManager      piManager = PluginManagerServer.getInstance();
    ICustomerSearch    impl = (ICustomerSearch) piManager.getPlugin (ICustomerSearch.class);

Dummy Plugin provides security plugins for development only. It can be used to start development before the needed users and permissions are configured in the underlaying authentication and authorisation systems. Do not use it in production!

Dummy Plugin contains dummy implementations for the following three plugins:

  • Client Login Module(Client side Login Plugin) The DummyLoginModule automatically logs in a user named "Dummy" in the mandant "188". The environment is always development and the Locale is the default local of the client side Java virtual machine is used, which is de_AT in Austria. It does not ask for a username or password.

  • Server Login Module(Server side Login Plugin) The DummyLoginModuleServer checks if any user was logged in by the DummyLoginModule. The check only fails if an other plugin was used for client side login.

  • Authorisation Module(Authorisation Plugin) The DummyAuthorisation allows every function to everybody. The check only fails if an other plugin was used for client side login. All numerical values are zero.