@Tags(value={"schema","registry","json"}) @CapabilityDescription(value="Provides a service for registering and accessing JSON schemas. One can register a schema as a dynamic property where \'name\' represents the schema name and \'value\' represents the textual representation of the actual schema following the syntax and semantics of the JSON Schema format. Empty schemas and schemas only consisting of whitespace are not acceptable schemas.The registry is heterogeneous registry as it can store schemas of different schema draft versions. By default the registry is configured to store schemas of Draft 2020-12. When a schema is added, the version which is currently is set, is what the schema is saved as.") @DynamicProperty(name="Schema Name", value="Schema Content", description="Adds a named schema using the JSON string representation of a JSON schema", expressionLanguageScope=NONE) public class StandardJsonSchemaRegistry extends AbstractControllerService implements JsonSchemaRegistry, JsonSchemaRegistryComponent
| Modifier and Type | Field and Description |
|---|---|
private ConcurrentMap<String,org.apache.nifi.json.schema.JsonSchema> |
jsonSchemas |
private static List<PropertyDescriptor> |
PROPERTY_DESCRIPTORS |
private ConcurrentMap<org.apache.nifi.json.schema.SchemaVersion,com.networknt.schema.JsonSchemaFactory> |
schemaFactories |
private org.apache.nifi.json.schema.SchemaVersion |
schemaVersion |
SCHEMA_VERSION| Constructor and Description |
|---|
StandardJsonSchemaRegistry() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onPropertyModified(PropertyDescriptor descriptor,
String oldValue,
String newValue) |
org.apache.nifi.json.schema.JsonSchema |
retrieveSchema(String schemaName) |
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitinitialize, isStatefulgetIdentifier, getPropertyDescriptor, getPropertyDescriptors, validateprivate static final List<PropertyDescriptor> PROPERTY_DESCRIPTORS
private final ConcurrentMap<String,org.apache.nifi.json.schema.JsonSchema> jsonSchemas
private final ConcurrentMap<org.apache.nifi.json.schema.SchemaVersion,com.networknt.schema.JsonSchemaFactory> schemaFactories
private volatile org.apache.nifi.json.schema.SchemaVersion schemaVersion
public void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue)
onPropertyModified in interface ConfigurableComponentonPropertyModified in class AbstractConfigurableComponentprotected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponentpublic org.apache.nifi.json.schema.JsonSchema retrieveSchema(String schemaName) throws SchemaNotFoundException
retrieveSchema in interface JsonSchemaRegistrySchemaNotFoundExceptionprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponentCopyright © 2024 Apache NiFi Project. All rights reserved.