private GroupMetadata findGroup ( GroupHierarchyConfig config , String parentGroupId ) { GroupMetadata parentGroup = findByRef ( Group . refById ( parentGroupId ) ) ; return parentGroup . getGroups ( ) . stream ( ) . filter ( group -> group . getName ( ) . equals ( config . getName ( ) ) ) . findFirst ( ) . orElse ( null ) ; }
Find group based on config instance and parent group identifier