1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity.intercept;
17
18 import org.acegisecurity.Authentication;
19 import org.acegisecurity.ConfigAttributeDefinition;
20
21
22 /***
23 * A return object received by {@link AbstractSecurityInterceptor} subclasses.
24 *
25 * <P>
26 * This class reflects the status of the security interception, so that the
27 * final call to {@link
28 * org.acegisecurity.intercept.AbstractSecurityInterceptor#afterInvocation(InterceptorStatusToken,
29 * Object)} can tidy up correctly.
30 * </p>
31 *
32 * @author Ben Alex
33 * @version $Id: InterceptorStatusToken.java,v 1.3 2005/11/17 00:55:51 benalex Exp $
34 */
35 public class InterceptorStatusToken {
36
37
38 private Authentication authentication;
39 private ConfigAttributeDefinition attr;
40 private Object secureObject;
41 private boolean contextHolderRefreshRequired;
42
43
44
45 public InterceptorStatusToken(Authentication authentication,
46 boolean contextHolderRefreshRequired, ConfigAttributeDefinition attr,
47 Object secureObject) {
48 this.authentication = authentication;
49 this.contextHolderRefreshRequired = contextHolderRefreshRequired;
50 this.attr = attr;
51 this.secureObject = secureObject;
52 }
53
54 protected InterceptorStatusToken() {
55 throw new IllegalArgumentException("Cannot use default constructor");
56 }
57
58
59
60 public ConfigAttributeDefinition getAttr() {
61 return attr;
62 }
63
64 public Authentication getAuthentication() {
65 return authentication;
66 }
67
68 public boolean isContextHolderRefreshRequired() {
69 return contextHolderRefreshRequired;
70 }
71
72 public Object getSecureObject() {
73 return secureObject;
74 }
75 }