@ SuppressWarnings ( "unchecked" ) public Map < String , Object > downloadPayload ( String path ) { try ( InputStream inputStream = externalPayloadStorage . download ( path ) ) { return objectMapper . readValue ( IOUtils . toString ( inputStream ) , Map . class ) ; } catch ( IOException e ) { logger . error ( "Unable to download payload from external storage path: {}" , path , e ) ; throw new ApplicationException ( ApplicationException . Code . INTERNAL_ERROR , e ) ; } }
Download the payload from the given path