This Polarion extension provides possibility to run custom Java code (via hooks), before Polarion saves/deletes a Work Item, Document or Test Run. | Read-only mirror of https://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.interceptor-manager — SBB. Issues & pull requests at the source.
  • Java 49.5%
  • TypeScript 44.1%
  • CSS 3.5%
  • JavaScript 2.5%
  • HTML 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-12-03 12:55:10 +00:00
.github chore: sync workflows and the bug form from the template (#368) 2026-12-02 20:16:28 +01:00
.idea/codeStyles Initial commit 2023-12-19 14:26:59 +01:00
.mvn feat: publish to JFrog instead of Maven Central (#367) 2026-12-02 19:27:10 +01:00
docs chore: family maintenance sweep (#227) 2026-08-13 09:23:04 +02:00
src fix: update generic to 16.5.0 (#365) 2026-12-01 12:59:08 +01:00
ui feat!: build against Polarion 2612 (#371) 2026-12-02 23:35:41 +01:00
.gitignore chore: sync workflows and docs with the repository template (#360) 2026-11-02 15:15:47 +00:00
.pre-commit-config.yaml chore: sync workflows and the bug form from the template (#368) 2026-12-02 20:16:28 +01:00
.yamlfix.toml chore: sync from open-source-polarion-java-repo-template (#166) 2026-06-09 11:18:12 +02:00
CHANGELOG.md chore(main): release 7.4.0 (#291) 2026-12-02 20:38:04 +01:00
CLAUDE.md feat: publish to JFrog instead of Maven Central (#367) 2026-12-02 19:27:10 +01:00
CODING_STANDARDS.md chore: update JDK distribution to temurin and improve commit message … (#137) 2025-05-13 19:39:59 +02:00
CONTRIBUTING.md chore: sync from open-source-polarion-java-repo-template (#166) 2026-06-09 11:18:12 +02:00
DCO chore: sync from open-source-polarion-java-repo-template (#166) 2026-06-09 11:18:12 +02:00
DEVELOPMENT.md feat!: build against Polarion 2612 (#371) 2026-12-02 23:35:41 +01:00
LICENSE chore: sync from open-source-polarion-java-repo-template (#166) 2026-06-09 11:18:12 +02:00
lombok.config chore: migration to generic extension 2024-05-28 21:03:50 +02:00
NOTICE chore: sync from open-source-polarion-java-repo-template (#166) 2026-06-09 11:18:12 +02:00
pom.xml fix(deps): update dependency ch.sbb.polarion.extensions:ch.sbb.polarion.extension.generic to v17.0.1 2026-12-03 12:55:10 +00:00
README.md feat!: build against Polarion 2612 (#371) 2026-12-02 23:35:41 +01:00
redocly.yaml chore: sync from open-source-polarion-java-repo-template (#166) 2026-06-09 11:18:12 +02:00
RELEASE.md feat: publish to JFrog instead of Maven Central (#367) 2026-12-02 19:27:10 +01:00
renovate.json ci: update workflows and configurations with repo template #38 (#43) 2024-06-12 08:34:42 +02:00
zizmor.yml chore: sync from open-source-polarion-java-repo-template (#166) 2026-06-09 11:18:12 +02:00

Quality Gate Status Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Reliability Rating Security Rating Maintainability Rating Vulnerabilities

Polarion ALM extension to execute validation during save/delete actions

This Polarion extension provides possibility to run custom Java code (via hooks), before Polarion saves/deletes a Work Item, Document, Plan or Test Run.

Important

Starting from version 4.0.0 only latest version of Polarion is supported. Right now it is Polarion 2612.

Quick start

The latest version of the extension can be downloaded from the releases page and installed to Polarion instance without necessity to be compiled from the sources. The extension should be copied to <polarion_home>/polarion/extensions/ch.sbb.polarion.extension.intercaptor-manager/eclipse/plugins and changes will take effect after Polarion restart.

Important

Don't forget to clear <polarion_home>/data/workspace/.config folder after extension installation/update to make it work properly.

Build

This extension can be produced using maven:

mvn clean package

Installation to Polarion

To install extension to Polarion ch.sbb.polarion.extension.interceptor-manager-<version>.jar should be copied to <polarion_home>/polarion/extensions/ch.sbb.polarion.extension.interceptor-manager/eclipse/plugins. It can be done manually or automated using maven build:

mvn clean install -P local-install-into-polarion

For automated installation with maven env variable POLARION_HOME should be defined and point to folder where Polarion is installed.

Changes only take effect after restart of Polarion.

Polarion configuration

Interceptor Manager settings/customization

Use Administration -> Interceptor Manager -> Settings page to enable/disable or set specific properties for each existing hook.

Required setting entries

A hook can declare the setting entries it reads, by implementing RequireSettingEntries:

public class MyHook extends ActionHook implements HookExecutor, RequireSettingEntries {

    @Override
    public @NotNull List<String> getRequiredSettingEntryNames() {
        return List.of("projects", "types.*", "errorMessage");
    }
}

The settings page reports every declared entry which the stored settings miss, and refuses to save settings which miss one. This is how an administrator learns that a new hook version added an entry.

Declare each name as it appears in getDefaultSettings(). A * segment stands for any one selector, so types.* accepts types.* and types.myProject alike. The number of segments must match.

Implementing the interface is optional. The settings of a hook which does not implement it are not checked.

Hooks installation

Standalone jar hooks

Copy hook jar to hooks folder (<polarion_home>/polarion/extensions/ch.sbb.polarion.extension.interceptor-manager/eclipse/plugins/hooks) and enforce hooks reloading from the settings page or restart Polarion. By default, newly added hooks are disabled and must be enabled manually.

Hooks from Different Polarion Extension

Hooks can be located in another Polarion extension. In this case, the following two approaches to register the hooks are supported:

REST API

This extension provides REST API. OpenAPI Specification can be obtained here.

Upgrade

Upgrade from version 2.x.x to 3.0.0

Version 3.0.0 has received significant change - project+package rename. Verify you're using the new subfolder name in the extensions folder. Also, this change prevents previous hooks versions from working. They must be replaced with the new ones built especially for v.3.0.0+. Note that doing this will reset hooks settings tho their default values, so do not forget to backup your actual settings to restore them after update.

Upgrade from version 1.x.x to 2.0.0

Version 2.0.0 requires the new hooks model therefore hooks built for 1.x.x will stop working. They must be replaced with the new ones built especially for v.2.0.0+. Also the new version introduced some significant internal settings model changes/improvements which have made old settings data incompatible. This means that during the first run all settings will be reset to their default values ( unfortunately revisions history will be lost too).