nl.surfnet.coin.janus
Class JanusRestClient

java.lang.Object
  extended by nl.surfnet.coin.janus.JanusRestClient
All Implemented Interfaces:
Janus

public class JanusRestClient
extends Object
implements Janus

REST client implementation for Janus.


Nested Class Summary
 
Nested classes/interfaces inherited from interface nl.surfnet.coin.janus.Janus
Janus.Metadata
 
Constructor Summary
JanusRestClient()
           
 
Method Summary
 List<String> getAllowedSps(String idpentityid)
          Refer to Janus.getAllowedSps(String, String) but without the revision parameter.
 List<String> getAllowedSps(String idpentityid, String revision)
          Get a list of SP entity ID's that are allowed for this IdP.
 ARP getArp(String entityId)
          Retrieves the Attribute Release Policy for this entity
 JanusEntity getEntity(String entityId)
          Gets the Janus Entity information for the given entityId
 List<String> getEntityIdsByMetaData(Janus.Metadata key, String value)
          Get a list of entity ids that match the given metadata key/value pair.
 List<EntityMetadata> getIdpList()
          Retrieves a list of all Identity Providers.
 EntityMetadata getMetadataByEntityId(String entityId)
          Get a client's metadata by his entityId.
 List<EntityMetadata> getSpList()
          Retrieves a list of all Service Providers.
 boolean isConnectionAllowed(String spEntityId, String idpEntityId)
          Return true or false depending wether connection is allowed or not.
 void setJanusUri(URI janusUri)
           
 void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate)
           
 void setSecret(String secret)
           
 void setUser(String user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JanusRestClient

public JanusRestClient()
Method Detail

getMetadataByEntityId

public EntityMetadata getMetadataByEntityId(String entityId)
Get a client's metadata by his entityId.

Specified by:
getMetadataByEntityId in interface Janus
Parameters:
entityId - the entityId

getEntityIdsByMetaData

public List<String> getEntityIdsByMetaData(Janus.Metadata key,
                                           String value)
Description copied from interface: Janus
Get a list of entity ids that match the given metadata key/value pair.

Specified by:
getEntityIdsByMetaData in interface Janus
Parameters:
key - the metadata key
value - the value the give metadata key should have
Returns:
the entity id

getAllowedSps

public List<String> getAllowedSps(String idpentityid)
Description copied from interface: Janus
Refer to Janus.getAllowedSps(String, String) but without the revision parameter.

Specified by:
getAllowedSps in interface Janus

getAllowedSps

public List<String> getAllowedSps(String idpentityid,
                                  String revision)
Description copied from interface: Janus
Get a list of SP entity ID's that are allowed for this IdP.

Specified by:
getAllowedSps in interface Janus
Parameters:
idpentityid - the IdPs entity id.
revision - the revision.
Returns:
List of entity id's from service providers the idp is linked to

getSpList

public List<EntityMetadata> getSpList()
Description copied from interface: Janus
Retrieves a list of all Service Providers.

Specified by:
getSpList in interface Janus
Returns:
for each SP (by entity id), a map of attributes and its values.

getIdpList

public List<EntityMetadata> getIdpList()
Description copied from interface: Janus
Retrieves a list of all Identity Providers.

Specified by:
getIdpList in interface Janus
Returns:
for each IDP (by entity id), a map of attributes and its values.

getArp

public ARP getArp(String entityId)
Description copied from interface: Janus
Retrieves the Attribute Release Policy for this entity

Specified by:
getArp in interface Janus
Parameters:
entityId - the identifier of the entity
Returns:
ARP

isConnectionAllowed

public boolean isConnectionAllowed(String spEntityId,
                                   String idpEntityId)
Description copied from interface: Janus
Return true or false depending wether connection is allowed or not.

Specified by:
isConnectionAllowed in interface Janus
Parameters:
spEntityId - identifier of the Service Provider
idpEntityId - identifier of the Identity Provider
Returns:
true of the connection is allowed, otherwise false

getEntity

public JanusEntity getEntity(String entityId)
Description copied from interface: Janus
Gets the Janus Entity information for the given entityId

Specified by:
getEntity in interface Janus
Parameters:
entityId - unique identifier of a Janus entity
Returns:
JanusEntity

setRestTemplate

public void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate)
Parameters:
restTemplate - the restTemplate to set

setJanusUri

public void setJanusUri(URI janusUri)
Parameters:
janusUri - the janusUri to set

setUser

public void setUser(String user)
Parameters:
user - the user to set

setSecret

public void setSecret(String secret)
Parameters:
secret - the secret to set


Copyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.