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.RemoteDirectory
public void setDirectoryId(long directoryId)
setDirectoryId
in interface com.atlassian.crowd.directory.RemoteDirectory
public String getDescriptiveName()
getDescriptiveName
in interface com.atlassian.crowd.directory.RemoteDirectory
public void setAttributes(Map<String,String> attributes)
setAttributes
in interface com.atlassian.crowd.directory.RemoteDirectory
public 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.RemoteDirectory
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public com.atlassian.crowd.model.user.User findUserById(long id) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
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
public <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.RemoteDirectory
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public <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.RemoteDirectory
com.atlassian.crowd.exception.OperationFailedException
public boolean isUserDirectGroupMember(String username, String groupName) throws com.atlassian.crowd.exception.OperationFailedException
isUserDirectGroupMember
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.OperationFailedException
public <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.RemoteDirectory
com.atlassian.crowd.exception.OperationFailedException
public void testConnection() throws com.atlassian.crowd.exception.OperationFailedException
testConnection
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.OperationFailedException
public boolean isGroupDirectGroupMember(String childGroup, String parentGroup) throws com.atlassian.crowd.exception.OperationFailedException
isGroupDirectGroupMember
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.OperationFailedException
public com.atlassian.crowd.util.BoundedCount countDirectMembersOfGroup(String groupName, int querySizeHint) throws com.atlassian.crowd.exception.OperationFailedException
countDirectMembersOfGroup
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.InvalidUserException
com.atlassian.crowd.exception.InvalidCredentialException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.InvalidUserException
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.InvalidCredentialException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.InvalidUserException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public void removeUserAttributes(String username, String attributeName) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeUserAttributes
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public void removeUser(String name) throws com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeUser
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.InvalidGroupException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.InvalidGroupException
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.InvalidGroupException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public void removeGroupAttributes(String groupName, String attributeName) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeGroupAttributes
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public void removeGroup(String name) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.OperationFailedException
removeGroup
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.InvalidMembershipException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.MembershipNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public 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.RemoteDirectory
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.InvalidMembershipException
com.atlassian.crowd.exception.MembershipNotFoundException
com.atlassian.crowd.exception.OperationFailedException
public boolean supportsInactiveAccounts()
supportsInactiveAccounts
in interface com.atlassian.crowd.directory.RemoteDirectory
public boolean supportsNestedGroups()
supportsNestedGroups
in interface com.atlassian.crowd.directory.RemoteDirectory
public boolean supportsSettingEncryptedCredential()
supportsSettingEncryptedCredential
in interface com.atlassian.crowd.directory.RemoteDirectory
public boolean supportsPasswordExpiration()
supportsPasswordExpiration
in interface com.atlassian.crowd.directory.RemoteDirectory
public void expireAllPasswords() throws com.atlassian.crowd.exception.OperationFailedException
expireAllPasswords
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.OperationFailedException
public boolean isRolesDisabled()
isRolesDisabled
in interface com.atlassian.crowd.directory.RemoteDirectory
public Iterable<com.atlassian.crowd.model.group.Membership> getMemberships() throws com.atlassian.crowd.exception.OperationFailedException
getMemberships
in interface com.atlassian.crowd.directory.RemoteDirectory
com.atlassian.crowd.exception.OperationFailedException
public com.atlassian.crowd.directory.RemoteDirectory getAuthoritativeDirectory()
getAuthoritativeDirectory
in interface com.atlassian.crowd.directory.RemoteDirectory
public Set<String> getValues(String key)
getValues
in interface com.atlassian.crowd.embedded.api.Attributes
public String getValue(String key)
getValue
in interface com.atlassian.crowd.embedded.api.Attributes
public Set<String> getKeys()
getKeys
in interface com.atlassian.crowd.embedded.api.Attributes
public boolean isEmpty()
isEmpty
in interface com.atlassian.crowd.embedded.api.Attributes
Copyright © 2003–2016 Atlassian. All rights reserved.