public abstract class AbstractInternalDirectory extends Object implements InternalRemoteDirectory
InternalDirectory and CachingDirectory.| Constructor and Description |
|---|
AbstractInternalDirectory(InternalDirectoryUtils internalDirectoryUtils,
PasswordEncoderFactory passwordEncoderFactory,
DirectoryDao directoryDao,
UserDao userDao,
GroupDao groupDao,
MembershipDao membershipDao,
TombstoneDao tombstoneDao,
PasswordConstraintsLoader passwordConstraints) |
| Modifier and Type | Method and Description |
|---|---|
BatchResult<String> |
addAllGroupsToGroup(Collection<String> childGroupNames,
String groupName)
Adds a collection of child groups to a group.
|
Group |
addGroup(GroupTemplate group)
Adds a
group to the directory store. |
void |
addGroupToGroup(String childGroup,
String parentGroup)
Adds a group as a member of a parent group.
|
abstract Group |
addLocalGroup(GroupTemplate group)
Adds a "local" group to the directory.
|
abstract UserWithAttributes |
addUser(UserTemplateWithAttributes user,
PasswordCredential credential)
Adds a
user to the directory store. |
void |
addUserToGroup(String username,
String groupName)
Adds a user as a member of a group.
|
BatchResult<String> |
addUserToGroups(String username,
Set<String> groupNames)
Adds a user to many groups.
|
User |
authenticate(String name,
PasswordCredential credential)
Authenticates a
user with the directory store. |
protected static Map<String,Set<String>> |
calculatePostPasswordUpdateAttributes()
Generate the list of default attributes and values relating to passwords, for use when creating or resetting a password
|
BoundedCount |
countDirectMembersOfGroup(String groupName,
int querySizeHint)
Count the direct members of a group in the remote directory.
|
protected long |
currentPrincipalInvalidPasswordAttempts(UserWithAttributes user) |
protected PasswordCredential |
encryptedCredential(PasswordCredential passwordCredential) |
void |
expireAllPasswords()
Sets the
UserConstants.REQUIRES_PASSWORD_CHANGE attribute to true for
all users in the directory using bulk operations |
InternalDirectoryGroup |
findGroupByName(String name)
Finds the
group that matches the supplied name. |
GroupWithAttributes |
findGroupWithAttributesByName(String name)
Finds the
group that matches the supplied name. |
TimestampedUser |
findUserByExternalId(String externalId)
Finds the user that matches the supplied
externalId. |
TimestampedUser |
findUserByName(String name)
Finds the
user that matches the supplied name. |
UserWithAttributes |
findUserWithAttributesByName(String name)
Finds the
user that matches the supplied name. |
User |
forceRenameUser(User oldUser,
String newName)
Forces a rename on the given user in this directory.
|
Set<String> |
getAllUserExternalIds()
Retrieves all users externalIds found in this directory.
|
RemoteDirectory |
getAuthoritativeDirectory() |
String |
getDescriptiveName()
Returns a descriptive name for the type of directory.
|
long |
getDirectoryId()
Gets the internal unique
directoryId of the directory store. |
protected PasswordEncoder |
getEncoder() |
long |
getGroupCount() |
Set<String> |
getKeys()
Gets all the keys of the attributes.
|
Iterable<Membership> |
getMemberships()
Get an iterable view of the available group memberships.
|
protected Set<PasswordConstraint> |
getPasswordConstraints() |
AvatarReference |
getUserAvatarByName(String username,
int sizeHint)
Return an avatar, if available, for the named user.
|
long |
getUserCount() |
String |
getValue(String name)
Returns any value associated with the given key, returns
null if there is no value. |
Set<String> |
getValues(String name)
Get all the values associated with a given key.
|
boolean |
isEmpty() |
boolean |
isGroupDirectGroupMember(String childGroup,
String parentGroup)
Determines if a group is a direct member of another group.
|
boolean |
isRolesDisabled()
Expose whether the directory has roles disabled.
|
boolean |
isUserDirectGroupMember(String username,
String groupName)
Determines if a user is a direct member of a group.
|
BatchResult<String> |
removeAllGroups(Set<String> groupNames)
Removes all groups from the directory.
|
BatchResult<String> |
removeAllUsers(Set<String> userNames)
Removes all users from the directory.
|
void |
removeGroup(String name)
Removes the
group that matches the supplied name. |
void |
removeGroupAttributes(String groupName,
String attributeName)
Removes all the values for a single attribute key for a group.
|
void |
removeGroupFromGroup(String childGroup,
String parentGroup)
Removes a group as a member of a parent group.
|
BatchResult<String> |
removeGroupsFromGroup(Collection<String> childGroupNames,
String groupName)
Removes a collection of child groups from a group.
|
void |
removeUser(String name)
Removes the
user that matches the supplied name. |
void |
removeUserAttributes(String username,
String attributeName)
Removes all the values for a single attribute key for a user.
|
void |
removeUserFromGroup(String username,
String groupName)
Removes a user as a member of a group.
|
BatchResult<String> |
removeUsersFromGroup(Set<String> usernames,
String groupName)
Removes a collection of users from a group.
|
Group |
renameGroup(String oldName,
String newName)
Renames a
group. |
User |
renameUser(String oldName,
String newName)
Renames a
user. |
protected boolean |
requiresPasswordChange(UserWithAttributes user) |
<T> List<T> |
searchGroupRelationships(MembershipQuery<T> query)
Searches for membership information.
|
<T> com.google.common.collect.ListMultimap<String,T> |
searchGroupRelationshipsGroupedByName(MembershipQuery<T> query)
Searches for
groups that match the supplied query criteria. |
<T> List<T> |
searchGroups(EntityQuery<T> query)
Searches for
groups that match the supplied query criteria. |
<T> List<T> |
searchUsers(EntityQuery<T> query)
Searches for
users that match the supplied query criteria. |
void |
setAttributes(Map<String,String> attributes)
Called by the
DirectoryInstanceLoader after
constructing an InternalDirectory. |
void |
setDirectoryId(long id)
Called by the
DirectoryInstanceLoader after
constructing an InternalDirectory. |
void |
storeGroupAttributes(String groupName,
Map<String,Set<String>> attributes)
Adds or updates a group's attributes with the new Map of attribute values in the directory specified by the passed in
directoryId. |
void |
storeUserAttributes(String username,
Map<String,Set<String>> attributes)
Adds or updates a user's attributes with the new Map of attribute values in the directory specified by the passed in
directoryId. |
boolean |
supportsInactiveAccounts()
Internal directories always support inactive accounts.
|
boolean |
supportsNestedGroups()
Allows us to only display nested-group related UI for directories that support it.
|
boolean |
supportsPasswordExpiration()
Internal Directories always support expiring passwords
|
boolean |
supportsSettingEncryptedCredential()
Internal directories always support setting passwords by hash.
|
void |
testConnection()
Does nothing, connection is determined by the ability to communicate with the database.
|
Group |
updateGroup(GroupTemplate group)
Updates the
group. |
void |
updateUserCredential(String name,
PasswordCredential newCredential)
|
User |
userAuthenticated(String username) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAllGroups, addAllUsers, addAllUsersToGroup, isLocalUserStatusEnabledaddUser, getLocallyFilteredGroupNames, updateUser, updateUserFromRemoteDirectorypublic static final String DESCRIPTIVE_NAME
public static final String ATTRIBUTE_PASSWORD_REGEX
public static final String ATTRIBUTE_PASSWORD_COMPLEXITY_MESSAGE
public static final String ATTRIBUTE_PASSWORD_MAX_ATTEMPTS
public static final String ATTRIBUTE_PASSWORD_HISTORY_COUNT
public static final String ATTRIBUTE_USER_ENCRYPTION_METHOD
public static final String ATTRIBUTE_PASSWORD_MAX_CHANGE_TIME
public static final String ATTRIBUTE_PASSWORD_EXPIRATION_NOTIFICATION_PERIODS
public static final String ATTRIBUTE_PASSWORD_MINIMUM_LENGTH
public static final String ATTRIBUTE_PASSWORD_MINIMUM_SCORE
PasswordScore.getRanking().protected long directoryId
protected AttributeValuesHolder attributes
protected final PasswordEncoderFactory passwordEncoderFactory
protected final DirectoryDao directoryDao
protected final UserDao userDao
protected final GroupDao groupDao
protected final MembershipDao membershipDao
protected final TombstoneDao tombstoneDao
protected final InternalDirectoryUtils internalDirectoryUtils
public AbstractInternalDirectory(InternalDirectoryUtils internalDirectoryUtils, PasswordEncoderFactory passwordEncoderFactory, DirectoryDao directoryDao, UserDao userDao, GroupDao groupDao, MembershipDao membershipDao, TombstoneDao tombstoneDao, PasswordConstraintsLoader passwordConstraints)
public long getDirectoryId()
RemoteDirectorydirectoryId of the directory store.getDirectoryId in interface RemoteDirectorydirectoryId.public void setDirectoryId(long id)
DirectoryInstanceLoader after
constructing an InternalDirectory.setDirectoryId in interface RemoteDirectoryid - The unique id of the Directory stored in the database.public void setAttributes(Map<String,String> attributes)
DirectoryInstanceLoader after
constructing an InternalDirectory.setAttributes in interface RemoteDirectoryattributes - attributes map.public Set<String> getValues(String name)
AttributesgetValues in interface Attributesname - the key to retrieve the values forpublic String getValue(String name)
Attributesnull if there is no value.getValue in interface Attributesname - the key to retrieve the value fornull if there is no valuepublic Set<String> getKeys()
AttributesgetKeys in interface Attributespublic boolean isEmpty()
isEmpty in interface Attributestrue if there are no attributespublic String getDescriptiveName()
RemoteDirectorygetDescriptiveName in interface RemoteDirectorypublic TimestampedUser findUserByName(String name) throws UserNotFoundException
RemoteDirectoryuser that matches the supplied name.findUserByName in interface InternalRemoteDirectoryfindUserByName in interface RemoteDirectoryname - the name of the user (username).TimestampedUser entity.UserNotFoundException - a user with the supplied name does not exist.public TimestampedUser findUserByExternalId(String externalId) throws UserNotFoundException
RemoteDirectoryexternalId.
This is an optional method that may not be implemented on all directory types.
Currently it is implemented for LDAP and Internal directories but not Crowd directories.findUserByExternalId in interface InternalRemoteDirectoryfindUserByExternalId in interface RemoteDirectoryexternalId - the externalId of the userTimestampedUser entity.UserNotFoundException - a user with the supplied externalId does not exist.RemoteDirectory.findUserByName(String)public UserWithAttributes findUserWithAttributesByName(String name) throws UserNotFoundException
RemoteDirectoryuser that matches the supplied name.findUserWithAttributesByName in interface RemoteDirectoryname - the name of the user (username).UserNotFoundException - a user with the supplied name does not exist.public User authenticate(String name, PasswordCredential credential) throws InactiveAccountException, InvalidAuthenticationException, ExpiredCredentialException, UserNotFoundException
RemoteDirectoryuser with the directory store.authenticate in interface RemoteDirectoryname - The name of the user (username).credential - The supplied credentials (password).InactiveAccountException - The supplied user is inactive.InvalidAuthenticationException - Authentication with the provided credentials failed OR the user has exceeded the maximum number of failed authentication attempts.UserNotFoundException - The user wth the supplied name does not exist.ExpiredCredentialException - The user's credentials have expired. The user must change their credentials in order to successfully authenticate.public User userAuthenticated(String username) throws OperationFailedException, UserNotFoundException, InactiveAccountException
userAuthenticated in interface RemoteDirectoryOperationFailedExceptionUserNotFoundExceptionInactiveAccountExceptionprotected long currentPrincipalInvalidPasswordAttempts(UserWithAttributes user)
user - user with attributes.protected boolean requiresPasswordChange(UserWithAttributes user)
user - user with attributes.true if the requires password change attribute on the user is set to true, or if
the password last changed attribute on the user exceeds the password max change time attribute on the
directory (ie. password timeout).public abstract UserWithAttributes addUser(UserTemplateWithAttributes user, PasswordCredential credential) throws InvalidCredentialException, InvalidUserException, UserAlreadyExistsException, OperationFailedException
RemoteDirectoryuser to the directory store.addUser in interface RemoteDirectoryuser - template of the user to add.credential - a password, or PasswordCredential.NONE for an account that cannot login with any passwordInvalidCredentialException - The supplied credential is invalid.InvalidUserException - The supplied user is invalid.UserAlreadyExistsException - The user already existsOperationFailedException - underlying directory implementation failed to execute the operation.RemoteDirectory.supportsSettingEncryptedCredential()protected PasswordCredential encryptedCredential(PasswordCredential passwordCredential)
protected PasswordEncoder getEncoder()
public void updateUserCredential(String name, PasswordCredential newCredential) throws InvalidCredentialException, UserNotFoundException
RemoteDirectoryupdateUserCredential in interface RemoteDirectoryname - The name of the user (username).newCredential - The new credential (password).InvalidCredentialException - The supplied credential is invalid.UserNotFoundException - The user does not exist.RemoteDirectory.supportsSettingEncryptedCredential()protected static Map<String,Set<String>> calculatePostPasswordUpdateAttributes()
public User renameUser(String oldName, String newName) throws InvalidUserException, UserNotFoundException, UserAlreadyExistsException
RemoteDirectoryuser.renameUser in interface RemoteDirectoryoldName - name of existing user.newName - desired name of user.InvalidUserException - if the new username is invalid.UserNotFoundException - if the user with the existing name does not exist.UserAlreadyExistsException - if the newName already exists.public User forceRenameUser(@Nonnull User oldUser, @Nonnull String newName) throws UserNotFoundException
InternalRemoteDirectoryRemoteDirectory.renameUser(String, String), except it will still do the rename even if there is an
existing user under the newName. In this case, it will first rename that existing user to a name that is known
not to exist in this directory.forceRenameUser in interface InternalRemoteDirectoryoldUser - the existing user.newName - desired name of user.UserNotFoundException - if the "oldUser" does not exist.RemoteDirectory.renameUser(String, String)protected final Set<PasswordConstraint> getPasswordConstraints()
@Nonnull public Set<String> getAllUserExternalIds() throws OperationFailedException
InternalRemoteDirectorygetAllUserExternalIds in interface InternalRemoteDirectoryOperationFailedException - underlying directory implementation failed to execute the operation.public long getUserCount()
throws OperationFailedException
getUserCount in interface FastEntityCountProviderOperationFailedException - underlying directory implementation failed to execute the operation.public long getGroupCount()
throws OperationFailedException
getGroupCount in interface FastEntityCountProviderOperationFailedException - underlying directory implementation failed to execute the operation.public void storeUserAttributes(String username, Map<String,Set<String>> attributes) throws UserNotFoundException, OperationFailedException
RemoteDirectorydirectoryId.
The attributes map represents new or updated attributes and does not replace existing attributes unless the key of an attribute matches the key of an existing
Attributes with values of empty sets are not added (these attributes are effectively removed).
storeUserAttributes in interface RemoteDirectoryusername - name of user to update.attributes - new or updated attributes (attributes that don't need changing should not appear in this Map).UserNotFoundException - user with supplied username does not exist.OperationFailedException - underlying directory implementation failed to execute the operation.public void removeUserAttributes(String username, String attributeName) throws UserNotFoundException
RemoteDirectoryremoveUserAttributes in interface RemoteDirectoryusername - name of the user to update.attributeName - name of attribute to remove.UserNotFoundException - user with supplied username does not exist.public void removeUser(String name) throws UserNotFoundException
RemoteDirectoryuser that matches the supplied name.removeUser in interface RemoteDirectoryname - The name of the user (username).UserNotFoundException - The user does not exist.public BatchResult<String> removeAllUsers(Set<String> userNames)
InternalRemoteDirectoryIf a user with the supplied username does not exist in the directory, the username will be ignored.
removeAllUsers in interface InternalRemoteDirectoryuserNames - usernames of users to remove.public BatchResult<String> removeAllGroups(Set<String> groupNames)
InternalRemoteDirectoryIf a group with the supplied group name does not exist in the directory, the group name will be ignored.
removeAllGroups in interface InternalRemoteDirectorygroupNames - names of groups to remove.public <T> List<T> searchUsers(EntityQuery<T> query)
RemoteDirectoryusers that match the supplied query criteria.
The users will be returned in a stable order including across pagination boundaries (excluding modification).
searchUsers in interface RemoteDirectoryquery - EntityQuery for Entity.USER.List<User> or List<String> of users/usernames
matching the search criteria. An empty List will be returned
if no users matching the criteria are found.public InternalDirectoryGroup findGroupByName(String name) throws GroupNotFoundException
RemoteDirectorygroup that matches the supplied name.findGroupByName in interface InternalRemoteDirectoryfindGroupByName in interface RemoteDirectoryname - the name of the group.InternalDirectoryGroup entity.GroupNotFoundException - a group with the supplied name does not exist.public GroupWithAttributes findGroupWithAttributesByName(String name) throws GroupNotFoundException
RemoteDirectorygroup that matches the supplied name.findGroupWithAttributesByName in interface RemoteDirectoryname - the name of the group.GroupNotFoundException - a group with the supplied name does not exist.public Group addGroup(GroupTemplate group) throws InvalidGroupException, OperationFailedException
RemoteDirectorygroup to the directory store.addGroup in interface RemoteDirectorygroup - template of the group to add.InvalidGroupException - The supplied group is invalid or it already exists in the directory.OperationFailedException - underlying directory implementation failed to execute the operation.public abstract Group addLocalGroup(GroupTemplate group) throws InvalidGroupException, OperationFailedException
InternalRemoteDirectoryThis method can be used to store groups that aren't clones of "external" groups. For example, if an LDAP directory is cloned in an internal directory, it's possible to define "local" groups that exist internally but not in LDAP.
This functionality was added to meet the functionality that Confluence provided.
addLocalGroup in interface InternalRemoteDirectorygroup - template of the group to add.InvalidGroupException - The supplied group is invalid.OperationFailedException - underlying directory implementation failed to execute the operation.public Group updateGroup(GroupTemplate group) throws InvalidGroupException, GroupNotFoundException
RemoteDirectorygroup.updateGroup in interface RemoteDirectorygroup - The group to update.InvalidGroupException - the supplied group is invalid.GroupNotFoundException - the group does not exist in the directory store.public Group renameGroup(String oldName, String newName) throws InvalidGroupException, GroupNotFoundException
RemoteDirectorygroup.renameGroup in interface RemoteDirectoryoldName - name of existing group.newName - desired name of group.InvalidGroupException - if the new group name is invalid or already exists in the directory.GroupNotFoundException - if the group with the existing name does not exist.public void storeGroupAttributes(String groupName, Map<String,Set<String>> attributes) throws GroupNotFoundException
RemoteDirectorydirectoryId.
The attributes map represents new or updated attributes and does not replace existing attributes unless the key of an attribute matches the key of an existing
Attributes with values of empty sets are not added (these attributes are effectively removed).
storeGroupAttributes in interface RemoteDirectorygroupName - name of group to update.attributes - new or updated attributes (attributes that don't need changing should not appear in this Map).GroupNotFoundException - group with supplied groupName does not exist.public void removeGroupAttributes(String groupName, String attributeName) throws GroupNotFoundException
RemoteDirectoryremoveGroupAttributes in interface RemoteDirectorygroupName - name of the group to update.attributeName - name of attribute to remove.GroupNotFoundException - group with supplied groupName does not exist.public void removeGroup(String name) throws GroupNotFoundException
RemoteDirectorygroup that matches the supplied name.removeGroup in interface RemoteDirectoryname - The name of the group.GroupNotFoundException - The group does not exist.public <T> List<T> searchGroups(EntityQuery<T> query)
RemoteDirectorygroups that match the supplied query criteria.
The groups will be returned in a stable order including across pagination boundaries (excluding modification).
searchGroups in interface RemoteDirectoryquery - EntityQuery for Entity.GROUP.List<Group> or List<String> of groups/groupnames
matching the search criteria. An empty List will be returned
if no groups matching the criteria are found.public boolean isUserDirectGroupMember(String username, String groupName)
RemoteDirectoryisUserDirectGroupMember in interface RemoteDirectoryusername - name of user.groupName - name of group.true iff the user is a direct member of the group.public boolean isGroupDirectGroupMember(String childGroup, String parentGroup)
RemoteDirectoryisGroupDirectGroupMember in interface RemoteDirectorychildGroup - name of child group.parentGroup - name of parent group.true iff the childGroup is a direct member of the parentGroup.public BatchResult<String> addUserToGroups(String username, Set<String> groupNames) throws UserNotFoundException
InternalRemoteDirectoryThis method assumes that user and groups already exist in the directory.
addUserToGroups in interface InternalRemoteDirectoryusername - username of the user to whom we add groupsgroupNames - names of the groupsUserNotFoundException - when user with a given username does not existpublic void addUserToGroup(String username, String groupName) throws UserNotFoundException, GroupNotFoundException, MembershipAlreadyExistsException
RemoteDirectorychildGroup will
appear as members of parentGroup to querying applications.addUserToGroup in interface RemoteDirectoryusername - The user that will become a member of groupNamegroupName - The group that will gain a new member.UserNotFoundException - If the user cannot be found.GroupNotFoundException - If the group cannot be found.MembershipAlreadyExistsException - if the user is already a member of the grouppublic void addGroupToGroup(String childGroup, String parentGroup) throws InvalidMembershipException, GroupNotFoundException, MembershipAlreadyExistsException
RemoteDirectoryaddGroupToGroup in interface RemoteDirectorychildGroup - The group that will become a member of parentGroupparentGroup - The group that will gain a new memberInvalidMembershipException - if the childGroup and parentGroup exist but are of different GroupTypes.GroupNotFoundException - One or both of the groups cannot be found.MembershipAlreadyExistsException - if the child group is already a child of the parent grouppublic BatchResult<String> addAllGroupsToGroup(Collection<String> childGroupNames, String groupName) throws GroupNotFoundException
InternalRemoteDirectoryCaller must ensure that the memberships don't already exist.
addAllGroupsToGroup in interface InternalRemoteDirectorychildGroupNames - names of child groups to add to group.groupName - name of group to add child groups to.GroupNotFoundException - group with supplied groupName cannot be found.public void removeUserFromGroup(String username, String groupName) throws MembershipNotFoundException, GroupNotFoundException, UserNotFoundException
RemoteDirectoryremoveUserFromGroup in interface RemoteDirectoryusername - The user that will be removed from parentGroupgroupName - The group that will lose the member.MembershipNotFoundException - if the user is not a direct member of the group.GroupNotFoundException - If the group cannot be found.UserNotFoundException - If the user cannot be found.public BatchResult<String> removeUsersFromGroup(Set<String> usernames, String groupName) throws GroupNotFoundException
InternalRemoteDirectoryremoveUsersFromGroup in interface InternalRemoteDirectoryusernames - names of users to remove from group.groupName - name of group to remove users from.GroupNotFoundException - group with supplied groupName does not existpublic void removeGroupFromGroup(String childGroup, String parentGroup) throws InvalidMembershipException, MembershipNotFoundException, GroupNotFoundException
RemoteDirectoryremoveGroupFromGroup in interface RemoteDirectorychildGroup - The group that will be removed from parentGroupparentGroup - The group that will lose the member.InvalidMembershipException - if the childGroup and parentGroup exist but are of different GroupTypes.MembershipNotFoundException - if the childGroup is not a direct member of the parentGroup.GroupNotFoundException - One or both of the groups cannot be found.public BatchResult<String> removeGroupsFromGroup(Collection<String> childGroupNames, String groupName) throws GroupNotFoundException
InternalRemoteDirectoryremoveGroupsFromGroup in interface InternalRemoteDirectorychildGroupNames - names of child groups to remove from group.groupName - name of group to remove child groups from.GroupNotFoundException - group with supplied groupName cannot be found.public BoundedCount countDirectMembersOfGroup(String groupName, int querySizeHint)
RemoteDirectorycountDirectMembersOfGroup in interface RemoteDirectorygroupName - the name of the group to search forquerySizeHint - hinting at the maximum number of memberships that should be counted. The directory that
implements this may choose to count less or more. This is a user provided suggestion for potential efficiency.public <T> List<T> searchGroupRelationships(MembershipQuery<T> query)
RemoteDirectorysearchGroupRelationships in interface MultiValuesQueriesSupportsearchGroupRelationships in interface RemoteDirectoryquery - query for memberships.public <T> com.google.common.collect.ListMultimap<String,T> searchGroupRelationshipsGroupedByName(MembershipQuery<T> query)
MultiValuesQueriesSupportgroups that match the supplied query criteria.
This method is similar to MultiValuesQueriesSupport.searchGroupRelationships(MembershipQuery), but it additionally groups results
by elements of MembershipQuery.getEntityNamesToMatch().
searchGroupRelationshipsGroupedByName in interface MultiValuesQueriesSupportquery - EntityQuery for Entity.GROUP.ListMultimap<String, Group> or ListMultimap<String, String> of groups/groupnames
matching the search criteria, grouped by MembershipQuery.getEntityNamesToMatch().
Results are ordered by entity name, case-insensitive.
An empty ListMultimap will be returned if no groups matching the criteria are found.public void testConnection()
throws OperationFailedException
testConnection in interface RemoteDirectoryOperationFailedException - underlying directory implementation failed to execute the operation.public boolean supportsInactiveAccounts()
supportsInactiveAccounts in interface RemoteDirectorytrue, alwayspublic boolean supportsNestedGroups()
RemoteDirectorysupportsNestedGroups in interface RemoteDirectorytrue because Internal Directories support nested groups as of Crowd 2.0.public boolean supportsPasswordExpiration()
supportsPasswordExpiration in interface RemoteDirectorytrue, always.public boolean supportsSettingEncryptedCredential()
supportsSettingEncryptedCredential in interface RemoteDirectorytrue, always.public boolean isRolesDisabled()
RemoteDirectoryisRolesDisabled in interface RemoteDirectorypublic Iterable<Membership> getMemberships() throws OperationFailedException
RemoteDirectoryGet an iterable view of the available group memberships. This may be implemented as a single remote call or separate calls, depending on the directory.
If there is a failure in the underlying retrieval, the iterator may throw
Membership.MembershipIterationException at runtime.
If the directory does not have a bulk call interface then a typical implementation would be:
return new DirectoryMembershipsIterable(this);
getMemberships in interface RemoteDirectoryOperationFailedException - if the underlying directory implementation failed to execute the operationpublic RemoteDirectory getAuthoritativeDirectory()
getAuthoritativeDirectory in interface RemoteDirectorypublic void expireAllPasswords()
RemoteDirectoryUserConstants.REQUIRES_PASSWORD_CHANGE attribute to true for
all users in the directory using bulk operationsexpireAllPasswords in interface RemoteDirectorypublic AvatarReference getUserAvatarByName(String username, int sizeHint) throws OperationFailedException
RemoteDirectorygetUserAvatarByName in interface RemoteDirectorysizeHint - a hint in pixels for the context in which this will be usednull if none is availableOperationFailedExceptionCopyright © 2024 Atlassian. All rights reserved.