nl.surfnet.coin.selfservice.service.impl
Class ServiceRegistryProviderService

java.lang.Object
  extended by nl.surfnet.coin.selfservice.service.impl.ServiceRegistryProviderService
All Implemented Interfaces:
ServiceProviderService

public class ServiceRegistryProviderService
extends Object
implements ServiceProviderService


Constructor Summary
ServiceRegistryProviderService()
           
 
Method Summary
static ServiceProvider buildServiceProviderByMetadata(nl.surfnet.coin.janus.domain.EntityMetadata metadata)
          Create a ServiceProvider and inflate it with the given metadata attributes.
static ContactPersonType contactPersonTypeByJanusContactType(nl.surfnet.coin.janus.domain.Contact.Type contactType)
          Convert a Janus contact type to a ServiceProvider's ContactPersonType.
 List<ServiceProvider> getAllServiceProviders(String idpId)
          Get a list of all available Service Providers for the given idpId.
 List<String> getLinkedServiceProviderIDs(String idpId)
           
 List<ServiceProvider> getLinkedServiceProviders(String idpId)
          It's "cheaper" to get all SPs from ServiceRegistry and iterate over them than to retrieve the list of all linked entity id's and then get their individual metadata.
 ServiceProvider getServiceProvider(String spEntityId, String idpEntityId)
          Get a ServiceProvider by its entity ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceRegistryProviderService

public ServiceRegistryProviderService()
Method Detail

getAllServiceProviders

@Cacheable(value="sps-janus")
public List<ServiceProvider> getAllServiceProviders(String idpId)
Description copied from interface: ServiceProviderService
Get a list of all available Service Providers for the given idpId.

Specified by:
getAllServiceProviders in interface ServiceProviderService
Parameters:
idpId - the IDP entity ID to filter on
Returns:
list of ServiceProvider

getLinkedServiceProviders

public List<ServiceProvider> getLinkedServiceProviders(String idpId)
It's "cheaper" to get all SPs from ServiceRegistry and iterate over them than to retrieve the list of all linked entity id's and then get their individual metadata. Get a list of all Service Providers that are linked to the given idpIdp

Specified by:
getLinkedServiceProviders in interface ServiceProviderService
Parameters:
idpId - the entity id of the IdentityProvider
Returns:
list of ServiceProvider's

getLinkedServiceProviderIDs

@Cacheable(value="sps-janus")
public List<String> getLinkedServiceProviderIDs(String idpId)

getServiceProvider

@Cacheable(value="sps-janus")
public ServiceProvider getServiceProvider(String spEntityId,
                                                    String idpEntityId)
Description copied from interface: ServiceProviderService
Get a ServiceProvider by its entity ID.

Specified by:
getServiceProvider in interface ServiceProviderService
Parameters:
spEntityId - the entity id of the ServiceProvider
idpEntityId - the entity id of the Identity Provider.
Returns:
the ServiceProvider object.

buildServiceProviderByMetadata

public static ServiceProvider buildServiceProviderByMetadata(nl.surfnet.coin.janus.domain.EntityMetadata metadata)
Create a ServiceProvider and inflate it with the given metadata attributes.

Parameters:
metadata - Janus metadata
Returns:
ServiceProvider

contactPersonTypeByJanusContactType

public static ContactPersonType contactPersonTypeByJanusContactType(nl.surfnet.coin.janus.domain.Contact.Type contactType)
Convert a Janus contact type to a ServiceProvider's ContactPersonType.

Parameters:
contactType - the Janus type
Returns:
the ContactPersonType
Throws:
IllegalArgumentException - in case no match can be made.


Copyright © 2012 SURFnet bv, The Netherlands. All Rights Reserved.