public VacuumCleanup [ ] getAllCleanups ( ) throws CommandExecutionException { JSONArray cleanupIDs = getCleaningSummary ( ) . optJSONArray ( 3 ) ; if ( cleanupIDs == null ) return null ; VacuumCleanup [ ] res = new VacuumCleanup [ cleanupIDs . length ( ) ] ; for ( int i = 0 ; i < cleanupIDs . length ( ) ; i ++ ) { JSONArray send = new JSONArray ( ) ; send . put ( cleanupIDs . optLong ( i ) ) ; JSONArray ar = sendToArray ( "get_clean_record" , send ) . optJSONArray ( 0 ) ; res [ i ] = new VacuumCleanup ( ar ) ; } return res ; }
Get an array with the details of all cleanups .