public DashboardMenuItem getByViewName ( final String viewName ) { final Optional < DashboardMenuItem > findFirst = dashboardVaadinViews . stream ( ) . filter ( view -> view . getViewName ( ) . equals ( viewName ) ) . findAny ( ) ; if ( ! findFirst . isPresent ( ) ) { return null ; } return findFirst . get ( ) ; }
Returns the dashboard view type by a given view name .