protected static String getAuditAPIUrl ( Dashboard dashboard , AuditSettings settings , long beginDate , long endDate ) { LOGGER . info ( "NFRR Audit Collector creates Audit API URL" ) ; if ( CollectionUtils . isEmpty ( settings . getServers ( ) ) ) { LOGGER . error ( "No Server Found to run NoFearRelease audit collector" ) ; throw new MBeanServerNotFoundException ( "No Server Found to run NoFearRelease audit collector" ) ; } URIBuilder auditURI = new URIBuilder ( ) ; auditURI . setPath ( settings . getServers ( ) . get ( 0 ) + HYGIEIA_AUDIT_URL ) ; auditURI . addParameter ( AUDIT_PARAMS . title . name ( ) , dashboard . getTitle ( ) ) ; auditURI . addParameter ( AUDIT_PARAMS . businessService . name ( ) , dashboard . getConfigurationItemBusServName ( ) ) ; auditURI . addParameter ( AUDIT_PARAMS . businessApplication . name ( ) , dashboard . getConfigurationItemBusAppName ( ) ) ; auditURI . addParameter ( AUDIT_PARAMS . beginDate . name ( ) , String . valueOf ( beginDate ) ) ; auditURI . addParameter ( AUDIT_PARAMS . endDate . name ( ) , String . valueOf ( endDate ) ) ; auditURI . addParameter ( AUDIT_PARAMS . auditType . name ( ) , "" ) ; String auditURIStr = auditURI . toString ( ) . replace ( "+" , " " ) ; return auditURIStr + AUDITTYPES_PARAM ; }
Construct audit api url