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 Constructor Description ConstraintExceptionMapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Constructor Detail
-
ConstraintExceptionMapper
public ConstraintExceptionMapper()
-
-
Method Detail
-
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
-
-