@Test public void testConvertToExternalGroup_StripUrnCollab() { String identifier = "urn:collab:group:myuniversity.nl:testgroup"; ConversionRule conversionRule = new ConversionRule(); conversionRule.setPropertyName("id"); conversionRule.setSearchPattern("urn:collab:group:myuniversity.nl:(.+)"); conversionRule.setReplaceWith("$1"); groupProvider.addGroupDecorator(conversionRule); String externalId = GroupProviderPropertyConverter.convertToExternalGroupId(identifier, groupProvider); assertEquals("testgroup", externalId); }
public static String convertToExternalGroupId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getGroupDecorators(); return convertProperty(PROPERTY_ID, input, converters); }
GroupProviderPropertyConverter { public static String convertToExternalGroupId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getGroupDecorators(); return convertProperty(PROPERTY_ID, input, converters); } }
GroupProviderPropertyConverter { public static String convertToExternalGroupId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getGroupDecorators(); return convertProperty(PROPERTY_ID, input, converters); }  }
GroupProviderPropertyConverter { public static String convertToExternalGroupId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getGroupDecorators(); 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 convertToExternalGroupId(String input, GroupProvider groupProvider) { final List<ConversionRule> converters = groupProvider.getGroupDecorators(); 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; }