-
Notifications
You must be signed in to change notification settings - Fork 29
V3/page iterator #959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
V3/page iterator #959
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
194e37e
page iterator
ramsessanchez 6be793c
page iterator
ramsessanchez 36f9366
Merge branch 'v3/pageIterator' of https://github.com/microsoftgraph/m…
ramsessanchez 567340e
java level 8 for tests
ramsessanchez daeffe1
java level 8 for tests
ramsessanchez e632605
page iterator tests are complete
ramsessanchez 079c44c
spotbugs
ramsessanchez b55c0c3
comments
ramsessanchez e3701fe
annotations android
ramsessanchez 55c1f5b
smells
ramsessanchez 3013752
smells
ramsessanchez 55f63f1
code review
ramsessanchez a33de00
bumps to 3.0.6
ramsessanchez 6219a3f
Merge branch 'v3/longTermBranch' into v3/pageIterator
ramsessanchez bad1c2b
builder.client now calls builder.requestAdapter
ramsessanchez 553728c
null check
ramsessanchez 53530a0
Merge branch 'v3/pageIterator' of https://github.com/microsoftgraph/m…
ramsessanchez 82ba0af
remove legacy sonarQube plugin implementation
ramsessanchez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
494 changes: 494 additions & 0 deletions
494
src/main/java/com/microsoft/graph/tasks/PageIterator.java
Large diffs are not rendered by default.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
src/main/java/com/microsoft/graph/tasks/PageIteratorBuilder.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package com.microsoft.graph.tasks; | ||
|
|
||
| import com.microsoft.graph.requests.IBaseClient; | ||
| import com.microsoft.kiota.RequestAdapter; | ||
| import com.microsoft.kiota.RequestInformation; | ||
| import com.microsoft.kiota.serialization.AdditionalDataHolder; | ||
| import com.microsoft.kiota.serialization.Parsable; | ||
| import com.microsoft.kiota.serialization.ParsableFactory; | ||
|
|
||
| import javax.annotation.Nonnull; | ||
| import java.lang.reflect.InvocationTargetException; | ||
| import java.util.function.UnaryOperator; | ||
|
|
||
| interface PageIteratorBuilder<TEntity extends Parsable, TCollectionPage extends Parsable & AdditionalDataHolder> { | ||
| /** | ||
| * Sets the client for the PageIteratorBuilder. | ||
| * @param client the client to set. | ||
| */ | ||
| public PageIteratorBuilder<TEntity, TCollectionPage> client(@Nonnull IBaseClient client); | ||
| /** | ||
| * Sets the request adapter for the PageIteratorBuilder. | ||
| * @param requestAdapter the request adapter to set. | ||
| */ | ||
| public PageIteratorBuilder<TEntity, TCollectionPage> requestAdapter(@Nonnull RequestAdapter requestAdapter); | ||
baywet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /** | ||
| * Sets the page to be iterated over. | ||
| * @param collectionPage the page to be iterated over. | ||
| */ | ||
| public PageIteratorBuilder<TEntity, TCollectionPage> collectionPage(@Nonnull TCollectionPage collectionPage) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException; | ||
| /** | ||
| * Sets factory to use for creating a collection page. | ||
| * @param collectionPageFactory the factory to use for creating a collection page. | ||
| */ | ||
| public PageIteratorBuilder<TEntity, TCollectionPage> collectionPageFactory(@Nonnull ParsableFactory<TCollectionPage> collectionPageFactory); | ||
| /** | ||
| * Sets the function to configure each subsequent request. | ||
| * @param requestConfigurator function to configure each subsequent request. | ||
| */ | ||
| public PageIteratorBuilder<TEntity, TCollectionPage> requestConfigurator(@Nonnull UnaryOperator<RequestInformation> requestConfigurator); | ||
| /** | ||
| * Build the PageIterator. | ||
| * Should fail if request adapter is not set. | ||
| * Should fail if current collection page is not set. | ||
| * Should fail if collection page factory is not set. | ||
| * Should fail if process page item callback is not set. | ||
| * @return the built PageIterator. | ||
| */ | ||
| PageIterator<TEntity, TCollectionPage> build() throws InvocationTargetException, IllegalAccessException, NoSuchMethodException; | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.