Class GroupPatternMatcher
- java.lang.Object
-
- pl.edu.icm.unity.engine.api.registration.GroupPatternMatcher
-
public class GroupPatternMatcher extends Object
Matcher of group to ant-style pattern. We support * as arbitrary characters within group name, ** as arbitrary subgroups. E.g.:/tenants/** /users matches: /tenant/foo/bar/users and /tenant/foo/users /tenants/grp* /users matches: /tenant/grpOther/users but not /tenant/grpOther/foo/users
- Author:
- K. Benedyczak
-
-
Constructor Summary
Constructors Constructor Description GroupPatternMatcher()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Group>
filterByIncludeGroupsMode(List<Group> allGroups, GroupRegistrationParam.IncludeGroupsMode mode)
static List<Group>
filterMatching(List<Group> allGroups, String pattern)
static List<Group>
filterMatching(List<Group> allGroups, Collection<String> filter)
static boolean
isValidPattern(String groupPath)
static boolean
matches(String group, String pattern)
-
-
-
Method Detail
-
filterMatching
public static List<Group> filterMatching(List<Group> allGroups, String pattern)
- Returns:
- list of those Group objects from allGroups which are matching the given pattern
-
filterByIncludeGroupsMode
public static List<Group> filterByIncludeGroupsMode(List<Group> allGroups, GroupRegistrationParam.IncludeGroupsMode mode)
- Returns:
- list of those Group objects from allGroups which are matching to the given group access mode
-
filterMatching
public static List<Group> filterMatching(List<Group> allGroups, Collection<String> filter)
- Returns:
- list of those Group objects from allGroups which are in filter list
-
isValidPattern
public static boolean isValidPattern(String groupPath)
-
-