public class AuditingDirectoryDecorator extends Object implements RemoteDirectory
RemoteDirectory that creates events in the audit log upon changes. Used to extend
existing directories with auditing. This class should not be used for directories using Crowd's persistence layer as
the changes will be audited by the DAOs.| Constructor and Description |
|---|
AuditingDirectoryDecorator(RemoteDirectory remoteDirectory,
AuditService auditService,
com.atlassian.crowd.manager.audit.mapper.AuditLogUserMapper auditLogUserMapper,
com.atlassian.crowd.manager.audit.mapper.AuditLogGroupMapper auditLogGroupMapper,
String directoryName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocallyFilteredGroupNames, userAuthenticatedpublic AuditingDirectoryDecorator(RemoteDirectory remoteDirectory, AuditService auditService, com.atlassian.crowd.manager.audit.mapper.AuditLogUserMapper auditLogUserMapper, com.atlassian.crowd.manager.audit.mapper.AuditLogGroupMapper auditLogGroupMapper, String directoryName)
public void addUserToGroup(String username, String groupName) throws GroupNotFoundException, UserNotFoundException, ReadOnlyGroupException, OperationFailedException, MembershipAlreadyExistsException
addUserToGroup in interface RemoteDirectoryGroupNotFoundExceptionUserNotFoundExceptionReadOnlyGroupExceptionOperationFailedExceptionMembershipAlreadyExistsExceptionpublic void addGroupToGroup(String childGroup, String parentGroup) throws GroupNotFoundException, InvalidMembershipException, ReadOnlyGroupException, OperationFailedException, MembershipAlreadyExistsException
addGroupToGroup in interface RemoteDirectoryGroupNotFoundExceptionInvalidMembershipExceptionReadOnlyGroupExceptionOperationFailedExceptionMembershipAlreadyExistsExceptionpublic void removeUserFromGroup(String username, String groupName) throws GroupNotFoundException, UserNotFoundException, MembershipNotFoundException, ReadOnlyGroupException, OperationFailedException
removeUserFromGroup in interface RemoteDirectoryGroupNotFoundExceptionUserNotFoundExceptionMembershipNotFoundExceptionReadOnlyGroupExceptionOperationFailedExceptionpublic void removeGroupFromGroup(String childGroup, String parentGroup) throws GroupNotFoundException, InvalidMembershipException, MembershipNotFoundException, ReadOnlyGroupException, OperationFailedException
removeGroupFromGroup in interface RemoteDirectoryGroupNotFoundExceptionInvalidMembershipExceptionMembershipNotFoundExceptionReadOnlyGroupExceptionOperationFailedException@Nonnull public <T> List<T> searchGroupRelationships(MembershipQuery<T> query) throws OperationFailedException
searchGroupRelationships in interface RemoteDirectoryOperationFailedExceptionpublic void testConnection()
throws OperationFailedException
testConnection in interface RemoteDirectoryOperationFailedExceptionpublic boolean supportsInactiveAccounts()
supportsInactiveAccounts in interface RemoteDirectorypublic boolean supportsNestedGroups()
supportsNestedGroups in interface RemoteDirectorypublic boolean supportsPasswordExpiration()
supportsPasswordExpiration in interface RemoteDirectorypublic boolean supportsSettingEncryptedCredential()
supportsSettingEncryptedCredential in interface RemoteDirectorypublic boolean isRolesDisabled()
isRolesDisabled in interface RemoteDirectory@Nonnull public Iterable<Membership> getMemberships() throws OperationFailedException
getMemberships in interface RemoteDirectoryOperationFailedException@Nonnull public RemoteDirectory getAuthoritativeDirectory()
getAuthoritativeDirectory in interface RemoteDirectorypublic void expireAllPasswords()
throws OperationFailedException
expireAllPasswords in interface RemoteDirectoryOperationFailedException@Nullable public AvatarReference getUserAvatarByName(String username, int sizeHint) throws UserNotFoundException, OperationFailedException
getUserAvatarByName in interface RemoteDirectoryUserNotFoundExceptionOperationFailedException@ExperimentalApi public User updateUserFromRemoteDirectory(User remoteUser) throws OperationFailedException, UserNotFoundException
updateUserFromRemoteDirectory in interface RemoteDirectoryOperationFailedExceptionUserNotFoundException@Nullable public Set<String> getValues(String key)
getValues in interface Attributes@Nullable public String getValue(String key)
getValue in interface Attributespublic Set<String> getKeys()
getKeys in interface Attributespublic boolean isEmpty()
isEmpty in interface Attributes@Nonnull public User addUser(UserTemplate user, PasswordCredential credential) throws InvalidUserException, InvalidCredentialException, UserAlreadyExistsException, OperationFailedException
addUser in interface RemoteDirectoryInvalidUserExceptionInvalidCredentialExceptionUserAlreadyExistsExceptionOperationFailedExceptionpublic UserWithAttributes addUser(UserTemplateWithAttributes user, PasswordCredential credential) throws InvalidUserException, InvalidCredentialException, UserAlreadyExistsException, OperationFailedException
addUser in interface RemoteDirectoryInvalidUserExceptionInvalidCredentialExceptionUserAlreadyExistsExceptionOperationFailedException@Nonnull public User updateUser(UserTemplate user) throws InvalidUserException, UserNotFoundException, OperationFailedException
updateUser in interface RemoteDirectoryInvalidUserExceptionUserNotFoundExceptionOperationFailedException@Nonnull public User renameUser(String oldName, String newName) throws UserNotFoundException, InvalidUserException, UserAlreadyExistsException, OperationFailedException
renameUser in interface RemoteDirectoryUserNotFoundExceptionInvalidUserExceptionUserAlreadyExistsExceptionOperationFailedExceptionpublic void storeUserAttributes(String username, Map<String,Set<String>> attributes) throws UserNotFoundException, OperationFailedException
storeUserAttributes in interface RemoteDirectoryUserNotFoundExceptionOperationFailedExceptionpublic void removeUserAttributes(String username, String attributeName) throws UserNotFoundException, OperationFailedException
removeUserAttributes in interface RemoteDirectoryUserNotFoundExceptionOperationFailedExceptionpublic void removeUser(String name) throws UserNotFoundException, OperationFailedException
removeUser in interface RemoteDirectoryUserNotFoundExceptionOperationFailedException@Nonnull public <T> List<T> searchUsers(EntityQuery<T> query) throws OperationFailedException
searchUsers in interface RemoteDirectoryOperationFailedException@Nonnull public Group findGroupByName(String name) throws GroupNotFoundException, OperationFailedException
findGroupByName in interface RemoteDirectoryGroupNotFoundExceptionOperationFailedException@Nonnull public GroupWithAttributes findGroupWithAttributesByName(String name) throws GroupNotFoundException, OperationFailedException
findGroupWithAttributesByName in interface RemoteDirectoryGroupNotFoundExceptionOperationFailedExceptionpublic void updateUserCredential(String username, PasswordCredential credential) throws UserNotFoundException, InvalidCredentialException, OperationFailedException
updateUserCredential in interface RemoteDirectoryUserNotFoundExceptionInvalidCredentialExceptionOperationFailedException@Nonnull public Group addGroup(GroupTemplate group) throws InvalidGroupException, OperationFailedException
addGroup in interface RemoteDirectoryInvalidGroupExceptionOperationFailedExceptionpublic void removeGroup(String name) throws GroupNotFoundException, ReadOnlyGroupException, OperationFailedException
removeGroup in interface RemoteDirectoryGroupNotFoundExceptionReadOnlyGroupExceptionOperationFailedException@Nonnull public <T> List<T> searchGroups(EntityQuery<T> query) throws OperationFailedException
searchGroups in interface RemoteDirectoryOperationFailedExceptionpublic boolean isUserDirectGroupMember(String username, String groupName) throws OperationFailedException
isUserDirectGroupMember in interface RemoteDirectoryOperationFailedExceptionpublic boolean isGroupDirectGroupMember(String childGroup, String parentGroup) throws OperationFailedException
isGroupDirectGroupMember in interface RemoteDirectoryOperationFailedException@Nonnull public BoundedCount countDirectMembersOfGroup(String groupName, int querySizeHint) throws OperationFailedException
countDirectMembersOfGroup in interface RemoteDirectoryOperationFailedException@Nonnull public Group updateGroup(GroupTemplate group) throws InvalidGroupException, GroupNotFoundException, ReadOnlyGroupException, OperationFailedException
updateGroup in interface RemoteDirectoryInvalidGroupExceptionGroupNotFoundExceptionReadOnlyGroupExceptionOperationFailedException@Nonnull public Group renameGroup(String oldName, String newName) throws GroupNotFoundException, InvalidGroupException, OperationFailedException
renameGroup in interface RemoteDirectoryGroupNotFoundExceptionInvalidGroupExceptionOperationFailedExceptionpublic void storeGroupAttributes(String groupName, Map<String,Set<String>> attributes) throws GroupNotFoundException, OperationFailedException
storeGroupAttributes in interface RemoteDirectoryGroupNotFoundExceptionOperationFailedExceptionpublic void removeGroupAttributes(String groupName, String attributeName) throws GroupNotFoundException, OperationFailedException
removeGroupAttributes in interface RemoteDirectoryGroupNotFoundExceptionOperationFailedExceptionpublic long getDirectoryId()
getDirectoryId in interface RemoteDirectorypublic void setDirectoryId(long directoryId)
setDirectoryId in interface RemoteDirectory@Nonnull public String getDescriptiveName()
getDescriptiveName in interface RemoteDirectorypublic void setAttributes(Map<String,String> attributes)
setAttributes in interface RemoteDirectory@Nonnull public User findUserByName(String name) throws UserNotFoundException, OperationFailedException
findUserByName in interface RemoteDirectoryUserNotFoundExceptionOperationFailedException@Nonnull public UserWithAttributes findUserWithAttributesByName(String name) throws UserNotFoundException, OperationFailedException
findUserWithAttributesByName in interface RemoteDirectoryUserNotFoundExceptionOperationFailedException@Nonnull public User findUserByExternalId(String externalId) throws UserNotFoundException, OperationFailedException
findUserByExternalId in interface RemoteDirectoryUserNotFoundExceptionOperationFailedException@Nonnull public User authenticate(String name, PasswordCredential credential) throws UserNotFoundException, InactiveAccountException, InvalidAuthenticationException, ExpiredCredentialException, OperationFailedException
authenticate in interface RemoteDirectoryUserNotFoundExceptionInactiveAccountExceptionInvalidAuthenticationExceptionExpiredCredentialExceptionOperationFailedExceptionCopyright © 2023 Atlassian. All rights reserved.