private List < NavigationEntryInterface > recursiveGetEntries ( final List < NavigationEntryInterface > pnavigationEntries ) { if ( pnavigationEntries == null ) { return Collections . emptyList ( ) ; } return pnavigationEntries . stream ( ) . filter ( entry -> entry . canReveal ( ) ) . map ( entry -> { if ( entry instanceof NavigationEntryFolder ) { return new NavigationEntryFolder ( entry . getMenuValue ( ) , entry . isOpenOnStartup ( ) , recursiveGetEntries ( ( ( NavigationEntryFolder ) entry ) . getSubEntries ( ) ) ) ; } else { return entry ; } } ) . collect ( Collectors . toList ( ) ) ; }
get all navigation entries that can be displayed by a given user .