throw BadRequestException.invalidFilter( "Unexpected end of filter string"); throw BadRequestException.invalidFilter( "Unexpected end of filter string"); throw BadRequestException.invalidFilter( "Unexpected end of filter string"); throw BadRequestException.invalidFilter( "Unexpected end of filter string");
throw BadRequestException.invalidFilter( "Unexpected end of filter string"); throw BadRequestException.invalidFilter( "Unexpected end of filter string"); throw BadRequestException.invalidFilter( "Unexpected end of filter string"); throw BadRequestException.invalidFilter( "Unexpected end of filter string");
"Unexpected character '%s' at position %d for token starting at %d", (char)c, reader.pos - 1, reader.mark); throw BadRequestException.invalidFilter(msg);
"Unexpected character '%s' at position %d for token starting at %d", (char)c, reader.pos - 1, reader.mark); throw BadRequestException.invalidFilter(msg);
/** * 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)); } }
throw BadRequestException.invalidFilter( "Unexpected end of filter string"); throw BadRequestException.invalidFilter(msg); String.format("No opening parenthesis matching closing " + "parenthesis at position %d", reader.mark); throw BadRequestException.invalidFilter(msg); "Invalid attribute path at position %d: %s", reader.mark, e.getMessage()); throw BadRequestException.invalidFilter(msg); throw BadRequestException.invalidFilter(msg); "Invalid attribute path at position %d: %s", reader.mark, e.getMessage()); throw BadRequestException.invalidFilter(msg); throw BadRequestException.invalidFilter(msg); throw BadRequestException.invalidFilter( "Unexpected end of filter string"); "Invalid comparison value at position %d: %s", reader.mark, e.getMessage()); throw BadRequestException.invalidFilter(msg); throw BadRequestException.invalidFilter(
throw BadRequestException.invalidFilter( "Unexpected end of filter string"); throw BadRequestException.invalidFilter(msg); String.format("No opening parenthesis matching closing " + "parenthesis at position %d", reader.mark); throw BadRequestException.invalidFilter(msg); "Invalid attribute path at position %d: %s", reader.mark, e.getMessage()); throw BadRequestException.invalidFilter(msg); throw BadRequestException.invalidFilter(msg); "Invalid attribute path at position %d: %s", reader.mark, e.getMessage()); throw BadRequestException.invalidFilter(msg); throw BadRequestException.invalidFilter(msg); throw BadRequestException.invalidFilter( "Unexpected end of filter string"); "Invalid comparison value at position %d: %s", reader.mark, e.getMessage()); throw BadRequestException.invalidFilter(msg); throw BadRequestException.invalidFilter(
/** * {@inheritDoc} */ public Boolean visit(final LessThanFilter filter, final JsonNode object) throws ScimException { Iterable<JsonNode> nodes = getCandidateNodes(filter.getAttributePath(), object); for (JsonNode node : nodes) { if (node.isBoolean() || node.isBinary()) { throw BadRequestException.invalidFilter("Less than or equal " + "filter may not compare boolean or binary attribute values"); } if (JsonUtils.compareTo(node, filter.getComparisonValue(), getAttributeDefinition(filter.getAttributePath())) < 0) { return true; } } return false; }
/** * {@inheritDoc} */ public Boolean visit(final GreaterThanFilter filter, final JsonNode object) throws ScimException { Iterable<JsonNode> nodes = getCandidateNodes(filter.getAttributePath(), object); for (JsonNode node : nodes) { if (node.isBoolean() || node.isBinary()) { throw BadRequestException.invalidFilter( "Greater than filter may not compare boolean or binary " + "attribute values"); } if (JsonUtils.compareTo(node, filter.getComparisonValue(), getAttributeDefinition(filter.getAttributePath())) > 0) { return true; } } return false; }
/** * {@inheritDoc} */ public Boolean visit(final GreaterThanFilter filter, final JsonNode object) throws ScimException { Iterable<JsonNode> nodes = getCandidateNodes(filter.getAttributePath(), object); for (JsonNode node : nodes) { if (node.isBoolean() || node.isBinary()) { throw BadRequestException.invalidFilter( "Greater than filter may not compare boolean or binary " + "attribute values"); } if (JsonUtils.compareTo(node, filter.getComparisonValue(), getAttributeDefinition(filter.getAttributePath())) > 0) { return true; } } return false; }
/** * {@inheritDoc} */ public Boolean visit(final LessThanOrEqualFilter filter, final JsonNode object) throws ScimException { Iterable<JsonNode> nodes = getCandidateNodes(filter.getAttributePath(), object); for (JsonNode node : nodes) { if (node.isBoolean() || node.isBinary()) { throw BadRequestException.invalidFilter("Less than or equal " + "filter may not compare boolean or binary attribute values"); } if (JsonUtils.compareTo(node, filter.getComparisonValue(), getAttributeDefinition(filter.getAttributePath())) <= 0) { return true; } } return false; }
/** * {@inheritDoc} */ public Boolean visit(final LessThanFilter filter, final JsonNode object) throws ScimException { Iterable<JsonNode> nodes = getCandidateNodes(filter.getAttributePath(), object); for (JsonNode node : nodes) { if (node.isBoolean() || node.isBinary()) { throw BadRequestException.invalidFilter("Less than or equal " + "filter may not compare boolean or binary attribute values"); } if (JsonUtils.compareTo(node, filter.getComparisonValue(), getAttributeDefinition(filter.getAttributePath())) < 0) { return true; } } return false; }
/** * {@inheritDoc} */ public Boolean visit(final GreaterThanOrEqualFilter filter, final JsonNode object) throws ScimException { Iterable<JsonNode> nodes = getCandidateNodes(filter.getAttributePath(), object); for (JsonNode node : nodes) { if (node.isBoolean() || node.isBinary()) { throw BadRequestException.invalidFilter("Greater than or equal " + "filter may not compare boolean or binary attribute values"); } if (JsonUtils.compareTo(node, filter.getComparisonValue(), getAttributeDefinition(filter.getAttributePath())) >= 0) { return true; } } return false; }
/** * {@inheritDoc} */ public Boolean visit(final LessThanOrEqualFilter filter, final JsonNode object) throws ScimException { Iterable<JsonNode> nodes = getCandidateNodes(filter.getAttributePath(), object); for (JsonNode node : nodes) { if (node.isBoolean() || node.isBinary()) { throw BadRequestException.invalidFilter("Less than or equal " + "filter may not compare boolean or binary attribute values"); } if (JsonUtils.compareTo(node, filter.getComparisonValue(), getAttributeDefinition(filter.getAttributePath())) <= 0) { return true; } } return false; }
/** * {@inheritDoc} */ public Boolean visit(final GreaterThanOrEqualFilter filter, final JsonNode object) throws ScimException { Iterable<JsonNode> nodes = getCandidateNodes(filter.getAttributePath(), object); for (JsonNode node : nodes) { if (node.isBoolean() || node.isBinary()) { throw BadRequestException.invalidFilter("Greater than or equal " + "filter may not compare boolean or binary attribute values"); } if (JsonUtils.compareTo(node, filter.getComparisonValue(), getAttributeDefinition(filter.getAttributePath())) >= 0) { return true; } } return false; }