public final class

JiraJdbcRemoteDirectory

extends Object
implements RemoteDirectory
java.lang.Object
   ↳ com.atlassian.confluence.user.crowd.jira.JiraJdbcRemoteDirectory

Class Overview

Crowd remote directory that connects directly to a (pre Embedded Crowd) JIRA database and reads the OSUser tables directly. This directory should only ever be deployed behind a DbCachingRemoteDirectory as it has neither been tested against nor optimised for direct access. This directory is strictly read-only. Attempts to do any modifications to the directory will fail with OperationFailedException

Summary

Constants
String JIRAJDBC_DATASOURCE_URL_KEY Required directory attribute key.
Public Constructors
JiraJdbcRemoteDirectory(JdbcTemplate jdbc)
Default constructor
Public Methods
Group addGroup(GroupTemplate group)
void addGroupToGroup(String childGroup, String parentGroup)
User addUser(UserTemplate user, PasswordCredential credential)
void addUserToGroup(String username, String groupName)
User authenticate(String name, PasswordCredential credential)
Group findGroupByName(String name)
GroupWithAttributes findGroupWithAttributesByName(String name)
User findUserByName(String name)
UserWithAttributes findUserWithAttributesByName(String name)
RemoteDirectory getAuthoritativeDirectory()
String getDescriptiveName()
long getDirectoryId()
Set<String> getKeys()
Iterable<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)
Group renameGroup(String oldName, String newName)
User renameUser(String oldName, String newName)
<T> List<T> searchGroupRelationships(MembershipQuery<T> query)
<T> List<T> searchGroups(EntityQuery<T> query)
<T> List<T> searchUsers(EntityQuery<T> query)
void setAttributes(Map<StringString> attributes)
void setDirectoryId(long directoryId)
void storeGroupAttributes(String groupName, Map<StringSet<String>> attributes)
void storeUserAttributes(String username, Map<StringSet<String>> attributes)
boolean supportsInactiveAccounts()
boolean supportsNestedGroups()
void testConnection()
Group updateGroup(GroupTemplate group)
User updateUser(UserTemplate user)
void updateUserCredential(String username, PasswordCredential credential)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.crowd.directory.RemoteDirectory
From interface com.atlassian.crowd.embedded.api.Attributes

Constants

public static final String JIRAJDBC_DATASOURCE_URL_KEY

Required directory attribute key. To configure the directory you must set this to be the JNDI URL of a JDBC datasource that connects to the JIRA database we are loading users from.

Constant Value: "jirajdbc.datasource.url"

Public Constructors

public JiraJdbcRemoteDirectory (JdbcTemplate jdbc)

Default constructor

Parameters
jdbc a Spring JDBC Template already pointed to the correct database.

Public Methods

public Group addGroup (GroupTemplate group)

Throws
InvalidGroupException
OperationFailedException

public void addGroupToGroup (String childGroup, String parentGroup)

public User addUser (UserTemplate user, PasswordCredential credential)

public void addUserToGroup (String username, String groupName)

public User authenticate (String name, PasswordCredential credential)

public Group findGroupByName (String name)

public GroupWithAttributes findGroupWithAttributesByName (String name)

public User findUserByName (String name)

public UserWithAttributes findUserWithAttributesByName (String name)

public RemoteDirectory getAuthoritativeDirectory ()

public String getDescriptiveName ()

public long getDirectoryId ()

public Set<String> getKeys ()

public Iterable<Membership> getMemberships ()

public String getValue (String key)

public Set<String> getValues (String key)

public boolean isEmpty ()

public boolean isGroupDirectGroupMember (String childGroup, String parentGroup)

public boolean isRolesDisabled ()

public boolean isUserDirectGroupMember (String username, String groupName)

public void removeGroup (String name)

public void removeGroupAttributes (String groupName, String attributeName)

public void removeUser (String name)

public void removeUserAttributes (String username, String attributeName)

public Group renameGroup (String oldName, String newName)

Throws
GroupNotFoundException
InvalidGroupException
OperationFailedException

public User renameUser (String oldName, String newName)

public List<T> searchGroupRelationships (MembershipQuery<T> query)

public List<T> searchGroups (EntityQuery<T> query)

public List<T> searchUsers (EntityQuery<T> query)

public void setAttributes (Map<StringString> attributes)

public void setDirectoryId (long directoryId)

public void storeGroupAttributes (String groupName, Map<StringSet<String>> attributes)

public void storeUserAttributes (String username, Map<StringSet<String>> attributes)

public boolean supportsInactiveAccounts ()

public boolean supportsNestedGroups ()

public void testConnection ()

public Group updateGroup (GroupTemplate group)

Throws
InvalidGroupException
GroupNotFoundException
OperationFailedException

public User updateUser (UserTemplate user)

public void updateUserCredential (String username, PasswordCredential credential)