public boolean runCopyTrans ( final String zanataId , boolean waitForFinish ) { log . debug ( "Running Zanata CopyTrans for " + zanataId ) ; try { final CopyTransResource copyTransResource = proxyFactory . getCopyTransResource ( ) ; copyTransResource . startCopyTrans ( details . getProject ( ) , details . getVersion ( ) , zanataId ) ; performZanataRESTCallWaiting ( ) ; if ( waitForFinish ) { while ( ! isCopyTransCompleteForSourceDocument ( copyTransResource , zanataId ) ) { // Sleep for 3/4 of a second Thread . sleep ( 750 ) ; } } return true ; } catch ( Exception e ) { log . error ( "Failed to run copyTrans for " + zanataId , e ) ; } finally { performZanataRESTCallWaiting ( ) ; } return false ; }
Run copy trans against a Source Document in zanata and then wait for it to complete