* Get available cartridges
*/
public CartridgeWrapper getPagedAvailableCartridges(String cartridgeSearchString, int pageNumber, boolean multiTenant)
throws ADCException {
checkSuperTenant();
CartridgeWrapper cartridgeWrapper = new CartridgeWrapper();
List<Cartridge> cartridges = getAvailableCartridges(cartridgeSearchString, multiTenant);
// TODO Improve pagination
if (!cartridges.isEmpty()) {
// Paginate only if cartridges are there.
DataPaginator.doPaging(pageNumber, cartridges, cartridgeWrapper);
} else {
// Must set this value as axis2 stub client will return an array
// with length = 1 and null element if cartridges[] is null
cartridgeWrapper.set(cartridges);
}
return cartridgeWrapper;
}