@Override public ResourceList<Subnet> filter( Optional<String> name, Optional<String> portGroup, Optional<Integer> pageSize) { ServiceDocumentQueryResult queryResult = filterServiceDocuments(name, portGroup, pageSize); return PaginationUtils.xenonQueryResultToResourceList( NetworkService.State.class, queryResult, state -> toApiRepresentation(convertToEntity(state))); }
@Override public ResourceList<Subnet> getPage(String pageLink) throws ExternalException { ServiceDocumentQueryResult queryResult = null; try { queryResult = xenonClient.queryDocumentPage(pageLink); } catch (DocumentNotFoundException e) { throw new PageExpiredException(pageLink); } return PaginationUtils.xenonQueryResultToResourceList( NetworkService.State.class, queryResult, state -> toApiRepresentation(convertToEntity(state))); }