1 | |
package org.apache.maven.archiva.repository.audit; |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
public class AuditEvent |
28 | |
{ |
29 | |
public static final String CREATE_DIR = "Created Directory"; |
30 | |
|
31 | |
public static final String CREATE_FILE = "Created File"; |
32 | |
|
33 | |
public static final String REMOVE_DIR = "Removed Directory"; |
34 | |
|
35 | |
public static final String REMOVE_FILE = "Removed File"; |
36 | |
|
37 | |
public static final String MODIFY_FILE = "Modified File"; |
38 | |
|
39 | |
public static final String MOVE_FILE = "Moved File"; |
40 | |
|
41 | |
public static final String MOVE_DIRECTORY = "Moved Directory"; |
42 | |
|
43 | |
public static final String COPY_DIRECTORY = "Copied Directory"; |
44 | |
|
45 | |
public static final String COPY_FILE = "Copied File"; |
46 | |
|
47 | |
public static final String UPLOAD_FILE = "Uploaded File"; |
48 | |
|
49 | |
public static final String ADD_LEGACY_PATH = "Added Legacy Artifact Path"; |
50 | |
|
51 | |
public static final String REMOVE_LEGACY_PATH = "Removed Legacy Artifact Path"; |
52 | |
|
53 | |
public static final String PURGE_ARTIFACT = "Purged Artifact"; |
54 | |
|
55 | |
public static final String PURGE_FILE = "Purged Support File"; |
56 | |
|
57 | |
public static final String REMOVE_SCANNED = "Removed in Filesystem"; |
58 | |
|
59 | |
|
60 | |
|
61 | |
public static final String ADD_MANAGED_REPO = "Added Managed Repository"; |
62 | |
|
63 | |
public static final String MODIFY_MANAGED_REPO = "Updated Managed Repository"; |
64 | |
|
65 | |
public static final String DELETE_MANAGED_REPO = "Deleted Managed Repository"; |
66 | |
|
67 | |
public static final String ADD_REMOTE_REPO = "Added Remote Repository"; |
68 | |
|
69 | |
public static final String MODIFY_REMOTE_REPO = "Updated Remote Repository"; |
70 | |
|
71 | |
public static final String DELETE_REMOTE_REPO = "Deleted Remote Repository"; |
72 | |
|
73 | |
public static final String ADD_REPO_GROUP = "Added Repository Group"; |
74 | |
|
75 | |
public static final String DELETE_REPO_GROUP = "Deleted Repository Group"; |
76 | |
|
77 | |
public static final String ADD_REPO_TO_GROUP = "Added Repository to Group"; |
78 | |
|
79 | |
public static final String DELETE_REPO_FROM_GROUP = "Deleted Repository from Group"; |
80 | |
|
81 | |
public static final String ENABLE_REPO_CONSUMER = "Enabled Content Consumer"; |
82 | |
|
83 | |
public static final String DISABLE_REPO_CONSUMER = "Disabled Content Consumer"; |
84 | |
|
85 | |
public static final String ENABLE_DB_CONSUMER = "Enabled Database Consumer"; |
86 | |
|
87 | |
public static final String DISABLE_DB_CONSUMER = "Disabled Database Consumer"; |
88 | |
|
89 | |
public static final String ADD_PATTERN = "Added File Type Pattern"; |
90 | |
|
91 | |
public static final String REMOVE_PATTERN = "Removed File Type Pattern"; |
92 | |
|
93 | |
public static final String DB_SCHEDULE = "Modified Scanning Schedule"; |
94 | |
|
95 | |
private String repositoryId; |
96 | |
|
97 | |
private String userId; |
98 | |
|
99 | |
private String remoteIP; |
100 | |
|
101 | |
private String resource; |
102 | |
|
103 | |
private String action; |
104 | |
|
105 | |
public AuditEvent() |
106 | 0 | { |
107 | |
|
108 | 0 | } |
109 | |
|
110 | |
public AuditEvent( String repoId, String user, String resource, String action ) |
111 | 0 | { |
112 | 0 | this.repositoryId = repoId; |
113 | 0 | this.userId = user; |
114 | 0 | this.resource = resource; |
115 | 0 | this.action = action; |
116 | 0 | } |
117 | |
|
118 | |
public AuditEvent( String user, String resource, String action ) |
119 | |
{ |
120 | 0 | this( null, user, resource, action ); |
121 | 0 | } |
122 | |
|
123 | |
public AuditEvent( String principal, String action2 ) |
124 | |
{ |
125 | 0 | this( null, principal, action2 ); |
126 | 0 | } |
127 | |
|
128 | |
public String getRepositoryId() |
129 | |
{ |
130 | 0 | return repositoryId; |
131 | |
} |
132 | |
|
133 | |
public void setRepositoryId( String repositoryId ) |
134 | |
{ |
135 | 0 | this.repositoryId = repositoryId; |
136 | 0 | } |
137 | |
|
138 | |
public String getUserId() |
139 | |
{ |
140 | 0 | return userId; |
141 | |
} |
142 | |
|
143 | |
public void setUserId( String userId ) |
144 | |
{ |
145 | 0 | this.userId = userId; |
146 | 0 | } |
147 | |
|
148 | |
public String getResource() |
149 | |
{ |
150 | 0 | return resource; |
151 | |
} |
152 | |
|
153 | |
public void setResource( String resource ) |
154 | |
{ |
155 | 0 | this.resource = resource; |
156 | 0 | } |
157 | |
|
158 | |
public String getAction() |
159 | |
{ |
160 | 0 | return action; |
161 | |
} |
162 | |
|
163 | |
public void setAction( String action ) |
164 | |
{ |
165 | 0 | this.action = action; |
166 | 0 | } |
167 | |
|
168 | |
public String getRemoteIP() |
169 | |
{ |
170 | 0 | return remoteIP; |
171 | |
} |
172 | |
|
173 | |
public void setRemoteIP( String remoteIP ) |
174 | |
{ |
175 | 0 | this.remoteIP = remoteIP; |
176 | 0 | } |
177 | |
} |