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.springframework.security.intercept; 17 18 import org.springframework.security.Authentication; 19 import org.springframework.security.ConfigAttributeDefinition; 20 21 22 /** 23 * A return object received by {@link AbstractSecurityInterceptor} subclasses. 24 * <p> 25 * This class reflects the status of the security interception, so that the final call to 26 * {@link org.springframework.security.intercept.AbstractSecurityInterceptor#afterInvocation(InterceptorStatusToken, Object)} 27 * can tidy up correctly. 28 * 29 * @author Ben Alex 30 * @version $Id: InterceptorStatusToken.java 2417 2008-01-01 16:43:34Z luke_t $ 31 */ 32 public class InterceptorStatusToken { 33 //~ Instance fields ================================================================================================ 34 35 private Authentication authentication; 36 private ConfigAttributeDefinition attr; 37 private Object secureObject; 38 private boolean contextHolderRefreshRequired; 39 40 //~ Constructors =================================================================================================== 41 42 public InterceptorStatusToken(Authentication authentication, boolean contextHolderRefreshRequired, 43 ConfigAttributeDefinition attr, Object secureObject) { 44 this.authentication = authentication; 45 this.contextHolderRefreshRequired = contextHolderRefreshRequired; 46 this.attr = attr; 47 this.secureObject = secureObject; 48 } 49 50 //~ Methods ======================================================================================================== 51 52 public ConfigAttributeDefinition getAttr() { 53 return attr; 54 } 55 56 public Authentication getAuthentication() { 57 return authentication; 58 } 59 60 public Object getSecureObject() { 61 return secureObject; 62 } 63 64 public boolean isContextHolderRefreshRequired() { 65 return contextHolderRefreshRequired; 66 } 67 }