Class GroupPatternMatcher
java.lang.Object
pl.edu.icm.unity.engine.api.registration.GroupPatternMatcher
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<pl.edu.icm.unity.base.group.Group>
filterByIncludeGroupsMode
(List<pl.edu.icm.unity.base.group.Group> allGroups, pl.edu.icm.unity.base.registration.GroupRegistrationParam.IncludeGroupsMode mode) static List<pl.edu.icm.unity.base.group.Group>
filterMatching
(List<pl.edu.icm.unity.base.group.Group> allGroups, String pattern) static List<pl.edu.icm.unity.base.group.Group>
filterMatching
(List<pl.edu.icm.unity.base.group.Group> allGroups, Collection<String> filter) static boolean
isValidPattern
(String groupPath) static boolean
-
Constructor Details
-
GroupPatternMatcher
public GroupPatternMatcher()
-
-
Method Details
-
matches
-
filterMatching
public static List<pl.edu.icm.unity.base.group.Group> filterMatching(List<pl.edu.icm.unity.base.group.Group> allGroups, String pattern) - Returns:
- list of those Group objects from allGroups which are matching the given pattern
-
filterByIncludeGroupsMode
public static List<pl.edu.icm.unity.base.group.Group> filterByIncludeGroupsMode(List<pl.edu.icm.unity.base.group.Group> allGroups, pl.edu.icm.unity.base.registration.GroupRegistrationParam.IncludeGroupsMode mode) - Returns:
- list of those Group objects from allGroups which are matching to the given group access mode
-
filterMatching
public static List<pl.edu.icm.unity.base.group.Group> filterMatching(List<pl.edu.icm.unity.base.group.Group> allGroups, Collection<String> filter) - Returns:
- list of those Group objects from allGroups which are in filter list
-
isValidPattern
-