Class MetadataResource
java.lang.Object
org.eclipse.persistence.jpa.rs.resources.common.AbstractResource
org.eclipse.persistence.jpa.rs.resources.MetadataResource
@Produces("application/json")
@Consumes("application/json")
@Path("/{version : v\\d\\.\\d|latest}/{context}/metadata-catalog/")
public class MetadataResource
extends AbstractResource
JPARS 2.0 metadata catalog. Resource metadata and schemas.
- Author:
- Dmitry Kornilov
-
Field Summary
Fields inherited from class org.eclipse.persistence.jpa.rs.resources.common.AbstractResource
APPLICATION_SCHEMA_JSON, APPLICATION_SCHEMA_JSON_TYPE, factory, SERVICE_VERSION_FORMAT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
getEntityResource
(String version, String persistenceUnit, String entityName, jakarta.ws.rs.core.HttpHeaders httpHeaders, jakarta.ws.rs.core.UriInfo uriInfo) Returns entity metadata if accepted media type is 'application/json' or entity schema if accepted media type is 'application/schema+json'.jakarta.ws.rs.core.Response
getMetadataCatalog
(String version, String persistenceUnit, jakarta.ws.rs.core.HttpHeaders httpHeaders, jakarta.ws.rs.core.UriInfo uriInfo) Returns metadata catalog.jakarta.ws.rs.core.Response
getQueryResource
(String version, String persistenceUnit, String queryName, jakarta.ws.rs.core.HttpHeaders httpHeaders, jakarta.ws.rs.core.UriInfo uriInfo) Returns query metadata if accepted media type is 'application/json' or entity schema if accepted media type is 'application/schema+json'.Methods inherited from class org.eclipse.persistence.jpa.rs.resources.common.AbstractResource
buildPersistenceContextFactory, getMatrixParameters, getPersistenceContext, getPersistenceFactory, getPersistenceFactory, getQueryParameters, getRelationshipPartner, isValidVersion, marshallMetadata, setPersistenceFactory, setRequestUniqueId
-
Constructor Details
-
MetadataResource
public MetadataResource()
-
-
Method Details
-
getMetadataCatalog
@GET public jakarta.ws.rs.core.Response getMetadataCatalog(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @Context jakarta.ws.rs.core.UriInfo uriInfo) Returns metadata catalog. -
getEntityResource
@GET @Produces({"application/json","application/schema+json"}) @Consumes({"application/json","application/schema+json"}) @Path("entity/{entityName}") public jakarta.ws.rs.core.Response getEntityResource(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("entityName") String entityName, @Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @Context jakarta.ws.rs.core.UriInfo uriInfo) Returns entity metadata if accepted media type is 'application/json' or entity schema if accepted media type is 'application/schema+json'. -
getQueryResource
@GET @Produces({"application/json","application/schema+json"}) @Consumes({"application/json","application/schema+json"}) @Path("query/{queryName}") public jakarta.ws.rs.core.Response getQueryResource(@PathParam("version") String version, @PathParam("context") String persistenceUnit, @PathParam("queryName") String queryName, @Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @Context jakarta.ws.rs.core.UriInfo uriInfo) Returns query metadata if accepted media type is 'application/json' or entity schema if accepted media type is 'application/schema+json'.
-