Class ConstraintExceptionMapper<T extends org.fcrepo.kernel.api.exception.ConstraintViolationException>
java.lang.Object
org.fcrepo.http.commons.exceptionhandlers.ConstraintExceptionMapper<T>
- Type Parameters:
T- Throwable subclass of ConstraintViolationException
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<T>
- Direct Known Subclasses:
CannotCreateMementoExceptionMapper,CannotCreateResourceExceptionMapper,ConstraintViolationExceptionMapper,ExternalMessageBodyExceptionMapper,IncorrectTripleSubjectExceptionMapper,InteractionModelViolationExceptionMapper,InvalidACLExceptionMapper,InvalidMementoPathExceptionMapper,MultipleConstraintViolationExceptionMapper,OutOfDomainSubjectExceptionMapper,RequestWithAclLinkHeaderExceptionMapper,ServerManagedPropertyExceptionMapper,ServerManagedTypeExceptionMapper
public abstract class ConstraintExceptionMapper<T extends org.fcrepo.kernel.api.exception.ConstraintViolationException>
extends Object
implements javax.ws.rs.ext.ExceptionMapper<T>
Abstract class for constraint violation subclasses
- Since:
- 2015-06-24
- Author:
- whikloj
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javax.ws.rs.core.LinkbuildConstraintLink(Class<? extends org.fcrepo.kernel.api.exception.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.static javax.ws.rs.core.LinkbuildConstraintLink(org.fcrepo.kernel.api.exception.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.ws.rs.ext.ExceptionMapper
toResponse
-
Constructor Details
-
ConstraintExceptionMapper
public ConstraintExceptionMapper()
-
-
Method Details
-
buildConstraintLink
public static javax.ws.rs.core.Link buildConstraintLink(org.fcrepo.kernel.api.exception.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 org.fcrepo.kernel.api.exception.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
-