01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * 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: * A return object received by {@link AbstractSecurityInterceptor} subclasses.<P>This class reflects the status of
23: * the security interception, so that the final call to {@link
24: * org.acegisecurity.intercept.AbstractSecurityInterceptor#afterInvocation(InterceptorStatusToken, Object)} can tidy
25: * up correctly.</p>
26: *
27: * @author Ben Alex
28: * @version $Id: InterceptorStatusToken.java 1496 2006-05-23 13:38:33Z benalex $
29: */
30: public class InterceptorStatusToken {
31: //~ Instance fields ================================================================================================
32:
33: private Authentication authentication;
34: private ConfigAttributeDefinition attr;
35: private Object secureObject;
36: private boolean contextHolderRefreshRequired;
37:
38: //~ Constructors ===================================================================================================
39:
40: public InterceptorStatusToken(Authentication authentication,
41: 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: }
|