package geniusweb.profilesserver.events; import geniusweb.profile.Profile; public class ProfileChangeEvent implements ChangeEvent { private final Profile oldprof, newprof; /** * * @param type the {@link ModificationType} of this event. * * @param old the profile before the change. Null if it was added. * @param new the profile after the change. Null if it was removed */ public ProfileChangeEvent(Profile oldprof, Profile newprof) { this.oldprof = oldprof; this.newprof = newprof; } /** * @return the new protocol according to the change. May be null if the * profile does not exist anymore or is unparsable or does not match * the domain. */ public Profile getOldProfile() { return oldprof; } public Profile getNewProfile() { return newprof; } }