nl.surfnet.coin.teams.util
Class GroupProviderPropertyConverter

java.lang.Object
  extended by nl.surfnet.coin.teams.util.GroupProviderPropertyConverter

public class GroupProviderPropertyConverter
extends Object

Converts person and group identifiers.

SURFconext uses "urn:collab:(group|person):myuniversity.nl:myId", the institutions use only "myId"


Field Summary
static String PROPERTY_DESCRIPTION
           
static String PROPERTY_ID
           
static String PROPERTY_NAME
           
 
Constructor Summary
GroupProviderPropertyConverter()
           
 
Method Summary
static String convertProperty(String propertyName, String propertyValue, List<ConversionRule> converters)
          Converts input if there are conversion rules for the given property name
static String convertToExternalGroupId(String input, GroupProvider groupProvider)
          Converts a SURFconext group id (urn:collab:group:myuniversity.nl:myGroupId) to external form the group provider knows (myGroupId)
static String convertToExternalPersonId(String input, GroupProvider groupProvider)
          Converts a SURFconext person id (urn:collab:person:myuniversity.nl:myId) to external form the group provider knows (myId)
static String convertToSurfConextGroupId(String input, GroupProvider groupProvider)
          Converts an external group id provided by the group provider (myGroupId) into a group id used by the SURFconext platform (urn:collab:group:myuniversity.nl:myGroupId)
static String convertToSurfConextPersonId(String input, GroupProvider groupProvider)
          Converts an external person id provided by the group provider (myId) into a person id used by the SURFconext platform (urn:collab:person:myuniversity.nl:myId)
static boolean isGroupFromGroupProvider(String groupId, GroupProvider groupProvider)
          Determines if a SURFconext group id (urn:collab:group:myuniversity.nl:myGroupId) can be found at the GroupProvider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_ID

public static final String PROPERTY_ID
See Also:
Constant Field Values

PROPERTY_NAME

public static final String PROPERTY_NAME
See Also:
Constant Field Values

PROPERTY_DESCRIPTION

public static final String PROPERTY_DESCRIPTION
See Also:
Constant Field Values
Constructor Detail

GroupProviderPropertyConverter

public GroupProviderPropertyConverter()
Method Detail

isGroupFromGroupProvider

public static boolean isGroupFromGroupProvider(String groupId,
                                               GroupProvider groupProvider)
Determines if a SURFconext group id (urn:collab:group:myuniversity.nl:myGroupId) can be found at the GroupProvider.

Parameters:
groupId - group identifier used within the SURFconext platform
groupProvider - GroupProvider
Returns:

convertToExternalPersonId

public static String convertToExternalPersonId(String input,
                                               GroupProvider groupProvider)
Converts a SURFconext person id (urn:collab:person:myuniversity.nl:myId) to external form the group provider knows (myId)

Parameters:
input - person identifier used within the SURFconext platform
groupProvider - GroupProvider
Returns:
person identifier used at the external group provider

convertToSurfConextPersonId

public static String convertToSurfConextPersonId(String input,
                                                 GroupProvider groupProvider)
Converts an external person id provided by the group provider (myId) into a person id used by the SURFconext platform (urn:collab:person:myuniversity.nl:myId)

Parameters:
input - person identifier used by the group provider
groupProvider - GroupProvider
Returns:
person identifier used within the SURFconext platform

convertToExternalGroupId

public static String convertToExternalGroupId(String input,
                                              GroupProvider groupProvider)
Converts a SURFconext group id (urn:collab:group:myuniversity.nl:myGroupId) to external form the group provider knows (myGroupId)

Parameters:
input - group identifier used within the SURFconext platform
groupProvider - GroupProvider
Returns:
group identifier used at the external group provider

convertToSurfConextGroupId

public static String convertToSurfConextGroupId(String input,
                                                GroupProvider groupProvider)
Converts an external group id provided by the group provider (myGroupId) into a group id used by the SURFconext platform (urn:collab:group:myuniversity.nl:myGroupId)

Parameters:
input - group identifier used by the group provider
groupProvider - GroupProvider
Returns:
group identifier used within the SURFconext platform

convertProperty

public static String convertProperty(String propertyName,
                                     String propertyValue,
                                     List<ConversionRule> converters)
Converts input if there are conversion rules for the given property name

Parameters:
propertyName - name of a property that will be converted
propertyValue - value of a property
converters - list of ConversionRule's
Returns:
converted String, can be the same as the input if no rule applies


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