Class GetHalMethodImplementor

    • Constructor Detail

      • GetHalMethodImplementor

        public GetHalMethodImplementor​(boolean isResteasyClassic)
    • Method Detail

      • implementInternal

        protected void implementInternal​(io.quarkus.gizmo.ClassCreator classCreator,
                                         ResourceMetadata resourceMetadata,
                                         ResourceProperties resourceProperties,
                                         io.quarkus.gizmo.FieldDescriptor resourceField)
        Expose RestDataResource.get(Object) via HAL JAX-RS method. Generated code looks more or less like this:
         
             @GET
             @Produces({"application/hal+json"})
             @Path("{id}")
             public Response getHal(@PathParam("id") ID id) {
                 try {
                     Entity entity = resource.get(id);
                     if (entity != null) {
                         return Response.ok(new HalEntityWrapper(entity)).build();
                     } else {
                         return Response.status(404).build();
                     }
                 } catch (Throwable t) {
                     throw new RestDataPanacheException(t);
                 }
             }
         
         
        Specified by:
        implementInternal in class StandardMethodImplementor