Class TagExpression

java.lang.Object
org.ametys.web.tags.TagExpression
All Implemented Interfaces:
Expression

public class TagExpression extends Object implements Expression
Constructs an Expression corresponding to a tag comparison.
  • Constructor Details

    • TagExpression

      public TagExpression(Expression.Operator operator, String value)
      Creates the expression.
      Parameters:
      operator - the operator to make the comparison (only Operator.EQ and Operator.NE allowed)
      value - the tag value
    • TagExpression

      public TagExpression(Expression.Operator operator, String value, String metadataName)
      Creates the expression.
      Parameters:
      operator - the operator to make the comparison (only Operator.EQ and Operator.NE allowed)
      value - the tag value
      metadataName - the metadata holding the tags
    • TagExpression

      public TagExpression(Expression.Operator operator, String[] values, TagExpression.LogicalOperator logicalOperator)
      Creates the expression.
      Parameters:
      operator - the operator to make the comparison (only Operator.EQ and Operator.NE allowed)
      values - the tags value in a array
      logicalOperator - the logical operator to use for given value
    • TagExpression

      public TagExpression(Expression.Operator operator, String[] values, TagExpression.LogicalOperator logicalOperator, String metadataName)
      Creates the expression.
      Parameters:
      operator - the operator to make the comparison (only Operator.EQ and Operator.NE allowed)
      values - the tags value in a array
      logicalOperator - the logical operator to use for given value
      metadataName - the metadata holding the tags
  • Method Details

    • build

      public String build()
      Description copied from interface: Expression
      Build the expression.
      Specified by:
      build in interface Expression
      Returns:
      The XPath view of the expression.