public final class JiraJdbcRemoteDirectory extends Object implements com.atlassian.crowd.directory.RemoteDirectory
This directory is strictly read-only. Attempts to do any modifications to the directory will fail with
OperationNotSupportedException.
| Modifier and Type | Field and Description |
|---|---|
static String |
JIRAJDBC_DATASOURCE_URL_KEY
Required directory attribute key.
|
| Constructor and Description |
|---|
JiraJdbcRemoteDirectory(org.springframework.jdbc.core.JdbcTemplate jdbc)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
com.atlassian.crowd.model.group.Group |
addGroup(com.atlassian.crowd.model.group.GroupTemplate group) |
void |
addGroupToGroup(String childGroup,
String parentGroup) |
com.atlassian.crowd.model.user.User |
addUser(com.atlassian.crowd.model.user.UserTemplate user,
com.atlassian.crowd.embedded.api.PasswordCredential credential) |
void |
addUserToGroup(String username,
String groupName) |
com.atlassian.crowd.model.user.User |
authenticate(String name,
com.atlassian.crowd.embedded.api.PasswordCredential credential) |
com.atlassian.crowd.util.BoundedCount |
countDirectMembersOfGroup(String groupName,
int querySizeHint) |
void |
expireAllPasswords() |
com.atlassian.crowd.model.group.Group |
findGroupByName(String name) |
com.atlassian.crowd.model.group.GroupWithAttributes |
findGroupWithAttributesByName(String name) |
com.atlassian.crowd.model.user.User |
findUserByExternalId(String externalId) |
com.atlassian.crowd.model.user.User |
findUserById(long id) |
com.atlassian.crowd.model.user.User |
findUserByName(String name) |
com.atlassian.crowd.model.user.UserWithAttributes |
findUserWithAttributesByName(String name) |
com.atlassian.crowd.directory.RemoteDirectory |
getAuthoritativeDirectory() |
String |
getDescriptiveName() |
long |
getDirectoryId() |
Set<String> |
getKeys() |
Iterable<com.atlassian.crowd.model.group.Membership> |
getMemberships() |
String |
getValue(String key) |
Set<String> |
getValues(String key) |
boolean |
isEmpty() |
boolean |
isGroupDirectGroupMember(String childGroup,
String parentGroup) |
boolean |
isRolesDisabled() |
boolean |
isUserDirectGroupMember(String username,
String groupName) |
void |
removeGroup(String name) |
void |
removeGroupAttributes(String groupName,
String attributeName) |
void |
removeGroupFromGroup(String childGroup,
String parentGroup) |
void |
removeUser(String name) |
void |
removeUserAttributes(String username,
String attributeName) |
void |
removeUserFromGroup(String username,
String groupName) |
com.atlassian.crowd.model.group.Group |
renameGroup(String oldName,
String newName) |
com.atlassian.crowd.model.user.User |
renameUser(String oldName,
String newName) |
<T> List<T> |
searchGroupRelationships(com.atlassian.crowd.search.query.membership.MembershipQuery<T> query) |
<T> List<T> |
searchGroups(com.atlassian.crowd.search.query.entity.EntityQuery<T> query) |
<T> List<T> |
searchUsers(com.atlassian.crowd.search.query.entity.EntityQuery<T> query) |
void |
setAttributes(Map<String,String> attributes) |
void |
setDirectoryId(long directoryId) |
void |
storeGroupAttributes(String groupName,
Map<String,Set<String>> attributes) |
void |
storeUserAttributes(String username,
Map<String,Set<String>> attributes) |
boolean |
supportsInactiveAccounts() |
boolean |
supportsNestedGroups() |
boolean |
supportsPasswordExpiration() |
boolean |
supportsSettingEncryptedCredential() |
void |
testConnection() |
com.atlassian.crowd.model.group.Group |
updateGroup(com.atlassian.crowd.model.group.GroupTemplate group) |
com.atlassian.crowd.model.user.User |
updateUser(com.atlassian.crowd.model.user.UserTemplate user) |
void |
updateUserCredential(String username,
com.atlassian.crowd.embedded.api.PasswordCredential credential) |
public static final String JIRAJDBC_DATASOURCE_URL_KEY
public JiraJdbcRemoteDirectory(org.springframework.jdbc.core.JdbcTemplate jdbc)
jdbc - a Spring JDBC Template already pointed to the correct database.public long getDirectoryId()
getDirectoryId in interface com.atlassian.crowd.directory.RemoteDirectorypublic void setDirectoryId(long directoryId)
setDirectoryId in interface com.atlassian.crowd.directory.RemoteDirectorypublic String getDescriptiveName()
getDescriptiveName in interface com.atlassian.crowd.directory.RemoteDirectorypublic void setAttributes(Map<String,String> attributes)
setAttributes in interface com.atlassian.crowd.directory.RemoteDirectorypublic com.atlassian.crowd.model.user.User findUserByName(String name) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
findUserByName in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.user.UserWithAttributes findUserWithAttributesByName(String name) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
findUserWithAttributesByName in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.user.User findUserByExternalId(String externalId) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
findUserByExternalId in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.user.User findUserById(long id)
throws com.atlassian.crowd.exception.UserNotFoundException,
com.atlassian.crowd.exception.OperationFailedException
com.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.user.User authenticate(String name, com.atlassian.crowd.embedded.api.PasswordCredential credential) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.InactiveAccountException, com.atlassian.crowd.exception.InvalidAuthenticationException, com.atlassian.crowd.exception.ExpiredCredentialException, com.atlassian.crowd.exception.OperationFailedException
authenticate in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.InactiveAccountExceptioncom.atlassian.crowd.exception.InvalidAuthenticationExceptioncom.atlassian.crowd.exception.ExpiredCredentialExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic <T> List<T> searchUsers(com.atlassian.crowd.search.query.entity.EntityQuery<T> query) throws com.atlassian.crowd.exception.OperationFailedException
searchUsers in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.group.Group findGroupByName(String name) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.OperationFailedException
findGroupByName in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.group.GroupWithAttributes findGroupWithAttributesByName(String name) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.OperationFailedException
findGroupWithAttributesByName in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic <T> List<T> searchGroups(com.atlassian.crowd.search.query.entity.EntityQuery<T> query) throws com.atlassian.crowd.exception.OperationFailedException
searchGroups in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.OperationFailedExceptionpublic boolean isUserDirectGroupMember(String username, String groupName) throws com.atlassian.crowd.exception.OperationFailedException
isUserDirectGroupMember in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.OperationFailedExceptionpublic <T> List<T> searchGroupRelationships(com.atlassian.crowd.search.query.membership.MembershipQuery<T> query) throws com.atlassian.crowd.exception.OperationFailedException
searchGroupRelationships in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.OperationFailedExceptionpublic void testConnection()
throws com.atlassian.crowd.exception.OperationFailedException
testConnection in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.OperationFailedExceptionpublic boolean isGroupDirectGroupMember(String childGroup, String parentGroup) throws com.atlassian.crowd.exception.OperationFailedException
isGroupDirectGroupMember in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.util.BoundedCount countDirectMembersOfGroup(String groupName, int querySizeHint) throws com.atlassian.crowd.exception.OperationFailedException
countDirectMembersOfGroup in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.user.User addUser(com.atlassian.crowd.model.user.UserTemplate user,
com.atlassian.crowd.embedded.api.PasswordCredential credential)
throws com.atlassian.crowd.exception.InvalidUserException,
com.atlassian.crowd.exception.InvalidCredentialException,
com.atlassian.crowd.exception.OperationFailedException
addUser in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.InvalidUserExceptioncom.atlassian.crowd.exception.InvalidCredentialExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.user.User updateUser(com.atlassian.crowd.model.user.UserTemplate user)
throws com.atlassian.crowd.exception.InvalidUserException,
com.atlassian.crowd.exception.UserNotFoundException,
com.atlassian.crowd.exception.OperationFailedException
updateUser in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.InvalidUserExceptioncom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void updateUserCredential(String username, com.atlassian.crowd.embedded.api.PasswordCredential credential) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.InvalidCredentialException, com.atlassian.crowd.exception.OperationFailedException
updateUserCredential in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.InvalidCredentialExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.user.User renameUser(String oldName, String newName) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.InvalidUserException, com.atlassian.crowd.exception.OperationFailedException
renameUser in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.InvalidUserExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void storeUserAttributes(String username, Map<String,Set<String>> attributes) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
storeUserAttributes in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void removeUserAttributes(String username, String attributeName) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeUserAttributes in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void removeUser(String name) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeUser in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.group.Group addGroup(com.atlassian.crowd.model.group.GroupTemplate group)
throws com.atlassian.crowd.exception.InvalidGroupException,
com.atlassian.crowd.exception.OperationFailedException
addGroup in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.InvalidGroupExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.group.Group updateGroup(com.atlassian.crowd.model.group.GroupTemplate group)
throws com.atlassian.crowd.exception.InvalidGroupException,
com.atlassian.crowd.exception.GroupNotFoundException,
com.atlassian.crowd.exception.OperationFailedException
updateGroup in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.InvalidGroupExceptioncom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.model.group.Group renameGroup(String oldName, String newName) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.InvalidGroupException, com.atlassian.crowd.exception.OperationFailedException
renameGroup in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.InvalidGroupExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void storeGroupAttributes(String groupName, Map<String,Set<String>> attributes) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.OperationFailedException
storeGroupAttributes in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void removeGroupAttributes(String groupName, String attributeName) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeGroupAttributes in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void removeGroup(String name) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeGroup in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void addUserToGroup(String username, String groupName) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
addUserToGroup in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void addGroupToGroup(String childGroup, String parentGroup) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.InvalidMembershipException, com.atlassian.crowd.exception.OperationFailedException
addGroupToGroup in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.InvalidMembershipExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void removeUserFromGroup(String username, String groupName) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.MembershipNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeUserFromGroup in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.MembershipNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic void removeGroupFromGroup(String childGroup, String parentGroup) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.InvalidMembershipException, com.atlassian.crowd.exception.MembershipNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeGroupFromGroup in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.InvalidMembershipExceptioncom.atlassian.crowd.exception.MembershipNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionpublic boolean supportsInactiveAccounts()
supportsInactiveAccounts in interface com.atlassian.crowd.directory.RemoteDirectorypublic boolean supportsNestedGroups()
supportsNestedGroups in interface com.atlassian.crowd.directory.RemoteDirectorypublic boolean supportsSettingEncryptedCredential()
supportsSettingEncryptedCredential in interface com.atlassian.crowd.directory.RemoteDirectorypublic boolean supportsPasswordExpiration()
supportsPasswordExpiration in interface com.atlassian.crowd.directory.RemoteDirectorypublic void expireAllPasswords()
throws com.atlassian.crowd.exception.OperationFailedException
expireAllPasswords in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.OperationFailedExceptionpublic boolean isRolesDisabled()
isRolesDisabled in interface com.atlassian.crowd.directory.RemoteDirectorypublic Iterable<com.atlassian.crowd.model.group.Membership> getMemberships() throws com.atlassian.crowd.exception.OperationFailedException
getMemberships in interface com.atlassian.crowd.directory.RemoteDirectorycom.atlassian.crowd.exception.OperationFailedExceptionpublic com.atlassian.crowd.directory.RemoteDirectory getAuthoritativeDirectory()
getAuthoritativeDirectory in interface com.atlassian.crowd.directory.RemoteDirectorypublic Set<String> getValues(String key)
getValues in interface com.atlassian.crowd.embedded.api.Attributespublic String getValue(String key)
getValue in interface com.atlassian.crowd.embedded.api.Attributespublic Set<String> getKeys()
getKeys in interface com.atlassian.crowd.embedded.api.Attributespublic boolean isEmpty()
isEmpty in interface com.atlassian.crowd.embedded.api.AttributesCopyright © 2003–2016 Atlassian. All rights reserved.