nl.surfnet.sab
Class SabClientMock
java.lang.Object
nl.surfnet.sab.SabClientMock
- All Implemented Interfaces:
- Sab
public class SabClientMock
- extends Object
- implements Sab
Mock implementation of SAB client that uses a predefined mapping of userIds to SabRoleHolders
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SabClientMock
public SabClientMock()
hasRoleForOrganisation
public boolean hasRoleForOrganisation(String userId,
String role,
String organisation)
- Description copied from interface:
Sab
- Returns whether the given user has the given role for the given organisation
- Specified by:
hasRoleForOrganisation in interface Sab
- Returns:
- boolean
getRoles
public SabRoleHolder getRoles(String userId)
throws IOException
- Description copied from interface:
Sab
- Get the Role/organisation info for the given userId
- Specified by:
getRoles in interface Sab
- Parameters:
userId - the userId to query for
- Returns:
- SabRoleHolder
- Throws:
IOException - when IO fails or an error occurs (for example authentication failure)
setTransport
public void setTransport(SabTransport transport)
Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.