Class DefaultCrowdUserDirectoryHelper
- java.lang.Object
-
- com.atlassian.confluence.user.crowd.DefaultCrowdUserDirectoryHelper
-
- All Implemented Interfaces:
CrowdUserDirectoryHelper
public class DefaultCrowdUserDirectoryHelper extends Object implements CrowdUserDirectoryHelper
- Since:
- 6.12.0
-
-
Constructor Summary
Constructors Constructor Description DefaultCrowdUserDirectoryHelper(com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService, com.atlassian.crowd.manager.directory.DirectoryManager directoryManager, org.hibernate.SessionFactory sessionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<com.atlassian.crowd.embedded.api.Directory>
getDirectoriesForUser(com.atlassian.user.User user)
Optional<Integer>
getGroupCount(long directoryId)
Optional<Integer>
getMembershipCount(long directoryId)
Optional<com.atlassian.crowd.manager.directory.SynchronisationMode>
getSynchronisationMode(long directoryId)
Optional<Integer>
getUserCount(long directoryId)
CrowdUserDirectoryImplementation
getUserDirectoryImplementation(long directoryId)
-
-
-
Method Detail
-
getSynchronisationMode
public Optional<com.atlassian.crowd.manager.directory.SynchronisationMode> getSynchronisationMode(long directoryId)
- Specified by:
getSynchronisationMode
in interfaceCrowdUserDirectoryHelper
- Returns:
- the synchronisation mode of the directory, if supported
-
getUserDirectoryImplementation
public CrowdUserDirectoryImplementation getUserDirectoryImplementation(long directoryId)
- Specified by:
getUserDirectoryImplementation
in interfaceCrowdUserDirectoryHelper
- Returns:
- the implementation class of the directory as a CrowdUserDirectoryImplementation enum
-
getUserCount
public Optional<Integer> getUserCount(long directoryId)
- Specified by:
getUserCount
in interfaceCrowdUserDirectoryHelper
- Returns:
- the total number of users in a given user directory, if retrievable
-
getGroupCount
public Optional<Integer> getGroupCount(long directoryId)
- Specified by:
getGroupCount
in interfaceCrowdUserDirectoryHelper
- Returns:
- the total number of groups in a given user directory, if retrievable
-
getMembershipCount
public Optional<Integer> getMembershipCount(long directoryId)
- Specified by:
getMembershipCount
in interfaceCrowdUserDirectoryHelper
- Returns:
- the total number of memberships in a given user directory, if retrievable
-
getDirectoriesForUser
public List<com.atlassian.crowd.embedded.api.Directory> getDirectoriesForUser(com.atlassian.user.User user)
- Specified by:
getDirectoriesForUser
in interfaceCrowdUserDirectoryHelper
- Returns:
- a list of all user directories (including disabled) to which a given user belongs
-
-