System Customization¶
The recommended way to customize a system is to use your own project. The project can contain custom modules, extension points (user exits), or overrides. You can create your own project based on a suggested template.
For the Unidata MDM frontend, use this template, which also includes documentation. Use the template and the list of custom extension points for your work.
User Exits¶
User Exits are Java programming code that is executed when a specific event occurs.
User Exits are used when it is necessary to perform some non-standard actions beyond the system’s capabilities. For example, if an insertion operation requires sending a special notification containing authentication data for further authorization in a third-party system.
The complete list of User Exits can be found in the types module in src/declareUe.ts
. This is an autogenerated file. It is updated after each npm ci
or npm run dev
command.
Third-party Methods of Generating ExternalId¶
Unidata MDM provides the ability to implement third-party methods of generating External ID. The implemented methods become available for selection when configuring the entity/lookup entity and code attribute properties.
To use third-party generation methods:
Implement a Java interface that describes the algorithm for the third-party strategy. Example:
public interface ExternalIdGenerator { /** * Generate external id by ctx * @param ctx ctx * @return return external id */ Object generateExternalId(ExternalIdResettingContext ctx); }
Place the JAR file containing the implementation of the strategies in the <TOMCAT_HOME>/unidata-integration directory.
Include third-party strategies in the unidata-conf.xml file in the externalIdStrategies section. Configuration example:
<conf:configuration xmlns:conf="http://conf.mdm.unidata.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://conf.mdm.unidata.com/"> <conf:externalIdStrategies> <conf:strategy id="randomIdStrategy" name="Генерация случайным способом" description="Генерирует случайное long значение" class="com.unidata.mdm.backend.common.integration.strategy.RandomLongExt ernalIdGeneratorTest"/> ... </conf:externalIdStrategies> <conf:exits>
The id and name fields are mandatory. It is recommended to add a description of the strategy in the description.
Restart the system server.