@Test public void testIsGroupFromGroupProvider() { ConversionRule conversionRule = new ConversionRule(); conversionRule.setPropertyName("id"); conversionRule.setSearchPattern("urn:collab:group:myuniversity.nl:(.+)"); conversionRule.setReplaceWith("$1"); groupProvider.addGroupDecorator(conversionRule); boolean isGroup = GroupProviderPropertyConverter.isGroupFromGroupProvider("urn:collab:group:myuniversity.nl:testgroup", groupProvider); assertTrue(isGroup); isGroup = GroupProviderPropertyConverter.isGroupFromGroupProvider("urn:collab:group:differentyuniversity.nl:testgroup", groupProvider); assertFalse(isGroup); isGroup = GroupProviderPropertyConverter.isGroupFromGroupProvider("urn:collab:group:surfteams.nl:testgroup", groupProvider); assertFalse(isGroup); }
public static boolean isGroupFromGroupProvider(String groupId, GroupProvider groupProvider) { return !convertToExternalGroupId(groupId, groupProvider).startsWith(GROUP_URN_PREFIX); }
GroupProviderPropertyConverter { public static boolean isGroupFromGroupProvider(String groupId, GroupProvider groupProvider) { return !convertToExternalGroupId(groupId, groupProvider).startsWith(GROUP_URN_PREFIX); } }
GroupProviderPropertyConverter { public static boolean isGroupFromGroupProvider(String groupId, GroupProvider groupProvider) { return !convertToExternalGroupId(groupId, groupProvider).startsWith(GROUP_URN_PREFIX); }  }
GroupProviderPropertyConverter { public static boolean isGroupFromGroupProvider(String groupId, GroupProvider groupProvider) { return !convertToExternalGroupId(groupId, groupProvider).startsWith(GROUP_URN_PREFIX); }  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 boolean isGroupFromGroupProvider(String groupId, GroupProvider groupProvider) { return !convertToExternalGroupId(groupId, groupProvider).startsWith(GROUP_URN_PREFIX); }  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; }