Interface QValueConstraint

  • All Known Implementing Classes:
    ValueConstraint

    public interface QValueConstraint
    QValueConstraint is used to check the syntax of a value constraint and to test if a specific value satisfies it.
    See Also:
    PropertyDefinition.getValueConstraints()
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void check​(QValue value)
      Check if the specified value matches this constraint.
      java.lang.String getString()
      For constraints that are not namespace prefix mapping sensitive this method returns the same defined in PropertyDefinition.getValueConstraints().
    • Field Detail

      • EMPTY_ARRAY

        static final QValueConstraint[] EMPTY_ARRAY
        Empty array of QValueConstraint.
    • Method Detail

      • check

        void check​(QValue value)
            throws javax.jcr.nodetype.ConstraintViolationException,
                   javax.jcr.RepositoryException
        Check if the specified value matches this constraint.
        Parameters:
        value - The value to be tested.
        Throws:
        javax.jcr.nodetype.ConstraintViolationException - If the specified value is null or does not matches the constraint.
        javax.jcr.RepositoryException - If another error occurs.
      • getString

        java.lang.String getString()
        For constraints that are not namespace prefix mapping sensitive this method returns the same defined in PropertyDefinition.getValueConstraints().

        Those that are namespace prefix mapping sensitive (e.g. NameConstraint, PathConstraint and ReferenceConstraint) return an internal string.

        Returns:
        the internal definition String