Background
The policy rules are country-specific which means that the logic must be contained in a class supplied by the Participating Nation (PN). This page describes how the "Assertion Validator" component uses Java ServiceLoader is used to fetch a local "Policy Manager" implementation.
This task will be implemented in Release x.x.x. of assertion-validator. Here is the JIRA:
Design
The diagram shows how the AssertionAttributeValidator uses the ServiceLoader to load the National implementation of PolicyManager.
It does not matter what the fully qualified name of the class is. The ServiceLoader requires only that the class must implement PolicyManagerInterface and that there is a provider-configuration file in the resource directory META-INF/services.
If the AssertionAttributeValidator fails to load a National implementation then it will fallback to instanciating the DefaultPolicyManagerImpl. This is useful for testing purposes and as an example of how to build the implementation.
Packaging
It is the responsibility of the PN to develop scripts to package the National implementation. The recommended approach is to package the class (and any supporting classes) into a jar file. This jar file must be bundled into the lib directory in the epsos-server.war. The Swedish team have Maven scripts which fetch the war from joinup, extract, add the National jars and then create a new war.