001    package org.nakedobjects.applib.events;
002    
003    import org.nakedobjects.applib.Identifier;
004    
005    
006    /**
007     * Represents a check to determine whether a proposed change is valid.
008     * 
009     * <p>
010     * Multiple subclasses, including:
011     * <ul>
012     * <li>modifying a property</li>
013     * <li>adding to/removing from a collection</li>
014     * <li>checking a single argument for an action invocation</li>
015     * <li>checking all arguments for an action invocation</li>
016     * <li>checking all properties for an object before saving</li>
017     * </ul>
018     * 
019     * <p>
020     * If {@link #getReason()} is <tt>null</tt>, then is usable; otherwise is disabled.
021     * 
022     * @see AccessEvent
023     * @see VisibilityEvent
024     * @see UsabilityEvent
025     */
026    public abstract class ValidityEvent extends InteractionEvent {
027    
028        private static final long serialVersionUID = 1L;
029    
030        public ValidityEvent(final Object source, final Identifier identifier) {
031            super(source, identifier);
032        }
033    
034        @Override
035        public Object getSource() {
036            return super.getSource();
037        }
038    }