Coverage Report - org.acegisecurity.acl.basic.BasicAclEntryCache
 
Classes in this File Line Coverage Branch Coverage Complexity
BasicAclEntryCache
N/A 
N/A 
1
 
 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.acl.basic;
 17  
 
 18  
 /**
 19  
  * Provides a cache of {@link BasicAclEntry} objects.
 20  
  *
 21  
  * <P>
 22  
  * Implementations should provide appropriate methods to set their cache
 23  
  * parameters (eg time-to-live) and/or force removal of entities before their
 24  
  * normal expiration. These are not part of the
 25  
  * <code>BasicAclEntryCache</code> interface contract because they vary
 26  
  * depending on the type of caching system used (eg in-memory vs disk vs
 27  
  * cluster vs hybrid).
 28  
  * </p>
 29  
  *
 30  
  * @author Ben Alex
 31  
  * @version $Id: BasicAclEntryCache.java 1784 2007-02-24 21:00:24Z luke_t $
 32  
  */
 33  
 public interface BasicAclEntryCache {
 34  
     //~ Methods ========================================================================================================
 35  
 
 36  
     /**
 37  
      * Obtains an array of {@link BasicAclEntry}s from the cache.
 38  
      *
 39  
      * @param aclObjectIdentity which should be obtained from the cache
 40  
      *
 41  
      * @return any applicable <code>BasicAclEntry</code>s (no <code>null</code>s are permitted in the returned array)
 42  
      *         or <code>null</code> if the object identity could not be found or if the cache entry has expired
 43  
      */
 44  
     BasicAclEntry[] getEntriesFromCache(AclObjectIdentity aclObjectIdentity);
 45  
 
 46  
     /**
 47  
      * Places an array of {@link BasicAclEntry}s in the cache.<P>No <code>null</code>s are allowed in the
 48  
      * passed array. If any <code>null</code> is passed, the implementation may throw an exception.</p>
 49  
      *
 50  
      * @param basicAclEntry the ACL entries to cache (the key will be extracted from the {@link
 51  
      *        BasicAclEntry#getAclObjectIdentity()} method
 52  
      */
 53  
     void putEntriesInCache(BasicAclEntry[] basicAclEntry);
 54  
 
 55  
     /**
 56  
      * Removes all ACL entries related to an {@link AclObjectIdentity} from the cache.
 57  
      *
 58  
      * @param aclObjectIdentity which should be removed from the cache
 59  
      */
 60  
     void removeEntriesFromCache(AclObjectIdentity aclObjectIdentity);
 61  
 }