Interface ProfileTargetingExpression

  • All Known Implementing Classes:
    DefaultProfileTargetingExpression

    public interface ProfileTargetingExpression
    Represents a single parsed profile targeting expression.

    The target-profile attribute can contain multiple comma seperated "profile targeting expressions" i.e. a list of them. See ResourceConfig docs. This class represents a single expression within a list of expressions.

    So, a single expression is composed of 1 or more "expression tokens" seperated by "AND". The expression arg to the constructor will be in one of the following forms:

    1. "profileX" i.e. a single entity.
    2. "profileX AND profileY" i.e. a compound entity.
    3. "profileX AND not:profileY" i.e. a compound entity.
    Note, we only supports "AND" operations between the tokens, but a token can be negated by prefixing it with "not:".

    See ProfileTargetingExpression.ExpressionToken.

    Author:
    tfennelly
    • Method Detail

      • isMatch

        boolean isMatch​(ProfileSet profileSet)
      • getSpecificity

        double getSpecificity​(ProfileSet profileSet)
      • getExpression

        String getExpression()