-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace all Collections with Pages or PagedMaps
- Loading branch information
blevine
committed
Oct 16, 2024
1 parent
6992253
commit d51142b
Showing
13 changed files
with
170 additions
and
63 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
graphql/src/main/java/net/brianlevine/keycloak/graphql/types/AccessMap.java
This file contains 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,30 @@ | ||
package net.brianlevine.keycloak.graphql.types; | ||
|
||
import net.brianlevine.keycloak.graphql.util.PagedMap; | ||
|
||
import java.util.Map; | ||
|
||
public class AccessMap extends PagedMap<String, Boolean, AccessMap.Entry> { | ||
|
||
public AccessMap(Map<String, Boolean> map, PagingOptions options) { | ||
this(map, options != null ? options.start : PagingOptions.DEFAULT.start, options != null ? options.limit : PagingOptions.DEFAULT.limit); | ||
} | ||
|
||
public AccessMap(Map<String, Boolean> map, int start, int limit) { | ||
super(map, start, limit, AccessMap.Entry.class); | ||
} | ||
|
||
public static class Entry extends DelegatingEntry<String, Boolean> { | ||
public Entry(Map.Entry<String, Boolean> delegate) { | ||
super(delegate); | ||
} | ||
|
||
public String getName() { | ||
return delegate.getKey(); | ||
} | ||
|
||
public Boolean getAccess() { | ||
return delegate.getValue(); | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...l/src/main/java/net/brianlevine/keycloak/graphql/types/AuthenticationFlowOverrideMap.java
This file contains 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,30 @@ | ||
package net.brianlevine.keycloak.graphql.types; | ||
|
||
import net.brianlevine.keycloak.graphql.util.PagedMap; | ||
|
||
import java.util.Map; | ||
|
||
public class AuthenticationFlowOverrideMap extends PagedMap<String, String, AuthenticationFlowOverrideMap.Entry> { | ||
|
||
public AuthenticationFlowOverrideMap(Map<String, String> map, int start, int limit) { | ||
super(map, start, limit, AuthenticationFlowOverrideMap.Entry.class); | ||
} | ||
|
||
public AuthenticationFlowOverrideMap(Map<String, String> map, PagingOptions options) { | ||
super(map, options, AuthenticationFlowOverrideMap.Entry.class); | ||
} | ||
|
||
public static class Entry extends DelegatingEntry<String, String> implements Map.Entry<String, String> { | ||
public Entry(Map.Entry<String, String> delegate) { | ||
super(delegate); | ||
} | ||
|
||
public String getFlowType() { | ||
return delegate.getKey(); | ||
} | ||
|
||
public String getFlowName() { | ||
return delegate.getValue(); | ||
} | ||
} | ||
} |
This file contains 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 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 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 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
30 changes: 30 additions & 0 deletions
30
graphql/src/main/java/net/brianlevine/keycloak/graphql/types/HeaderMap.java
This file contains 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,30 @@ | ||
package net.brianlevine.keycloak.graphql.types; | ||
|
||
import net.brianlevine.keycloak.graphql.util.PagedMap; | ||
|
||
import java.util.Map; | ||
|
||
public class HeaderMap extends PagedMap<String, String, HeaderMap.Entry> { | ||
|
||
public HeaderMap(Map<String, String> map, int start, int limit) { | ||
super(map, start, limit, HeaderMap.Entry.class); | ||
} | ||
|
||
public HeaderMap(Map<String, String> map, PagingOptions options) { | ||
super(map, options, HeaderMap.Entry.class); | ||
} | ||
|
||
public static class Entry extends DelegatingEntry<String, String> implements Map.Entry<String, String> { | ||
public Entry(Map.Entry<String, String> delegate) { | ||
super(delegate); | ||
} | ||
|
||
public String getName() { | ||
return delegate.getKey(); | ||
} | ||
|
||
public String getValue() { | ||
return delegate.getValue(); | ||
} | ||
} | ||
} |
This file contains 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 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 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 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 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.