Package org.keycloak.storage.client
Class UnsupportedOperationsClientStorageAdapter
- java.lang.Object
-
- org.keycloak.storage.client.UnsupportedOperationsClientStorageAdapter
-
- All Implemented Interfaces:
ClientModel
,ClientScopeModel
,OrderedModel
,ProtocolMapperContainerModel
,RoleContainerModel
,ScopeContainerModel
- Direct Known Subclasses:
AbstractClientStorageAdapter
public abstract class UnsupportedOperationsClientStorageAdapter extends Object implements ClientModel
Base helper class. Unsupported operations are implemented here that throw exception on invocation.- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.ClientModel
ClientModel.ClientCreationEvent, ClientModel.ClientIdChangeEvent, ClientModel.ClientProtocolUpdatedEvent, ClientModel.ClientRemovedEvent, ClientModel.ClientUpdatedEvent, ClientModel.SearchableFields
-
Nested classes/interfaces inherited from interface org.keycloak.models.ClientScopeModel
ClientScopeModel.ClientScopeRemovedEvent
-
Nested classes/interfaces inherited from interface org.keycloak.models.OrderedModel
OrderedModel.OrderedModelComparator<OM extends OrderedModel>
-
Nested classes/interfaces inherited from interface org.keycloak.models.RoleContainerModel
RoleContainerModel.RoleRemovedEvent
-
-
Field Summary
-
Fields inherited from interface org.keycloak.models.ClientModel
LOGO_URI, POLICY_URI, PRIVATE_KEY, PUBLIC_KEY, TOS_URI, X509CERTIFICATE
-
Fields inherited from interface org.keycloak.models.ClientScopeModel
CONSENT_SCREEN_TEXT, DISPLAY_ON_CONSENT_SCREEN, DYNAMIC_SCOPE_REGEXP, GUI_ORDER, INCLUDE_IN_TOKEN_SCOPE, IS_DYNAMIC_SCOPE
-
-
Constructor Summary
Constructors Constructor Description UnsupportedOperationsClientStorageAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDefaultRole(String name)
RoleModel
addRole(String name)
RoleModel
addRole(String id, String name)
Stream<String>
getDefaultRolesStream()
RoleModel
getRole(String name)
Stream<RoleModel>
getRolesStream()
Returns available roles as a stream.Stream<RoleModel>
getRolesStream(Integer first, Integer max)
Returns available roles as a stream.void
removeDefaultRoles(String... defaultRoles)
boolean
removeRole(RoleModel role)
Stream<RoleModel>
searchForRolesStream(String search, Integer first, Integer max)
Searches roles by the given name.void
updateDefaultRoles(String... defaultRoles)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.ClientModel
addClientScope, addClientScopes, addRedirectUri, addWebOrigin, getAttribute, getAttributes, getAuthenticationFlowBindingOverride, getAuthenticationFlowBindingOverrides, getBaseUrl, getClientAuthenticatorType, getClientId, getClientScopes, getConsentScreenText, getDescription, getDynamicClientScope, getId, getManagementUrl, getName, getNodeReRegistrationTimeout, getNotBefore, getProtocol, getRealm, getRedirectUris, getRegisteredNodes, getRegistrationToken, getRootUrl, getSecret, getWebOrigins, hasDirectScope, isAlwaysDisplayInConsole, isBearerOnly, isConsentRequired, isDirectAccessGrantsEnabled, isDisplayOnConsentScreen, isEnabled, isFrontchannelLogout, isFullScopeAllowed, isImplicitFlowEnabled, isPublicClient, isServiceAccountsEnabled, isStandardFlowEnabled, isSurrogateAuthRequired, registerNode, removeAttribute, removeAuthenticationFlowBindingOverride, removeClientScope, removeRedirectUri, removeWebOrigin, setAlwaysDisplayInConsole, setAttribute, setAuthenticationFlowBindingOverride, setBaseUrl, setBearerOnly, setClientAuthenticatorType, setClientId, setConsentRequired, setDescription, setDirectAccessGrantsEnabled, setEnabled, setFrontchannelLogout, setFullScopeAllowed, setImplicitFlowEnabled, setManagementUrl, setName, setNodeReRegistrationTimeout, setNotBefore, setProtocol, setPublicClient, setRedirectUris, setRegistrationToken, setRootUrl, setSecret, setServiceAccountsEnabled, setStandardFlowEnabled, setSurrogateAuthRequired, setWebOrigins, unregisterNode, updateClient, validateSecret
-
Methods inherited from interface org.keycloak.models.ClientScopeModel
getDynamicScopeRegexp, getGuiOrder, isDynamicScope, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope, setIsDynamicScope
-
Methods inherited from interface org.keycloak.models.ProtocolMapperContainerModel
addProtocolMapper, getProtocolMapperById, getProtocolMapperByName, getProtocolMappersStream, removeProtocolMapper, updateProtocolMapper
-
Methods inherited from interface org.keycloak.models.RoleContainerModel
getDefaultRoles
-
Methods inherited from interface org.keycloak.models.ScopeContainerModel
addScopeMapping, deleteScopeMapping, getRealmScopeMappingsStream, getScopeMappingsStream, hasScope
-
-
-
-
Method Detail
-
getRole
public final RoleModel getRole(String name)
- Specified by:
getRole
in interfaceRoleContainerModel
-
addRole
public final RoleModel addRole(String name)
- Specified by:
addRole
in interfaceRoleContainerModel
-
addRole
public final RoleModel addRole(String id, String name)
- Specified by:
addRole
in interfaceRoleContainerModel
-
removeRole
public final boolean removeRole(RoleModel role)
- Specified by:
removeRole
in interfaceRoleContainerModel
-
getRolesStream
public final Stream<RoleModel> getRolesStream()
Description copied from interface:RoleContainerModel
Returns available roles as a stream.- Specified by:
getRolesStream
in interfaceRoleContainerModel
- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getRolesStream
public final Stream<RoleModel> getRolesStream(Integer first, Integer max)
Description copied from interface:RoleContainerModel
Returns available roles as a stream.- Specified by:
getRolesStream
in interfaceRoleContainerModel
- Parameters:
first
-Integer
Index of the first desired role. Ignored if negative ornull
.max
-Integer
Maximum number of returned roles. Ignored if negative ornull
.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
searchForRolesStream
public final Stream<RoleModel> searchForRolesStream(String search, Integer first, Integer max)
Description copied from interface:RoleContainerModel
Searches roles by the given name. Returns all roles that match the given filter.- Specified by:
searchForRolesStream
in interfaceRoleContainerModel
- Parameters:
search
-String
Name of the role to be used as a filter.first
-Integer
Index of the first desired role. Ignored if negative ornull
.max
-Integer
Maximum number of returned roles. Ignored if negative ornull
.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getDefaultRolesStream
public final Stream<String> getDefaultRolesStream()
- Specified by:
getDefaultRolesStream
in interfaceRoleContainerModel
- Returns:
- Stream of default roles names or empty stream if there are none. Never returns
null
.
-
addDefaultRole
public final void addDefaultRole(String name)
- Specified by:
addDefaultRole
in interfaceRoleContainerModel
-
updateDefaultRoles
public final void updateDefaultRoles(String... defaultRoles)
- Specified by:
updateDefaultRoles
in interfaceRoleContainerModel
-
removeDefaultRoles
public final void removeDefaultRoles(String... defaultRoles)
- Specified by:
removeDefaultRoles
in interfaceRoleContainerModel
-
-