public final class AuditJsonConfig extends Object
Modifier and Type | Method and Description |
---|---|
static JsonValue |
getAuditEventHandlerConfigurationSchema(String className,
ClassLoader classLoader)
Gets the configuration schema for an audit event handler as json schema.
|
static JsonValue |
getJson(InputStream input)
Returns a JSON value from the provided input stream.
|
static <C extends EventHandlerConfiguration> |
parseAuditEventHandlerConfiguration(Class<C> clazz,
JsonValue jsonConfig)
Returns the audit event handler configuration from the provided JSON string.
|
static AuditServiceConfiguration |
parseAuditServiceConfiguration(InputStream input)
Returns the audit service configuration from the provided input stream.
|
static AuditServiceConfiguration |
parseAuditServiceConfiguration(JsonValue json)
Returns the audit service configuration from the provided JSON value.
|
static AuditServiceConfiguration |
parseAuditServiceConfiguration(String json)
Returns the audit service configuration from the provided JSON string.
|
static void |
registerHandlerToService(JsonValue jsonConfig,
AuditServiceBuilder auditServiceBuilder)
Configures and registers the audit event handler corresponding to the provided JSON configuration
to the provided audit service.
|
static void |
registerHandlerToService(JsonValue jsonConfig,
AuditServiceBuilder auditServiceBuilder,
ClassLoader classLoader)
Configures and registers the audit event handler corresponding to the provided JSON configuration
to the provided audit service, using a specific class loader.
|
public static JsonValue getJson(InputStream input) throws AuditException
input
- Input stream containing an arbitrary JSON structure.AuditException
- If an error occurs.public static AuditServiceConfiguration parseAuditServiceConfiguration(InputStream input) throws AuditException
input
- Input stream containing JSON configuration of the audit service.AuditException
- If any error occurs.public static AuditServiceConfiguration parseAuditServiceConfiguration(String json) throws AuditException
json
- JSON string representing the configuration of the audit service.AuditException
- If any error occurs.public static AuditServiceConfiguration parseAuditServiceConfiguration(JsonValue json) throws AuditException
json
- JSON value representing the configuration of the audit service.AuditException
- If any error occurs.public static void registerHandlerToService(JsonValue jsonConfig, AuditServiceBuilder auditServiceBuilder) throws AuditException
jsonConfig
- The configuration of the audit event handler as JSON.auditServiceBuilder
- The builder for the service the event handler will be registered to.AuditException
- If any error occurs during configuration or registration of the handler.public static void registerHandlerToService(JsonValue jsonConfig, AuditServiceBuilder auditServiceBuilder, ClassLoader classLoader) throws AuditException
jsonConfig
- The configuration of the audit event handler as JSON.auditServiceBuilder
- The builder for the service the event handler will be registered to.classLoader
- The class loader to use to load the handler and its configuration class.AuditException
- If any error occurs during configuration or registration of the handler.public static <C extends EventHandlerConfiguration> C parseAuditEventHandlerConfiguration(Class<C> clazz, JsonValue jsonConfig) throws AuditException
C
- The type of the configuration bean for the event handler.jsonConfig
- The configuration of the audit event handler as JSON.clazz
- The class for type <C>
.AuditException
- If any error occurs while instantiating the configuration from JSON.public static JsonValue getAuditEventHandlerConfigurationSchema(String className, ClassLoader classLoader) throws AuditException
className
- The class name to get the configuration for.classLoader
- The ClassLoader
to use to load the event handler and event handler config class.AuditException
- If any error occurs parsing the config class for schema.Copyright © 2025 Open Identity Platform Community. All rights reserved.