Class SchemagroupsResourceImpl
- java.lang.Object
-
- io.apicurio.registry.cncf.schemaregistry.impl.SchemagroupsResourceImpl
-
- All Implemented Interfaces:
SchemagroupsResource
@ApplicationScoped @Counted(name="rest_request_count", description="Total number of REST requests.", tags={"group=REST","metric=rest_request_count"}) @ConcurrentGauge(name="concurrent_request_count", description="Number of concurrent REST requests.", tags={"group=REST","metric=concurrent_request_count"}) @Timed(name="rest_response_time", description="Time of a request-response interval.", tags={"group=REST","metric=rest_response_time"}, unit="milliseconds") public class SchemagroupsResourceImpl extends Object implements SchemagroupsResource
- Author:
- Fabian Martinez
-
-
Constructor Summary
Constructors Constructor Description SchemagroupsResourceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createGroup(String groupId, SchemaGroup data)
Create schema group with specified format in registry namespace.CompletionStage<SchemaId>
createSchema(String groupId, String schemaId, InputStream data)
Register schema.void
deleteGroup(String groupId)
Delete schema group in schema registry namespace.void
deleteSchema(String groupId, String schemaId)
void
deleteSchemasByGroup(String groupId)
Deletes all schemas under specified group id.void
deleteSchemaVersion(String groupId, String schemaId, Integer versionNumber)
SchemaGroup
getGroup(String groupId)
Get schema group description in registry namespace.List<String>
getGroups()
Get all schema groups in namespace.javax.ws.rs.core.Response
getLatestSchema(String groupId, String schemaId)
Get latest version of schema.List<String>
getSchemasByGroup(String groupId)
Returns schema by group id.javax.ws.rs.core.Response
getSchemaVersion(String groupId, String schemaId, Integer versionNumber)
List<Integer>
getSchemaVersions(String groupId, String schemaId)
Get list of versions for specified schema
-
-
-
Method Detail
-
getGroups
public List<String> getGroups()
Description copied from interface:SchemagroupsResource
Get all schema groups in namespace.- Specified by:
getGroups
in interfaceSchemagroupsResource
-
getGroup
public SchemaGroup getGroup(String groupId)
Description copied from interface:SchemagroupsResource
Get schema group description in registry namespace.- Specified by:
getGroup
in interfaceSchemagroupsResource
-
createGroup
public void createGroup(String groupId, SchemaGroup data)
Description copied from interface:SchemagroupsResource
Create schema group with specified format in registry namespace.- Specified by:
createGroup
in interfaceSchemagroupsResource
-
deleteGroup
public void deleteGroup(String groupId)
Description copied from interface:SchemagroupsResource
Delete schema group in schema registry namespace.- Specified by:
deleteGroup
in interfaceSchemagroupsResource
-
getSchemasByGroup
public List<String> getSchemasByGroup(String groupId)
Description copied from interface:SchemagroupsResource
Returns schema by group id.- Specified by:
getSchemasByGroup
in interfaceSchemagroupsResource
-
deleteSchemasByGroup
public void deleteSchemasByGroup(String groupId)
Description copied from interface:SchemagroupsResource
Deletes all schemas under specified group id.- Specified by:
deleteSchemasByGroup
in interfaceSchemagroupsResource
-
getLatestSchema
public javax.ws.rs.core.Response getLatestSchema(String groupId, String schemaId)
Description copied from interface:SchemagroupsResource
Get latest version of schema.- Specified by:
getLatestSchema
in interfaceSchemagroupsResource
-
createSchema
public CompletionStage<SchemaId> createSchema(String groupId, String schemaId, InputStream data)
Description copied from interface:SchemagroupsResource
Register schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. If schema with identical content already exists, existing schema's ID is returned.- Specified by:
createSchema
in interfaceSchemagroupsResource
-
deleteSchema
public void deleteSchema(String groupId, String schemaId)
- Specified by:
deleteSchema
in interfaceSchemagroupsResource
-
getSchemaVersions
public List<Integer> getSchemaVersions(String groupId, String schemaId)
Description copied from interface:SchemagroupsResource
Get list of versions for specified schema- Specified by:
getSchemaVersions
in interfaceSchemagroupsResource
-
getSchemaVersion
public javax.ws.rs.core.Response getSchemaVersion(String groupId, String schemaId, Integer versionNumber)
- Specified by:
getSchemaVersion
in interfaceSchemagroupsResource
-
deleteSchemaVersion
public void deleteSchemaVersion(String groupId, String schemaId, Integer versionNumber)
- Specified by:
deleteSchemaVersion
in interfaceSchemagroupsResource
-
-