for ( File file : files ) {
if ( i >= pageRequest.getStartRowIndex() + pageRequest.getPageSize() ) {
break;
}
if ( i >= pageRequest.getStartRowIndex() ) {
JarListPageRow jarListPageRow = new JarListPageRow();
jarListPageRow.setName( file.getName() );
//stripe the prefix of "repository"
final String jarPath = file.getPath().substring( GuvnorM2Repository.M2_REPO_DIR.length() + 1 );
jarListPageRow.setPath( jarPath );
jarListPageRow.setLastModified( new Date( file.lastModified() ) );
tradeRatePageRowList.add( jarListPageRow );
}
i++;
}