1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity.event.authorization;
17
18 import org.acegisecurity.Authentication;
19 import org.acegisecurity.ConfigAttributeDefinition;
20
21
22 /***
23 * Event indicating a secure object was invoked successfully.
24 *
25 * <P>
26 * Published just before the secure object attempts to proceed.
27 * </p>
28 *
29 * @author Ben Alex
30 * @version $Id: AuthorizedEvent.java,v 1.2 2005/11/17 00:56:09 benalex Exp $
31 */
32 public class AuthorizedEvent extends AbstractAuthorizationEvent {
33
34
35 private Authentication authentication;
36 private ConfigAttributeDefinition configAttributeDefinition;
37
38
39
40 /***
41 * Construct the event.
42 *
43 * @param secureObject the secure object
44 * @param configAttribs that apply to the secure object
45 * @param authentication that successfully called the secure object
46 *
47 * @throws IllegalArgumentException DOCUMENT ME!
48 */
49 public AuthorizedEvent(Object secureObject,
50 ConfigAttributeDefinition configAttribs, Authentication authentication) {
51 super(secureObject);
52
53 if ((configAttribs == null) || (authentication == null)) {
54 throw new IllegalArgumentException(
55 "All parameters are required and cannot be null");
56 }
57
58 this.configAttributeDefinition = configAttribs;
59 this.authentication = authentication;
60 }
61
62
63
64 public Authentication getAuthentication() {
65 return authentication;
66 }
67
68 public ConfigAttributeDefinition getConfigAttributeDefinition() {
69 return configAttributeDefinition;
70 }
71 }