private Dashboard getDashboard ( String title , DashboardType type , String busServ , String busApp ) throws AuditException { if ( ! StringUtils . isEmpty ( title ) && ( type != null ) ) { return dashboardRepository . findByTitleAndType ( title , type ) ; } else if ( ! StringUtils . isEmpty ( busServ ) && ! StringUtils . isEmpty ( busApp ) ) { Cmdb busServItem = cmdbRepository . findByConfigurationItemAndItemType ( busServ , "app" ) ; if ( busServItem == null ) throw new AuditException ( "Invalid Business Service Name." , AuditException . BAD_INPUT_DATA ) ; Cmdb busAppItem = cmdbRepository . findByConfigurationItemAndItemType ( busApp , "component" ) ; if ( busAppItem == null ) throw new AuditException ( "Invalid Business Application Name." , AuditException . BAD_INPUT_DATA ) ; return dashboardRepository . findByConfigurationItemBusServNameIgnoreCaseAndConfigurationItemBusAppNameIgnoreCase ( busServItem . getConfigurationItem ( ) , busAppItem . getConfigurationItem ( ) ) ; } return null ; }
Finds the dashboard