private void checkMementoPath() { if (externalPath.contains("/" + FedoraTypes.FCR_VERSIONS)) { final String path = toPath(translator(), externalPath); if (path.contains(FedoraTypes.FCR_VERSIONS)) { throw new InvalidMementoPathException("Invalid versioning request with path: " + path); } } } }
@Override public Response toResponse(final InvalidMementoPathException e) { debugException(this, e, LOGGER); final Link link = buildConstraintLink(e, context, uriInfo); final String msg = e.getMessage(); return status(BAD_REQUEST).entity(msg).links(link).type(TEXT_PLAIN_WITH_CHARSET).build(); }