001 package org.nakedobjects.applib.events;
002
003 import org.nakedobjects.applib.Identifier;
004
005
006 /**
007 * Represents a check as to whether the current values of the properties/collections of an object are valid
008 * (for example, prior to saving that object).
009 *
010 * <p>
011 * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the object is invalid,
012 * otherwise ok.
013 */
014 public class ObjectValidityEvent extends ValidityEvent implements ProposedHolderEvent {
015
016 private static final long serialVersionUID = 1L;
017
018 public ObjectValidityEvent(final Object source, final Identifier classIdentifier) {
019 super(source, classIdentifier);
020 }
021
022 public Object getProposed() {
023 return getSource();
024 }
025
026 }