Examples of InvalidExpressionException


Examples of org.rhq.core.domain.resource.group.InvalidExpressionException

                    value = Literal.NOTNULL;
                }
            } else if (comparisonType == ComparisonType.EQUALS || comparisonType == ComparisonType.NONE) {
                // pass through
            } else {
                throw new InvalidExpressionException("Unknown or unsupported ComparisonType[" + comparisonType
                    + "] for predicate population");
            }

            if (resourceExpressions.containsKey(predicateName) && whereConditions.containsKey(predicateName)) {
                throw new DuplicateExpressionTypeException(resourceExpressions.get(predicateName));
View Full Code Here

Examples of org.rhq.core.domain.resource.group.InvalidExpressionException

    private String parseTraitName(List<String> originalTokens) throws InvalidExpressionException {
        String prefix = "trait";
        String suffix = originalTokens.get(parseIndex).substring(prefix.length());
        if (suffix.length() < 3) {
            throw new InvalidExpressionException("Unrecognized trait name '" + suffix + "'");
        }
        if ((suffix.charAt(0) != '[') || (suffix.charAt(suffix.length() - 1) != ']')) {
            throw new InvalidExpressionException("Trait name '" + suffix
                + "' must be contained within '[' and ']' characters");
        }
        return suffix.substring(1, suffix.length() - 1);
    }
View Full Code Here

Examples of org.rhq.core.domain.resource.group.InvalidExpressionException

    private void validateSubExpressionAgainstPreviouslySeen(String normalizedSubExpression, boolean grouped,
        boolean membership) throws InvalidExpressionException {
        normalizedSubExpression = stripFunctionSuffix(normalizedSubExpression);
        if (grouped) {
            if (groupedSubExpressions.contains(normalizedSubExpression)) {
                throw new InvalidExpressionException("Redundant 'groupby' expression[" + normalizedSubExpression
                    + "] - these expressions must be unique");
            }
            if (simpleSubExpressions.contains(normalizedSubExpression)) {
                throw new InvalidExpressionException(
                    "Can not group by the same condition you are filtering on, expression[" + normalizedSubExpression
                        + "]");
            }
            groupedSubExpressions.add(normalizedSubExpression);

        } else if (membership) {
            if (memberSubExpressions.contains(normalizedSubExpression)) {
                throw new InvalidExpressionException("Redundant 'memberof' expression[" + normalizedSubExpression
                    + "] - these expressions must be unique");
            }
            memberSubExpressions.add(normalizedSubExpression);
        } else {
            if (groupedSubExpressions.contains(normalizedSubExpression)) {
                throw new InvalidExpressionException(
                    "Can not group by the same condition you are filtering on, expression[" + normalizedSubExpression
                        + "]");
            }
            simpleSubExpressions.add(normalizedSubExpression);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.