| Class | Line # | Actions | |||||
|---|---|---|---|---|---|---|---|
| UserBridge | 37 | 0 | - | 0 | 0 |
| 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 | package org.xwiki.security.internal; | |
| 21 | ||
| 22 | import java.util.Collection; | |
| 23 | ||
| 24 | import org.xwiki.component.annotation.Role; | |
| 25 | import org.xwiki.model.reference.WikiReference; | |
| 26 | import org.xwiki.security.GroupSecurityReference; | |
| 27 | import org.xwiki.security.UserSecurityReference; | |
| 28 | import org.xwiki.security.authorization.AuthorizationException; | |
| 29 | ||
| 30 | /** | |
| 31 | * Temporary interface to access user information without depending on oldcore. | |
| 32 | * | |
| 33 | * @version $Id: 92d2b62a0f7c6803e6cb96674467e8386893f9cc $ | |
| 34 | * @since 4.0M2 | |
| 35 | */ | |
| 36 | @Role | |
| 37 | public interface UserBridge | |
| 38 | { | |
| 39 | /** | |
| 40 | * Retrieve the collection of group reference for which the user is a member in the given wiki. | |
| 41 | * | |
| 42 | * This method does not cache the results, so it should not be called too often. | |
| 43 | * | |
| 44 | * @param user the user to be queried. | |
| 45 | * @param wikiReference the reference of the wiki where group are evaluated. | |
| 46 | * @return the collection of group reference for which the user is a member in the given wiki. | |
| 47 | * @throws AuthorizationException if an error occurs during retrieval. | |
| 48 | */ | |
| 49 | Collection<GroupSecurityReference> getAllGroupsFor(UserSecurityReference user, WikiReference wikiReference) | |
| 50 | throws AuthorizationException; | |
| 51 | } |