Package org.keycloak.models
Interface RealmProvider
-
- All Superinterfaces:
ClientLookupProvider,ClientProvider,ClientScopeLookupProvider,ClientScopeProvider,GroupLookupProvider,GroupProvider,Provider,RoleLookupProvider,RoleProvider
public interface RealmProvider extends Provider, ClientProvider, ClientScopeProvider, GroupProvider, RoleProvider
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default ClientModeladdClient(RealmModel realm, String clientId)Deprecated.Use the corresponding method fromClientProvider.ClientModeladdClient(RealmModel realm, String id, String clientId)Deprecated.Use the corresponding method fromClientProvider.default RoleModeladdClientRole(RealmModel realm, ClientModel client, String name)Deprecated.Use the corresponding method fromRoleProvider.default RoleModeladdClientRole(RealmModel realm, ClientModel client, String id, String name)Deprecated.Use the corresponding method fromRoleProvider.default RoleModeladdRealmRole(RealmModel realm, String name)Deprecated.Use the corresponding method fromRoleProvider.RoleModeladdRealmRole(RealmModel realm, String id, String name)Deprecated.Use the corresponding method fromRoleProvider.voidaddTopLevelGroup(RealmModel realm, GroupModel subGroup)Deprecated.Use the corresponding method fromGroupProvider.default ClientInitialAccessModelcreateClientInitialAccessModel(RealmModel realm, int expiration, int count)default GroupModelcreateGroup(RealmModel realm, String name)Deprecated.Use the corresponding method fromGroupProvider.default GroupModelcreateGroup(RealmModel realm, String id, String name)Deprecated.Use the corresponding method fromGroupProvider.GroupModelcreateGroup(RealmModel realm, String id, String name, GroupModel toParent)Deprecated.Use the corresponding method fromGroupProvider.default GroupModelcreateGroup(RealmModel realm, String name, GroupModel toParent)Deprecated.Use the corresponding method fromGroupProvider.RealmModelcreateRealm(String name)Creates new realm with the given name.RealmModelcreateRealm(String id, String name)Created new realm with given ID and name.default voiddecreaseRemainingCount(RealmModel realm, ClientInitialAccessModel clientInitialAccess)booleandeleteLocalizationText(RealmModel realm, String locale, String key)booleandeleteLocalizationTextsByLocale(RealmModel realm, String locale)default List<ClientModel>getAlwaysDisplayInConsoleClients(RealmModel realm)Deprecated.Use the corresponding method fromClientProvider.default ClientModelgetClientByClientId(String clientId, RealmModel realm)Deprecated.Use the corresponding method fromClientProvider.default ClientModelgetClientById(String id, RealmModel realm)Deprecated.Use the corresponding method fromClientProvider.default ClientInitialAccessModelgetClientInitialAccessModel(RealmModel realm, String id)default RoleModelgetClientRole(RealmModel realm, ClientModel client, String name)Deprecated.Use the corresponding method fromRoleProvider.default Set<RoleModel>getClientRoles(RealmModel realm, ClientModel client)Deprecated.Use the corresponding method fromRoleProvider.default Set<RoleModel>getClientRoles(RealmModel realm, ClientModel client, Integer first, Integer max)Deprecated.Use the corresponding method fromRoleProvider.default List<ClientModel>getClients(RealmModel realm)Deprecated.Use the corresponding method fromClientProvider.default List<ClientModel>getClients(RealmModel realm, Integer firstResult, Integer maxResults)Deprecated.Use the corresponding method fromClientProvider.default ClientScopeModelgetClientScopeById(String id, RealmModel realm)Deprecated.Use the corresponding method fromClientScopeProvider.ClientScopeModelgetClientScopeById(RealmModel realm, String id)Deprecated.Use the corresponding method fromClientScopeProvider.longgetClientsCount(RealmModel realm)Deprecated.Use the corresponding method fromClientProvider.default GroupModelgetGroupById(String id, RealmModel realm)Deprecated.Use the corresponding method fromGroupProvider.GroupModelgetGroupById(RealmModel realm, String id)Deprecated.Use the corresponding method fromGroupProvider.default List<GroupModel>getGroups(RealmModel realm)Deprecated.Use the corresponding method fromGroupProvider.default List<GroupModel>getGroupsByRole(RealmModel realm, RoleModel role, int firstResult, int maxResults)Deprecated.Use the corresponding method fromGroupProvider.LonggetGroupsCount(RealmModel realm, Boolean onlyTopGroups)Deprecated.Use the corresponding method fromGroupProvider.LonggetGroupsCountByNameContaining(RealmModel realm, String search)Deprecated.Use the corresponding method fromGroupProvider.StringgetLocalizationTextsById(RealmModel realm, String locale, String key)RealmModelgetRealm(String id)Exact search for a realm by its internal ID.RealmModelgetRealmByName(String name)Exact search for a realm by its name.RoleModelgetRealmRole(RealmModel realm, String name)Deprecated.Use the corresponding method fromRoleProvider.default Set<RoleModel>getRealmRoles(RealmModel realm)Deprecated.Use the corresponding method fromRoleProvider.default Set<RoleModel>getRealmRoles(RealmModel realm, Integer first, Integer max)Deprecated.Use the corresponding method fromRoleProvider.default List<RealmModel>getRealms()Deprecated.UsegetRealmsStreaminstead.Stream<RealmModel>getRealmsStream()Returns realms as a stream.default List<RealmModel>getRealmsWithProviderType(Class<?> type)Deprecated.UsegetRealmsWithProviderTypeStreaminstead.Stream<RealmModel>getRealmsWithProviderTypeStream(Class<?> type)Returns stream of realms which has component with the given provider type.default RoleModelgetRoleById(String id, RealmModel realm)Deprecated.Use the corresponding method fromRoleProvider.default List<GroupModel>getTopLevelGroups(RealmModel realm)Deprecated.Use the corresponding method fromGroupProvider.default List<GroupModel>getTopLevelGroups(RealmModel realm, Integer first, Integer max)Deprecated.Use the corresponding method fromGroupProvider.default List<ClientInitialAccessModel>listClientInitialAccess(RealmModel realm)Deprecated.UselistClientInitialAccessStreaminstead.default Stream<ClientInitialAccessModel>listClientInitialAccessStream(RealmModel realm)Returns client's initial access as a stream.voidmoveGroup(RealmModel realm, GroupModel group, GroupModel toParent)Deprecated.Use the corresponding method fromGroupProvider.default booleanremoveClient(String id, RealmModel realm)Deprecated.Use the corresponding method fromClientProvider.default voidremoveClientInitialAccessModel(RealmModel realm, String id)voidremoveExpiredClientInitialAccess()Removes all expired client initial accesses from all realms.booleanremoveGroup(RealmModel realm, GroupModel group)Deprecated.Use the corresponding method fromGroupProvider.booleanremoveRealm(String id)Removes realm with the given id.default booleanremoveRole(RealmModel realm, RoleModel role)Deprecated.Use the corresponding method fromRoleProvider.voidsaveLocalizationText(RealmModel realm, String locale, String key, String text)voidsaveLocalizationTexts(RealmModel realm, String locale, Map<String,String> localizationTexts)default List<ClientModel>searchClientsByClientId(String clientId, Integer firstResult, Integer maxResults, RealmModel realm)Deprecated.Use the corresponding method fromClientProvider.default Set<RoleModel>searchForClientRoles(RealmModel realm, ClientModel client, String search, Integer first, Integer max)Deprecated.Use the corresponding method fromRoleProvider.default List<GroupModel>searchForGroupByName(RealmModel realm, String search, Integer first, Integer max)Deprecated.Use the corresponding method fromGroupProvider.default Set<RoleModel>searchForRoles(RealmModel realm, String search, Integer first, Integer max)Deprecated.Use the corresponding method fromRoleProvider.booleanupdateLocalizationText(RealmModel realm, String locale, String key, String text)-
Methods inherited from interface org.keycloak.storage.client.ClientLookupProvider
getClientByClientId, getClientById, getClientScopes, searchClientsByAttributes, searchClientsByClientIdStream
-
Methods inherited from interface org.keycloak.models.ClientProvider
addClientScopes, getAllRedirectUrisOfEnabledClients, getAlwaysDisplayInConsoleClientsStream, getClientsStream, getClientsStream, removeClient, removeClients, removeClientScope
-
Methods inherited from interface org.keycloak.models.ClientScopeProvider
addClientScope, addClientScope, getClientScopesStream, removeClientScope, removeClientScopes
-
Methods inherited from interface org.keycloak.storage.group.GroupLookupProvider
searchForGroupByNameStream
-
Methods inherited from interface org.keycloak.models.GroupProvider
getGroupsByRoleStream, getGroupsCount, getGroupsStream, getGroupsStream, getGroupsStream, getGroupsStream, getTopLevelGroupsStream, getTopLevelGroupsStream
-
Methods inherited from interface org.keycloak.storage.role.RoleLookupProvider
getClientRole, getRoleById, searchForClientRolesStream, searchForRolesStream
-
Methods inherited from interface org.keycloak.models.RoleProvider
addClientRole, addClientRole, getClientRolesStream, getClientRolesStream, getRealmRolesStream, getRealmRolesStream, getRolesStream, removeRole, removeRoles, removeRoles
-
-
-
-
Method Detail
-
createRealm
RealmModel createRealm(String name)
Creates new realm with the given name. The internal ID will be generated automatically.- Parameters:
name- String name of the realm- Returns:
- Model of the created realm.
-
createRealm
RealmModel createRealm(String id, String name)
Created new realm with given ID and name.- Parameters:
id- Internal ID of the realm ornullif one is to be created by the underlying storename- String name of the realm- Returns:
- Model of the created realm.
-
getRealm
RealmModel getRealm(String id)
Exact search for a realm by its internal ID.- Parameters:
id- Internal ID of the realm.- Returns:
- Model of the realm
-
getRealmByName
RealmModel getRealmByName(String name)
Exact search for a realm by its name.- Parameters:
name- String name of the realm- Returns:
- Model of the realm
-
getRealmsStream
Stream<RealmModel> getRealmsStream()
Returns realms as a stream.- Returns:
- Stream of
RealmModel. Never returnsnull.
-
getRealmsWithProviderTypeStream
Stream<RealmModel> getRealmsWithProviderTypeStream(Class<?> type)
Returns stream of realms which has component with the given provider type.- Parameters:
type-Class<?>Type of the provider.- Returns:
- Stream of
RealmModel. Never returnsnull.
-
removeRealm
boolean removeRealm(String id)
Removes realm with the given id.- Parameters:
id- of realm.- Returns:
trueif the realm was successfully removed.
-
createClientInitialAccessModel
default ClientInitialAccessModel createClientInitialAccessModel(RealmModel realm, int expiration, int count)
-
getClientInitialAccessModel
default ClientInitialAccessModel getClientInitialAccessModel(RealmModel realm, String id)
-
removeClientInitialAccessModel
default void removeClientInitialAccessModel(RealmModel realm, String id)
-
listClientInitialAccessStream
default Stream<ClientInitialAccessModel> listClientInitialAccessStream(RealmModel realm)
Returns client's initial access as a stream.- Parameters:
realm-RealmModelThe realm where to list client's initial access.- Returns:
- Stream of
ClientInitialAccessModel. Never returnsnull.
-
removeExpiredClientInitialAccess
void removeExpiredClientInitialAccess()
Removes all expired client initial accesses from all realms.
-
decreaseRemainingCount
default void decreaseRemainingCount(RealmModel realm, ClientInitialAccessModel clientInitialAccess)
-
saveLocalizationText
void saveLocalizationText(RealmModel realm, String locale, String key, String text)
-
saveLocalizationTexts
void saveLocalizationTexts(RealmModel realm, String locale, Map<String,String> localizationTexts)
-
updateLocalizationText
boolean updateLocalizationText(RealmModel realm, String locale, String key, String text)
-
deleteLocalizationTextsByLocale
boolean deleteLocalizationTextsByLocale(RealmModel realm, String locale)
-
deleteLocalizationText
boolean deleteLocalizationText(RealmModel realm, String locale, String key)
-
getLocalizationTextsById
String getLocalizationTextsById(RealmModel realm, String locale, String key)
-
getRealms
@Deprecated default List<RealmModel> getRealms()
Deprecated.UsegetRealmsStreaminstead.
-
getRealmsWithProviderType
@Deprecated default List<RealmModel> getRealmsWithProviderType(Class<?> type)
Deprecated.UsegetRealmsWithProviderTypeStreaminstead.
-
listClientInitialAccess
@Deprecated default List<ClientInitialAccessModel> listClientInitialAccess(RealmModel realm)
Deprecated.UselistClientInitialAccessStreaminstead.
-
addClient
ClientModel addClient(RealmModel realm, String id, String clientId)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientProviderAdds a client with given internal ID andclientIdto the given realm.- Specified by:
addClientin interfaceClientProvider- Parameters:
realm- Realm owning this client.id- Internal ID of the client ornullif one is to be created by the underlying storeclientId- String that identifies the client to the external parties. Maps toclient_idin OIDC orentityIDin SAML.- Returns:
- Model of the created client.
-
addClient
default ClientModel addClient(RealmModel realm, String clientId)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientProviderAdds a client with givenclientIdto the given realm. The internal ID of the client will be created automatically.- Specified by:
addClientin interfaceClientProvider- Parameters:
realm- Realm owning this client.clientId- String that identifies the client to the external parties. Maps toclient_idin OIDC orentityIDin SAML.- Returns:
- Model of the created client.
-
getClients
default List<ClientModel> getClients(RealmModel realm)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientProviderReturns all the clients of the given realm.- Specified by:
getClientsin interfaceClientProvider- Parameters:
realm- Realm.- Returns:
- List of the clients. Never returns
null.
-
getClients
default List<ClientModel> getClients(RealmModel realm, Integer firstResult, Integer maxResults)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientProviderReturns the clients of the given realm.- Specified by:
getClientsin interfaceClientProvider- Parameters:
realm- Realm.firstResult- First result to return. Ignored if negative ornull.maxResults- Maximum number of results to return. Ignored if negative ornull.- Returns:
- List of the clients. Never returns
null.
-
searchClientsByClientId
default List<ClientModel> searchClientsByClientId(String clientId, Integer firstResult, Integer maxResults, RealmModel realm)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientLookupProviderCase-insensitive search for clients that contain the given string in their public client identifier.- Specified by:
searchClientsByClientIdin interfaceClientLookupProvider- Parameters:
clientId- Searched substring of the public client identifier (client_idin OIDC orentityIDin SAML.)firstResult- First result to return. Ignored if negative ornull.maxResults- Maximum number of results to return. Ignored if negative ornull.realm- Realm to limit the search for clients.- Returns:
- List of ClientModel or an empty list if no client is found.
-
getClientByClientId
default ClientModel getClientByClientId(String clientId, RealmModel realm)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientLookupProviderExact search for a client by its public client identifier.- Specified by:
getClientByClientIdin interfaceClientLookupProvider- Parameters:
clientId- String that identifies the client to the external parties. Maps toclient_idin OIDC orentityIDin SAML.realm- Realm to limit the search.- Returns:
- Model of the client, or
nullif no client is found.
-
getClientById
default ClientModel getClientById(String id, RealmModel realm)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientLookupProviderExact search for a client by its internal ID.- Specified by:
getClientByIdin interfaceClientLookupProvider- Parameters:
id- Internal IDrealm- Realm to limit the search.- Returns:
- Model of the client, or
nullif no client is found.
-
removeClient
default boolean removeClient(String id, RealmModel realm)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientProviderRemoves given client from the given realm.- Specified by:
removeClientin interfaceClientProvider- Parameters:
id- Internal ID of the clientrealm- Realm.- Returns:
trueif the client existed and has been removed,falseotherwise.
-
getAlwaysDisplayInConsoleClients
default List<ClientModel> getAlwaysDisplayInConsoleClients(RealmModel realm)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientProviderReturns a list of clients that are expected to always show up in account console.- Specified by:
getAlwaysDisplayInConsoleClientsin interfaceClientProvider- Parameters:
realm- Realm owning the clients.- Returns:
- List of the clients. Never returns
null.
-
getClientsCount
long getClientsCount(RealmModel realm)
Deprecated.Use the corresponding method fromClientProvider.Description copied from interface:ClientProviderReturns number of clients in the given realm- Specified by:
getClientsCountin interfaceClientProvider- Parameters:
realm- Realm.- Returns:
- Number of the clients in the given realm.
-
getClientScopeById
default ClientScopeModel getClientScopeById(String id, RealmModel realm)
Deprecated.Use the corresponding method fromClientScopeProvider.
-
getClientScopeById
ClientScopeModel getClientScopeById(RealmModel realm, String id)
Deprecated.Use the corresponding method fromClientScopeProvider.Description copied from interface:ClientScopeLookupProviderExact search for a client scope by its internal ID..- Specified by:
getClientScopeByIdin interfaceClientScopeLookupProvider- Parameters:
realm- Realm.id- Internal ID of the role.- Returns:
- Model of the client scope.
-
addRealmRole
default RoleModel addRealmRole(RealmModel realm, String name)
Deprecated.Use the corresponding method fromRoleProvider.Description copied from interface:RoleProviderAdds a realm role with givennameto the given realm. The internal ID of the role will be created automatically.- Specified by:
addRealmRolein interfaceRoleProvider- Parameters:
realm- Realm owning this role.name- String name of the role.- Returns:
- Model of the created role.
-
addRealmRole
RoleModel addRealmRole(RealmModel realm, String id, String name)
Deprecated.Use the corresponding method fromRoleProvider.Description copied from interface:RoleProviderAdds a realm role with given internal ID andnameto the given realm.- Specified by:
addRealmRolein interfaceRoleProvider- Parameters:
realm- Realm owning this role.id- Internal ID of the role ornullif one is to be created by the underlying storename- String name of the role.- Returns:
- Model of the created client.
-
getRealmRole
RoleModel getRealmRole(RealmModel realm, String name)
Deprecated.Use the corresponding method fromRoleProvider.Description copied from interface:RoleLookupProviderExact search for a role by given name.- Specified by:
getRealmRolein interfaceRoleLookupProvider- Parameters:
realm- Realm.name- String name of the role.- Returns:
- Model of the role, or
nullif no role is found.
-
getRoleById
default RoleModel getRoleById(String id, RealmModel realm)
Deprecated.Use the corresponding method fromRoleProvider.
-
getRealmRoles
default Set<RoleModel> getRealmRoles(RealmModel realm)
Deprecated.Use the corresponding method fromRoleProvider.Description copied from interface:RoleProviderReturns all the realm roles of the given realm. Effectively the same as the callgetRealmRoles(realm, null, null).- Specified by:
getRealmRolesin interfaceRoleProvider- Parameters:
realm- Realm.- Returns:
- List of the roles. Never returns
null.
-
getRealmRoles
default Set<RoleModel> getRealmRoles(RealmModel realm, Integer first, Integer max)
Deprecated.Use the corresponding method fromRoleProvider.
-
searchForRoles
default Set<RoleModel> searchForRoles(RealmModel realm, String search, Integer first, Integer max)
Deprecated.Use the corresponding method fromRoleProvider.
-
removeRole
default boolean removeRole(RealmModel realm, RoleModel role)
Deprecated.Use the corresponding method fromRoleProvider.
-
addClientRole
default RoleModel addClientRole(RealmModel realm, ClientModel client, String name)
Deprecated.Use the corresponding method fromRoleProvider.
-
addClientRole
default RoleModel addClientRole(RealmModel realm, ClientModel client, String id, String name)
Deprecated.Use the corresponding method fromRoleProvider.
-
getClientRole
default RoleModel getClientRole(RealmModel realm, ClientModel client, String name)
Deprecated.Use the corresponding method fromRoleProvider.
-
getClientRoles
default Set<RoleModel> getClientRoles(RealmModel realm, ClientModel client)
Deprecated.Use the corresponding method fromRoleProvider.
-
getClientRoles
default Set<RoleModel> getClientRoles(RealmModel realm, ClientModel client, Integer first, Integer max)
Deprecated.Use the corresponding method fromRoleProvider.
-
searchForClientRoles
default Set<RoleModel> searchForClientRoles(RealmModel realm, ClientModel client, String search, Integer first, Integer max)
Deprecated.Use the corresponding method fromRoleProvider.
-
moveGroup
void moveGroup(RealmModel realm, GroupModel group, GroupModel toParent)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderThis method is used for moving groups in group structure, for example:- making an existing child group child group of some other group,
- setting a top level group (i.e. group without parent group) child of some group,
- making a child group top level group (i.e. removing its parent group).
- Specified by:
moveGroupin interfaceGroupProvider- Parameters:
realm- Realm owning this group.group- Group to update.toParent- New parent group, ornullif we are moving the group to top level group.
-
getGroupById
GroupModel getGroupById(RealmModel realm, String id)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupLookupProviderReturns a group from the given realm with the corresponding id- Specified by:
getGroupByIdin interfaceGroupLookupProvider- Parameters:
realm- Realm.id- Id.- Returns:
- GroupModel with the corresponding id.
-
getGroupById
default GroupModel getGroupById(String id, RealmModel realm)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderReturns a group from the given realm with the corresponding id- Specified by:
getGroupByIdin interfaceGroupProvider- Parameters:
id- Id.realm- Realm.- Returns:
- GroupModel with the corresponding id.
-
getGroups
default List<GroupModel> getGroups(RealmModel realm)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderReturns groups for the given realm.- Specified by:
getGroupsin interfaceGroupProvider- Parameters:
realm- Realm.- Returns:
- List of groups in the Realm.
-
getGroupsCount
Long getGroupsCount(RealmModel realm, Boolean onlyTopGroups)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderReturns a number of groups/top level groups (i.e. groups without parent group) for the given realm.- Specified by:
getGroupsCountin interfaceGroupProvider- Parameters:
realm- Realm.onlyTopGroups- When true the function returns a count of top level groups only.- Returns:
- Number of groups/top level groups.
-
getGroupsCountByNameContaining
Long getGroupsCountByNameContaining(RealmModel realm, String search)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderReturns the number of top level groups containing groups with the given string in name for the given realm.- Specified by:
getGroupsCountByNameContainingin interfaceGroupProvider- Parameters:
realm- Realm.search- Case insensitive string which will be searched for.- Returns:
- Number of groups with the given string in its name.
-
getGroupsByRole
default List<GroupModel> getGroupsByRole(RealmModel realm, RoleModel role, int firstResult, int maxResults)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderReturns groups with the given role in the given realm.- Specified by:
getGroupsByRolein interfaceGroupProvider- Parameters:
realm- Realm.role- Role.firstResult- First result to return. Ignored if negative ornull.maxResults- Maximum number of results to return. Ignored if negative ornull.- Returns:
- List of groups with the given role.
-
getTopLevelGroups
default List<GroupModel> getTopLevelGroups(RealmModel realm)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderReturns all top level groups (i.e. groups without parent group) for the given realm.- Specified by:
getTopLevelGroupsin interfaceGroupProvider- Parameters:
realm- Realm.- Returns:
- List of all top level groups in the realm.
-
getTopLevelGroups
default List<GroupModel> getTopLevelGroups(RealmModel realm, Integer first, Integer max)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderReturns top level groups (i.e. groups without parent group) for the given realm.- Specified by:
getTopLevelGroupsin interfaceGroupProvider- Parameters:
realm- Realm.first- First result to return. Ignored if negative ornull.max- Maximum number of results to return. Ignored if negative ornull.- Returns:
- List of top level groups in the realm.
-
searchForGroupByName
default List<GroupModel> searchForGroupByName(RealmModel realm, String search, Integer first, Integer max)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupLookupProviderReturns groups with the given string in name for the given realm.- Specified by:
searchForGroupByNamein interfaceGroupLookupProvider- Parameters:
realm- Realm.search- Case sensitive searched string.first- First result to return. Ignored ifnull.max- Maximum number of results to return. Ignored ifnull.- Returns:
- List of groups with the given string in name.
-
removeGroup
boolean removeGroup(RealmModel realm, GroupModel group)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderRemoves the given group for the given realm.- Specified by:
removeGroupin interfaceGroupProvider- Parameters:
realm- Realm.group- Group.- Returns:
- true if the group was removed, false if group doesn't exist or doesn't belong to the given realm
-
createGroup
default GroupModel createGroup(RealmModel realm, String name)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderCreates a new group with the given name in the given realm. Effectively the same ascreateGroup(realm, null, name, null).- Specified by:
createGroupin interfaceGroupProvider- Parameters:
realm- Realm.name- Name.- Returns:
- Model of the created group.
-
createGroup
default GroupModel createGroup(RealmModel realm, String id, String name)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderCreates a new group with the given id and name in the given realm. Effectively the same ascreateGroup(realm, id, name, null)- Specified by:
createGroupin interfaceGroupProvider- Parameters:
realm- Realm.id- Id.name- Name.- Returns:
- Model of the created group
-
createGroup
default GroupModel createGroup(RealmModel realm, String name, GroupModel toParent)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderCreates a new group with the given name and parent to the given realm. Effectively the same ascreateGroup(realm, null, name, toParent).- Specified by:
createGroupin interfaceGroupProvider- Parameters:
realm- Realm.name- Name.toParent- Parent group.- Returns:
- Model of the created group.
-
createGroup
GroupModel createGroup(RealmModel realm, String id, String name, GroupModel toParent)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderCreates a new group with the given name, id, name and parent to the given realm.- Specified by:
createGroupin interfaceGroupProvider- Parameters:
realm- Realm.id- Id, will be generated ifnull.name- Name.toParent- Parent group, ornullif the group is top level group- Returns:
- Model of the created group
-
addTopLevelGroup
void addTopLevelGroup(RealmModel realm, GroupModel subGroup)
Deprecated.Use the corresponding method fromGroupProvider.Description copied from interface:GroupProviderRemoves parent group for the given group in the given realm.- Specified by:
addTopLevelGroupin interfaceGroupProvider- Parameters:
realm- Realm.subGroup- Group.
-
-