nl.surfnet.sab
Class SabClient
java.lang.Object
nl.surfnet.sab.SabClient
- All Implemented Interfaces:
- Sab
public class SabClient
- extends Object
- implements Sab
Client implementation for SAB.
Depends on an actual 'transport' for communication, most probably HttpClientTransport.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_DATE_TIME_FORMAT
protected static final org.joda.time.format.DateTimeFormatter XML_DATE_TIME_FORMAT
SabClient
public SabClient()
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)
createRequest
public String createRequest(String userId,
String messageId)
- Create request string from template
- Parameters:
userId - the userId to usemessageId - the messageId to use
- Returns:
- Serialized XML
setTransport
public void setTransport(SabTransport transport)
Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.