Clover coverage report - Acegi Security System for Spring - 1.0.0-RC1
Coverage timestamp: Mon Dec 5 2005 09:05:15 EST
file stats: LOC: 71   Methods: 3
NCLOC: 23   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
AuthorizedEvent.java 100% 71.4% 33.3% 66.7%
coverage coverage
 1    /* Copyright 2004, 2005 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.
 24    *
 25    * <P>
 26    * Published just before the secure object attempts to proceed.
 27    * </p>
 28    *
 29    * @author Ben Alex
 30    * @version $Id: AuthorizedEvent.java,v 1.2 2005/11/17 00:56:09 benalex Exp $
 31    */
 32    public class AuthorizedEvent extends AbstractAuthorizationEvent {
 33    //~ Instance fields ========================================================
 34   
 35    private Authentication authentication;
 36    private ConfigAttributeDefinition configAttributeDefinition;
 37   
 38    //~ Constructors ===========================================================
 39   
 40    /**
 41    * Construct the event.
 42    *
 43    * @param secureObject the secure object
 44    * @param configAttribs that apply to the secure object
 45    * @param authentication that successfully called the secure object
 46    *
 47    * @throws IllegalArgumentException DOCUMENT ME!
 48    */
 49  9 public AuthorizedEvent(Object secureObject,
 50    ConfigAttributeDefinition configAttribs, Authentication authentication) {
 51  9 super(secureObject);
 52   
 53  9 if ((configAttribs == null) || (authentication == null)) {
 54  2 throw new IllegalArgumentException(
 55    "All parameters are required and cannot be null");
 56    }
 57   
 58  7 this.configAttributeDefinition = configAttribs;
 59  7 this.authentication = authentication;
 60    }
 61   
 62    //~ Methods ================================================================
 63   
 64  0 public Authentication getAuthentication() {
 65  0 return authentication;
 66    }
 67   
 68  0 public ConfigAttributeDefinition getConfigAttributeDefinition() {
 69  0 return configAttributeDefinition;
 70    }
 71    }