Rev 1306 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
163 | jmachado | 1 | package pt.estgp.estgweb.domain; |
2 | |||
3 | import org.apache.log4j.Logger; |
||
4 | |||
5 | import java.util.List; |
||
6 | import java.util.Date; |
||
7 | import java.io.Serializable; |
||
8 | |||
9 | import pt.estgp.estgweb.domain.enums.AnnouncementStyleEnum; |
||
10 | import pt.estgp.estgweb.utils.RoleManager; |
||
11 | |||
12 | /** |
||
13 | * @author Jorge Machado |
||
14 | * @date 2/Mar/2008 |
||
15 | * @time 10:27:25 |
||
16 | * @see pt.estgp.estgweb.domain |
||
17 | */ |
||
18 | public class ReminderImpl extends Reminder implements IOwned, IContextTimerObject |
||
19 | { |
||
20 | |||
21 | private static final 1.5.0/docs/api/java/util/logging/Logger.html">Logger logger = 1.5.0/docs/api/java/util/logging/Logger.html">Logger.getLogger(ReminderImpl.class); |
||
22 | |||
23 | |||
24 | public boolean isOwnedBy(GenericUser u) |
||
25 | { |
||
208 | jmachado | 26 | return isOwnedBy(u, false); |
27 | } |
||
28 | |||
29 | public boolean isOwnedBy(GenericUser u, boolean transaction) |
||
30 | { |
||
163 | jmachado | 31 | return u.getId() == getOwner().getId(); |
32 | } |
||
33 | |||
34 | public GenericUser getOwner() |
||
35 | { |
||
36 | return super.getOwner(); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Not implemented in reminders |
||
41 | * |
||
42 | * @return null |
||
43 | */ |
||
44 | public List<String> getOwnerRoles() |
||
45 | { |
||
46 | logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
||
47 | return null; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Not implemented in reminders |
||
52 | * |
||
53 | * @return null |
||
54 | */ |
||
55 | public 1.5.0/docs/api/java/lang/String.html">String getChoosedOwnerRole() |
||
56 | { |
||
57 | logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
||
58 | return null; |
||
59 | } |
||
60 | |||
61 | public 1.5.0/docs/api/java/io/Serializable.html">Serializable getSerializable() |
||
62 | { |
||
63 | return getId(); |
||
64 | } |
||
65 | |||
66 | public 5+0%2Fdocs%2Fapi+Date">Date getEndTime() |
||
67 | { |
||
68 | return super.getExpireDate(); |
||
69 | } |
||
70 | |||
71 | public 5+0%2Fdocs%2Fapi+Date">Date getStartTime() |
||
72 | { |
||
73 | return super.getStartDate(); |
||
74 | } |
||
75 | |||
76 | } |