1
2
3
4
5
6 package com.hack23.cia.model.application.impl.user;
7
8 import java.util.Date;
9
10 import javax.persistence.DiscriminatorValue;
11 import javax.persistence.Entity;
12 import javax.persistence.EnumType;
13 import javax.persistence.Enumerated;
14
15 import org.hibernate.annotations.Cache;
16 import org.hibernate.annotations.CacheConcurrencyStrategy;
17
18 import com.hack23.cia.model.application.impl.common.UserSession;
19
20 /***
21 * The Class ExternalUrlActionEvent.
22 */
23 @Entity
24 @DiscriminatorValue("ExternalUrlActionEvent")
25 @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
26 public class ExternalUrlActionEvent extends AbstractUserActionEvent {
27
28 /***
29 * The Enum Operation.
30 */
31 public enum Operation {
32
33 /*** The Show donate to project. */
34 ShowDonateToProject,
35
36 /*** The Show project information. */
37 ShowProjectInformation,
38
39 /*** The Show wiki leaks. */
40 ShowWikiLeaks
41 }
42
43 /*** The Constant serialVersionUID. */
44 private static final long serialVersionUID = 1L;
45
46 /*** The operation. */
47 private Operation operation;
48
49 /***
50 * Instantiates a new external url action event.
51 */
52 public ExternalUrlActionEvent() {
53 }
54
55 /***
56 * Instantiates a new external url action event.
57 *
58 * @param createdDate the created date
59 * @param userSession the user session
60 * @param operation the operation
61 */
62 public ExternalUrlActionEvent(final Date createdDate,
63 final UserSession userSession, final Operation operation) {
64 super(createdDate, userSession);
65 this.operation = operation;
66 }
67
68 /***
69 * Gets the operation.
70 *
71 * @return the operation
72 */
73 @Enumerated(EnumType.STRING)
74 public Operation getOperation() {
75 return operation;
76 }
77
78 /***
79 * Sets the operation.
80 *
81 * @param operation the new operation
82 */
83 public void setOperation(final Operation operation) {
84 this.operation = operation;
85 }
86
87 }