Package net.corda.schema.common.provider
Interface SchemaProvider
-
- All Implemented Interfaces:
public interface SchemaProvider
Provide the configuration schema files to client code, ensuring the load works under OSGi and non-OSGi.
All provided InputStream objects should be closed by the client.
-
-
Method Summary
Modifier and Type Method Description abstract InputStream
getSchema(@NotNull() String key, @NotNull() Version version)
Retrieve the schema file for a top-level configuration key. abstract InputStream
getSchemaFile(@NotNull() String fileName)
Retrieve a schema file with the given path. -
-
Method Detail
-
getSchema
@NotNull() abstract InputStream getSchema(@NotNull() String key, @NotNull() Version version)
Retrieve the schema file for a top-level configuration key.
Note that this does not resolve $ref fields in the schema file. However, these references should point to another file contained in this module, which can then be retrieved with getSchemaFile.
- Parameters:
key
- The top-level configuration key to retrieve schema for.
-
getSchemaFile
@NotNull() abstract InputStream getSchemaFile(@NotNull() String fileName)
Retrieve a schema file with the given path.
This can be used to retrieve files required to resolve $ref fields in the schema.
- Parameters:
fileName
- The file to retrieve.
-
-
-
-