Package com.okta.sdk.resource
Interface CollectionResource<T extends Resource>
-
- All Superinterfaces:
java.lang.Iterable<T>,Resource
- All Known Subinterfaces:
ApplicationFeatureList,ApplicationGroupAssignmentList,ApplicationList,AppLinkList,AppUserList,AuthenticatorList,AuthorizationServerList,AuthorizationServerPolicyList,AuthorizationServerPolicyRuleList,BrandList,CatalogApplicationList,CsrList,DomainList,EventHookList,FeatureList,GroupList,GroupRuleList,IdentityProviderApplicationUserList,IdentityProviderList,InlineHookList,JsonWebKeyList,LinkedObjectList,LogEventList,NetworkZoneList,OAuth2ClaimList,OAuth2ClientList,OAuth2RefreshTokenList,OAuth2ScopeConsentGrantList,OAuth2ScopeList,OAuth2TokenList,OrgContactTypeObjList,PolicyList,PolicyRuleList,ProfileMappingList,ResponseLinksList,RoleList,SecurityQuestionList,SmsTemplateList,SocialAuthTokenList,SubscriptionList,ThemeResponseList,TrustedOriginList,UserFactorList,UserList,UserTypeList
public interface CollectionResource<T extends Resource> extends Resource, java.lang.Iterable<T>
ACollectionResourceis a first-classResourcethat contains a collection of otherResourceinstances.- Since:
- 0.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetNextPageUrl()Returns a next page URLTsingle()This is just a convenience method to retrieve the single element expected to exist in this collection.java.util.stream.Stream<T>stream()Returns a sequentialStreamwith this collection as its source.-
Methods inherited from interface com.okta.sdk.resource.Resource
getResourceHref, setResourceHref
-
-
-
-
Method Detail
-
single
T single()
This is just a convenience method to retrieve the single element expected to exist in this collection. This method is intended to be used in cases where the returned list is explicitly expected to contain a single element. This operation will throw an exception if this list contains zero or more than one element.This method is not backed by any specific property obtained from the backend, as already mentioned, this is a convenience method.
- Returns:
- the single unique resource that is expect to be contained within this list.
- Throws:
java.lang.IllegalStateException- if this list contains either zero or more than one element.
-
stream
java.util.stream.Stream<T> stream()
Returns a sequentialStreamwith this collection as its source.- Returns:
- a sequential
Streamover the elements in this resource - Since:
- 1.0
-
getNextPageUrl
java.lang.String getNextPageUrl()
Returns a next page URL- Returns:
- a URL link to the next resource, or
nullif the current resource is the last one.
-
-