1 /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
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.<P>This class reflects the status of
24 * the security interception, so that the final call to {@link
25 * org.acegisecurity.intercept.AbstractSecurityInterceptor#afterInvocation(InterceptorStatusToken, Object)} can tidy
26 * up correctly.</p>
27 *
28 * @author Ben Alex
29 * @version $Id: InterceptorStatusToken.java 1496 2006-05-23 13:38:33Z benalex $
30 */
31 public class InterceptorStatusToken {
32 //~ Instance fields ================================================================================================
33
34 private Authentication authentication;
35 private ConfigAttributeDefinition attr;
36 private Object secureObject;
37 private boolean contextHolderRefreshRequired;
38
39 //~ Constructors ===================================================================================================
40
41 public InterceptorStatusToken(Authentication authentication, boolean contextHolderRefreshRequired,
42 ConfigAttributeDefinition attr, Object secureObject) {
43 this.authentication = authentication;
44 this.contextHolderRefreshRequired = contextHolderRefreshRequired;
45 this.attr = attr;
46 this.secureObject = secureObject;
47 }
48
49 //~ Methods ========================================================================================================
50
51 public ConfigAttributeDefinition getAttr() {
52 return attr;
53 }
54
55 public Authentication getAuthentication() {
56 return authentication;
57 }
58
59 public Object getSecureObject() {
60 return secureObject;
61 }
62
63 public boolean isContextHolderRefreshRequired() {
64 return contextHolderRefreshRequired;
65 }
66 }