001    package org.nakedobjects.applib.events;
002    
003    import org.nakedobjects.applib.Identifier;
004    
005    
006    /**
007     * Represents a check as to whether a particular value for a property is valid or not.
008     * 
009     * <p>
010     * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the value is invalid; otherwise
011     * the value is valid.
012     */
013    public class PropertyModifyEvent extends ValidityEvent implements ProposedHolderEvent {
014    
015        private static final long serialVersionUID = 1L;
016    
017        private final Object proposed;
018    
019        public PropertyModifyEvent(final Object source, final Identifier propertyIdentifier, final Object proposed) {
020            super(source, propertyIdentifier);
021            this.proposed = proposed;
022        }
023    
024        /**
025         * If <tt>null</tt>, then the property was cleared.
026         * 
027         * @return
028         */
029        public Object getProposed() {
030            return proposed;
031        }
032    
033    }