@Test public void testConvertToSurfConextPerson_AddUrnCollab() { String externalPersonId = "testuser"; String scPersonId = "urn:collab:person:myuniversity.nl:testuser"; ConversionRule conversionRule = new ConversionRule(); conversionRule.setPropertyName("id"); conversionRule.setSearchPattern("(.+)"); conversionRule.setReplaceWith("urn:collab:person:myuniversity.nl:$1"); groupProvider.addPersonDecorator(conversionRule); String result = GroupProviderPropertyConverter.convertToExternalPersonId(externalPersonId, groupProvider); assertEquals(scPersonId, result); }
public static String convertToExternalPersonId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getPersonDecorators(); return convertProperty(PROPERTY_ID, input, converters); }
GroupProviderPropertyConverter { public static String convertToExternalPersonId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getPersonDecorators(); return convertProperty(PROPERTY_ID, input, converters); } }
GroupProviderPropertyConverter { public static String convertToExternalPersonId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getPersonDecorators(); return convertProperty(PROPERTY_ID, input, converters); }  }
GroupProviderPropertyConverter { public static String convertToExternalPersonId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getPersonDecorators(); return convertProperty(PROPERTY_ID, input, converters); }  static boolean isGroupFromGroupProvider(String groupId, GroupProvider groupProvider); static String convertToExternalPersonId(String input, GroupProvider groupProvider); static String convertToSurfConextPersonId(String input, GroupProvider groupProvider); static String convertToExternalGroupId(String input, GroupProvider groupProvider); static String convertToSurfConextGroupId(String input, GroupProvider groupProvider); static String convertProperty(String propertyName, String propertyValue,
                                       List<ConversionRule> converters); }
GroupProviderPropertyConverter { public static String convertToExternalPersonId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getPersonDecorators(); return convertProperty(PROPERTY_ID, input, converters); }  static boolean isGroupFromGroupProvider(String groupId, GroupProvider groupProvider); static String convertToExternalPersonId(String input, GroupProvider groupProvider); static String convertToSurfConextPersonId(String input, GroupProvider groupProvider); static String convertToExternalGroupId(String input, GroupProvider groupProvider); static String convertToSurfConextGroupId(String input, GroupProvider groupProvider); static String convertProperty(String propertyName, String propertyValue,
                                       List<ConversionRule> converters); static final String PROPERTY_ID; static final String PROPERTY_NAME; static final String PROPERTY_DESCRIPTION; }