if (!cvs.isEmpty())
{
if (log.isDebugEnabled()) log.debug("SPIN constraint violations: {}", cvs);
if (mode != null && mode.equals(URI.create(GC.EditMode.getURI()))) // check by HTTP request method?
{
throw new ConstraintViolationException(cvs, model);
}
else // gc:CreateMode
{
QueriedResource match = (QueriedResource)getUriInfo().getMatchedResources().get(0);
throw new ConstraintViolationException(cvs, match.describe().add(model));
}
}
return model;
}