class ContextsJaxrsService {

    @GET
    @Path("/{uuid}/metadata")
    public Response getContextMetadata(@PathParam("uuid") UUID uuid, @Context HttpServletRequest request) {
        final Object contextMetadata = contextsManager.getContextMetadata(uuid, request.getParameterMap());
        if (contextMetadata == null) {
            return Response.status(Response.Status.NO_CONTENT).build();
        }
        final String metadataClientResourceType = contextsManager
                .getMetadataClientResourceType(contextsManager.getContext(uuid, request.getParameterMap()));
        return Response.ok(contextMetadata, clientTypeToMimeType(metadataClientResourceType)).build();
    }

}