class InventoryUtil {

    public static boolean refreshInventoryOnOutOfBand()
    {
        logger.debug( "push inventory to Out of band starts" );

        String hmsIbInventoryLocation = SpringContextHelper.getIbInventoryLocaiton();
        if ( hmsIbInventoryLocation != null )
        {
            try
            {
                Map<String, Object[]> inventoryMap = InventoryUtil.initializeInventory( hmsIbInventoryLocation );
                AggregatorUtil.populatePlainTextPasswords( inventoryMap );

                HmsOobAgentRestTemplate<Map<String, Object[]>> restTemplate =
                    new HmsOobAgentRestTemplate<Map<String, Object[]>>( inventoryMap );

                ResponseEntity<Object> response =
                    restTemplate.exchange( HttpMethod.PUT, Constants.HMS_OOB_INVENTORY_RELOAD, Object.class );

                if ( response != null && response.getStatusCode() == HttpStatus.OK )
                {
                    logger.info( "push inventory to Out of band ends successfully" );
                    return true;
                }

                String exceptionMsg =
                    String.format( "Unsuccessful response: {} from: %s, , can't complete inventory refresh on Out of band",
                                   response, Constants.HMS_OOB_INVENTORY_RELOAD );

                logger.error( exceptionMsg );

            }
            catch ( Throwable e )
            {
                logger.error( "Exception occured while loading the inventory on Hms oob agent: {}", e );
            }
        }
        else
        {
            String err =
                String.format( "invalid inventory location: %s, can't complete inventory refresh on Out of band",
                               hmsIbInventoryLocation );
            logger.error( err );
        }
        return false;
    }

}