Class ConstraintExceptionMapper<T extends ConstraintViolationException>

    • Method Detail

      • buildConstraintLink

        public static javax.ws.rs.core.Link buildConstraintLink​(ConstraintViolationException e,
                                                                javax.servlet.ServletContext context,
                                                                javax.ws.rs.core.UriInfo uriInfo)
        Creates a constrainedBy link header with the appropriate RDF URL for the exception.
        Parameters:
        e - ConstraintViolationException Exception which implements the buildContraintUri method.
        context - ServletContext ServletContext that we're running in.
        uriInfo - UriInfo UriInfo from the ExceptionMapper.
        Returns:
        Link A http://www.w3.org/ns/ldp#constrainedBy link header
      • buildConstraintLink

        public static javax.ws.rs.core.Link buildConstraintLink​(Class<? extends ConstraintViolationException> clazz,
                                                                javax.servlet.ServletContext context,
                                                                javax.ws.rs.core.UriInfo uriInfo)
        Creates a constrainedBy link header with the appropriate RDF URL for the exception.
        Parameters:
        clazz - the class of the exception to build the link for.
        context - ServletContext ServletContext that we're running in.
        uriInfo - UriInfo UriInfo from the ExceptionMapper.
        Returns:
        Link A http://www.w3.org/ns/ldp#constrainedBy link header