001 /* 002 * The Spring Framework is published under the terms of the Apache Software 003 * License. 004 */ 005 package org.springframework.rules.constraint.property; 006 007 import org.springframework.rules.constraint.Constraint; 008 009 /** 010 * A predicate that constrains a bean property in some way. 011 * 012 * @author Keith Donald 013 */ 014 public interface PropertyConstraint extends Constraint { 015 016 /** 017 * Returns the constrained property name. 018 * 019 * @return The property name 020 */ 021 public String getPropertyName(); 022 023 /** 024 * Returns <code>true</code> if this property constraint is dependent on 025 * the provided propertyName for test evaluation; that is, it should be retested 026 * when propertyName changes. 027 * @param propertyName 028 * @return true or false 029 */ 030 public boolean isDependentOn(String propertyName); 031 032 /** 033 * Does this property constraint effect more than one property? 034 * @return true if yes, false otherwise 035 */ 036 public boolean isCompoundRule(); 037 }