throw BadRequestException.invalidPath( "Unexpected end of path string"); "Unexpected character '%s' at position %d for token starting at %d", (char)c, reader.pos - 1, reader.mark); throw BadRequestException.invalidPath(msg);
throw BadRequestException.invalidPath( "path field for add operations must not include any value " + "selection filters");
throw BadRequestException.invalidPath( "Unexpected end of path string"); "Unexpected character '%s' at position %d for token starting at %d", (char)c, reader.pos - 1, reader.mark); throw BadRequestException.invalidPath(msg);
throw BadRequestException.invalidPath( "path field for add operations must not include any value " + "selection filters");
/** * Throws an exception if there are schema validation errors. The exception * will contain all of the syntax errors, mutability errors or path issues * (in that order of precedence). The exception message will be the content * of baseExceptionMessage followed by a space delimited list of all of the * issues of the type (syntax, mutability, or path) being reported. * * @throws BadRequestException if issues are found during schema checking. */ public void throwSchemaExceptions() throws BadRequestException { if(syntaxIssues.size() > 0) { throw BadRequestException.invalidSyntax(getErrorString(syntaxIssues)); } if(mutabilityIssues.size() > 0) { throw BadRequestException.mutability(getErrorString(mutabilityIssues)); } if(pathIssues.size() > 0) { throw BadRequestException.invalidPath(getErrorString(pathIssues)); } if(filterIssues.size() > 0) { throw BadRequestException.invalidFilter(getErrorString(filterIssues)); } }
/** * Create a new patch operation. * * @param path The path targeted by this patch operation. * @throws ScimException If an value is not valid. */ PatchOperation(final Path path) throws ScimException { if(path != null) { if(path.size() > 2) { throw BadRequestException.invalidPath( "Path can not target sub-attributes more than one level deep"); } if(path.size() == 2) { Filter valueFilter = path.getElement(1).getValueFilter(); // Allow use of the special case "value" path to reference the value itself. // Any other value filter is for a sub-attribute, which is not permitted. if (valueFilter != null && !valueFilter.getAttributePath().getElement(0).getAttribute().equals("value")) { throw BadRequestException.invalidPath( "Path can not include a value filter on sub-attributes"); } } } this.path = path; }
/** * Create a new patch operation. * * @param path The path targeted by this patch operation. * @throws ScimException If an value is not valid. */ PatchOperation(final Path path) throws ScimException { if(path != null) { if(path.size() > 2) { throw BadRequestException.invalidPath( "Path can not target sub-attributes more than one level deep"); } if(path.size() == 2) { Filter valueFilter = path.getElement(1).getValueFilter(); // Allow use of the special case "value" path to reference the value itself. // Any other value filter is for a sub-attribute, which is not permitted. if (valueFilter != null && !valueFilter.getAttributePath().getElement(0).getAttribute().equals("value")) { throw BadRequestException.invalidPath( "Path can not include a value filter on sub-attributes"); } } } this.path = path; }
throw BadRequestException.invalidPath(e.getMessage()); throw BadRequestException.invalidPath(msg); final String msg = String.format( "Invalid value filter: %s", be.getMessage()); throw BadRequestException.invalidPath(msg); "Invalid attribute name starting at position %d: %s", reader.mark, e.getMessage()); throw BadRequestException.invalidPath(msg);
throw BadRequestException.invalidPath(e.getMessage()); throw BadRequestException.invalidPath(msg); final String msg = String.format( "Invalid value filter: %s", be.getMessage()); throw BadRequestException.invalidPath(msg); "Invalid attribute name starting at position %d: %s", reader.mark, e.getMessage()); throw BadRequestException.invalidPath(msg);