Line | |
---|
1 | package geniusweb.profilesserver.events;
|
---|
2 |
|
---|
3 | import geniusweb.profile.Profile;
|
---|
4 |
|
---|
5 | public class ProfileChangeEvent implements ChangeEvent {
|
---|
6 | private final Profile oldprof, newprof;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | *
|
---|
10 | * @param type the {@link ModificationType} of this event.
|
---|
11 | *
|
---|
12 | * @param old the profile before the change. Null if it was added.
|
---|
13 | * @param new the profile after the change. Null if it was removed
|
---|
14 | */
|
---|
15 | public ProfileChangeEvent(Profile oldprof, Profile newprof) {
|
---|
16 | this.oldprof = oldprof;
|
---|
17 | this.newprof = newprof;
|
---|
18 | }
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * @return the new protocol according to the change. May be null if the
|
---|
22 | * profile does not exist anymore or is unparsable or does not match
|
---|
23 | * the domain.
|
---|
24 | */
|
---|
25 | public Profile getOldProfile() {
|
---|
26 | return oldprof;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public Profile getNewProfile() {
|
---|
30 | return newprof;
|
---|
31 | }
|
---|
32 |
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.