1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.security.authorization.cache

File SecurityCache.java

 

Code metrics

0
0
0
1
67
14
0
-
-
0
-

Classes

Class Line # Actions
SecurityCache 36 0 - 0 0
-1.0 -
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20   
21    package org.xwiki.security.authorization.cache;
22   
23    import org.xwiki.component.annotation.Role;
24    import org.xwiki.security.SecurityReference;
25    import org.xwiki.security.UserSecurityReference;
26    import org.xwiki.security.authorization.SecurityAccessEntry;
27    import org.xwiki.security.authorization.SecurityRuleEntry;
28   
29    /**
30    * A cache for fast access right rules checking.
31    *
32    * @version $Id: 7abc976fa019fffeb5cd785d4620ea8fcc874907 $
33    * @since 4.0M2
34    */
35    @Role
 
36    public interface SecurityCache
37    {
38    /**
39    * Get a cached entry.
40    * @param user Entity representing the user.
41    * @param entity The entity which is the object of this cache entry.
42    * @return The cache entry, or {@code null}.
43    */
44    SecurityAccessEntry get(UserSecurityReference user, SecurityReference entity);
45   
46    /**
47    * Get a cached entry.
48    * @param entity The entity which is the object of this cache entry.
49    * @return The cache entry, or {@code null}.
50    */
51    SecurityRuleEntry get(SecurityReference entity);
52   
53    /**
54    * Remove an entry from this cache. All child entries of this
55    * entry will also be removed.
56    * @param user Entity representing the user.
57    * @param entity The entity which is the object of this cache entry.
58    */
59    void remove(UserSecurityReference user, SecurityReference entity);
60   
61    /**
62    * Remove an entry from this cache. All child entries of this
63    * entry will also be removed.
64    * @param entity The entity which is the object of this cache entry.
65    */
66    void remove(SecurityReference entity);
67    }