Skip to content

Commit

Permalink
chore: additional configuration properties registration information a…
Browse files Browse the repository at this point in the history
…dded to readme

Refs: #138
  • Loading branch information
Jumas committed Sep 10, 2024
1 parent 0a99dc0 commit f6248ec
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,23 @@ public class PdfExporterAdminUiServlet extends GenericUiServlet {

public PdfExporterAdminUiServlet() {
super("pdf-exporter-admin");
CurrentExtensionConfiguration.getInstance().setExtensionConfiguration(PdfExporterExtensionConfiguration.getInstance());
}
}
```

### Custom extension configuration

In order to register additional configuration properties a subclass of `ExtensionConfiguration` must be marked with the `@Discoverable`:

```java
@Discoverable
public class PdfExporterExtensionConfiguration extends ExtensionConfiguration {
@Override
public @NotNull List<String> getSupportedProperties() {
List<String> supportedProperties = new ArrayList<>(super.getSupportedProperties());
supportedProperties.add("additionalProperty");
return supportedProperties;
}
...
}
```

0 comments on commit f6248ec

Please sign in to comment.