Interface NestedDirectoryBackend
-
- All Superinterfaces:
DirectoryBackend
- All Known Implementing Classes:
CachedDirectoryBackend,CachedWithPersistenceDirectoryBackend,CrowdDirectoryBackend,JsonDirectoryBackend,LockingDirectoryBackend,MirroredCrowdDirectoryBackend,ProxyDirectoryBackend
public interface NestedDirectoryBackend extends DirectoryBackend
The interface for all nested directory backends.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanacquireDbLock(int lockId)try to acquire a databaselockdefault voiddropAllGroups()To reset the cache all group entities are dropped.default voiddropAllUsers()To reset the cache all user entities are dropped.default voiddropGroup(String id)To keep the cache up-to-date a group entity is dropped.default voiddropMembership(MembershipEntity membership)To keep the cache up-to-date a membership entity is dropped.default voiddropUser(String id)To keep the cache up-to-date an user entity is dropped.MappableCursor<MembershipEntity>getMemberships()Returns a cursor for membership entities.default voidreleaseDbLock(int lockId)releases a databaselockdefault booleanrequireReset()Check if the caches need a reset.default intupsertAllGroups()To keep the cache up-to-date all group entities are updated or inserted.default intupsertAllGroups(int startIndex, int maxResults)To keep the cache up-to-date all group entities are updated or inserted.default intupsertAllUsers()To keep the cache up-to-date all user entities are updated or inserted.default intupsertAllUsers(int startIndex, int maxResults)To keep the cache up-to-date all user entities are updated or inserted.default voidupsertGroup(String id)To keep the cache up-to-date a group entity is updated or inserted.default voidupsertMembership(MembershipEntity membership)To keep the cache up-to-date a membership entity is updated or inserted.default voidupsertUser(String id)To keep the cache up-to-date an user entity is updated or inserted.default voidupsertUser(String id, String idOther)To keep the cache up-to-date an user entity is updated or inserted.default voidwithReadAccess(Runnable block)Check if the caches need a reset.default <T> TwithReadAccess(Supplier<T> block)Check if the caches need a reset.default voidwithWriteAccess(Runnable block)Check if the caches need a reset.default <T> TwithWriteAccess(Supplier<T> block)Check if the caches need a reset.-
Methods inherited from interface technology.openpool.ldap.adapter.api.directory.DirectoryBackend
getAllGroups, getAllGroups, getAllUsers, getAllUsers, getAuthenticatedUser, getDirectChildGroupsOfGroup, getDirectGroupsOfUser, getDirectParentGroupsOfGroup, getDirectUsersOfGroup, getGroup, getId, getTransitiveChildGroupsOfGroup, getTransitiveGroupsOfUser, getTransitiveParentGroupsOfGroup, getTransitiveUsersOfGroup, getUser, runQueryExpression, shutdown, startup
-
-
-
-
Method Detail
-
withReadAccess
default <T> T withReadAccess(Supplier<T> block)
Check if the caches need a reset.- Parameters:
block- the supplier object executed within the session- Returns:
- the result of the supplier code block
-
withReadAccess
default void withReadAccess(Runnable block)
Check if the caches need a reset.- Parameters:
block- the runnable object executed within the session
-
withWriteAccess
default <T> T withWriteAccess(Supplier<T> block)
Check if the caches need a reset.- Parameters:
block- the supplier object executed within the session- Returns:
- the result of the supplier code block
-
withWriteAccess
default void withWriteAccess(Runnable block)
Check if the caches need a reset.- Parameters:
block- the runnable object executed within the session
-
requireReset
default boolean requireReset()
Check if the caches need a reset.- Returns:
- the boolean
-
upsertGroup
default void upsertGroup(String id)
To keep the cache up-to-date a group entity is updated or inserted.- Parameters:
id- the group ID
-
upsertAllGroups
default int upsertAllGroups(int startIndex, int maxResults)To keep the cache up-to-date all group entities are updated or inserted.- Parameters:
startIndex- the start index for paginationmaxResults- the maximum number of results for pagination- Returns:
- the number of handled entities
-
upsertAllGroups
default int upsertAllGroups()
To keep the cache up-to-date all group entities are updated or inserted.- Returns:
- the number of handled entities
-
upsertUser
default void upsertUser(String id)
To keep the cache up-to-date an user entity is updated or inserted.- Parameters:
id- the user ID
-
upsertUser
default void upsertUser(String id, String idOther)
To keep the cache up-to-date an user entity is updated or inserted. The user inherits the groups of another user- Parameters:
id- the user IDidOther- the user ID of an existing user
-
upsertAllUsers
default int upsertAllUsers(int startIndex, int maxResults)To keep the cache up-to-date all user entities are updated or inserted.- Parameters:
startIndex- the start index for paginationmaxResults- the maximum number of results for pagination- Returns:
- the number of handled entities
-
upsertAllUsers
default int upsertAllUsers()
To keep the cache up-to-date all user entities are updated or inserted.- Returns:
- the number of handled entities
-
upsertMembership
default void upsertMembership(MembershipEntity membership)
To keep the cache up-to-date a membership entity is updated or inserted.- Parameters:
membership- the membership entity
-
dropGroup
default void dropGroup(String id)
To keep the cache up-to-date a group entity is dropped.- Parameters:
id- the group ID
-
dropAllGroups
default void dropAllGroups()
To reset the cache all group entities are dropped.
-
dropUser
default void dropUser(String id)
To keep the cache up-to-date an user entity is dropped.- Parameters:
id- the user ID
-
dropAllUsers
default void dropAllUsers()
To reset the cache all user entities are dropped.
-
dropMembership
default void dropMembership(MembershipEntity membership)
To keep the cache up-to-date a membership entity is dropped.- Parameters:
membership- the membership entity
-
getMemberships
MappableCursor<MembershipEntity> getMemberships()
Returns a cursor for membership entities.- Returns:
- the cursor with membership elements
-
acquireDbLock
default boolean acquireDbLock(int lockId)
try to acquire a databaselock- Returns:
- the boolean
-
releaseDbLock
default void releaseDbLock(int lockId)
releases a databaselock
-
-