private List < IntuitMessage > prepareUpload ( List < UploadEntry > entries ) throws FMSException { List < IntuitMessage > intuitMessages = new ArrayList < IntuitMessage > ( ) ; String boundaryId = null ; for ( UploadEntry item : entries ) { if ( item . isEmpty ( ) ) { LOG . warn ( "UploadEntry instance (hash:" + System . identityHashCode ( item ) + ") has at least one null property. " + "It should have intuit entity and InputStream instances" ) ; } IntuitMessage intuitMessage = prepareUpload ( item . getEntity ( ) , item . getStream ( ) , boundaryId ) ; // To keep boundary ID for next attachments if ( null == boundaryId ) { boundaryId = intuitMessage . getRequestElements ( ) . getUploadRequestElements ( ) . getBoundaryId ( ) ; } intuitMessages . add ( intuitMessage ) ; } return intuitMessages ; }
Creates list of IntuitMessage instances based on list of entries