Coverage Report - org.acegisecurity.event.authorization.AuthorizedEvent
 
Classes in this File Line Coverage Branch Coverage Complexity
AuthorizedEvent
75% 
100% 
1.667
 
 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.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.<P>Published just before the secure object attempts to
 24  
  * proceed.</p>
 25  
  *
 26  
  * @author Ben Alex
 27  
  * @version $Id: AuthorizedEvent.java 1496 2006-05-23 13:38:33Z benalex $
 28  
  */
 29  
 public class AuthorizedEvent extends AbstractAuthorizationEvent {
 30  
     //~ Instance fields ================================================================================================
 31  
 
 32  
     private Authentication authentication;
 33  
     private ConfigAttributeDefinition configAttributeDefinition;
 34  
 
 35  
     //~ Constructors ===================================================================================================
 36  
 
 37  
 /**
 38  
      * Construct the event.
 39  
      *
 40  
      * @param secureObject the secure object
 41  
      * @param configAttribs that apply to the secure object
 42  
      * @param authentication that successfully called the secure object
 43  
      *
 44  
      * @throws IllegalArgumentException DOCUMENT ME!
 45  
      */
 46  
     public AuthorizedEvent(Object secureObject, ConfigAttributeDefinition configAttribs, Authentication authentication) {
 47  28
         super(secureObject);
 48  
 
 49  27
         if ((configAttribs == null) || (authentication == null)) {
 50  2
             throw new IllegalArgumentException("All parameters are required and cannot be null");
 51  
         }
 52  
 
 53  25
         this.configAttributeDefinition = configAttribs;
 54  25
         this.authentication = authentication;
 55  25
     }
 56  
 
 57  
     //~ Methods ========================================================================================================
 58  
 
 59  
     public Authentication getAuthentication() {
 60  0
         return authentication;
 61  
     }
 62  
 
 63  
     public ConfigAttributeDefinition getConfigAttributeDefinition() {
 64  0
         return configAttributeDefinition;
 65  
     }
 66  
 }