com.atlassian.confluence.user.persistence.dao
Interface ConfluenceUserDao

All Known Implementing Classes:
HibernateConfluenceUserDao

public interface ConfluenceUserDao

A DAO for manipulating ConfluenceUser objects (which essentially act as a mapping between a user key and a User object retrieved externally e.g. from Embedded Crowd).

Since:
5.2

Method Summary
 void create(ConfluenceUser user)
          Create a new ConfluenceUser.
 ConfluenceUser findByKey(com.atlassian.sal.api.user.UserKey key)
          Retrieve a ConfluenceUser by the user key.
 ConfluenceUser findByUsername(java.lang.String username)
          Find the ConfluenceUser with the given user name.
 java.util.Set<ConfluenceUser> getAll()
           
 void remove(ConfluenceUser user)
          Remove the supplied ConfluenceUser from persistence.
 ConfluenceUser rename(java.lang.String oldUsername, java.lang.String newUsername, boolean overrideExisting)
          Renames a user
 void update(ConfluenceUser user)
          Change a property of an existing ConfluenceUser.
 

Method Detail

create

void create(ConfluenceUser user)
Create a new ConfluenceUser.

Parameters:
user -

update

void update(ConfluenceUser user)
Change a property of an existing ConfluenceUser.

Parameters:
user -

remove

void remove(ConfluenceUser user)
Remove the supplied ConfluenceUser from persistence.

Parameters:
user -

rename

ConfluenceUser rename(java.lang.String oldUsername,
                      java.lang.String newUsername,
                      boolean overrideExisting)
Renames a user

Parameters:
oldUsername - old username for the user
newUsername - new username for the user
overrideExisting - True if possible existing mapping should make way for the renamed one. False for opposite behaviour.
Returns:
renamed user

findByKey

ConfluenceUser findByKey(com.atlassian.sal.api.user.UserKey key)
Retrieve a ConfluenceUser by the user key.

Parameters:
key -
Returns:
a ConfluenceUser with the supplied key

findByUsername

ConfluenceUser findByUsername(java.lang.String username)
Find the ConfluenceUser with the given user name.

Note that username lookups are case-insensitive, so the user you get back may not have exactly the same name as the name passed to this method.

Parameters:
username -
Returns:
a ConfluenceUser with the supplied username.

getAll

java.util.Set<ConfluenceUser> getAll()
Returns:
all the ConfluenceUser
Since:
5.3


Copyright © 2003-2014 Atlassian. All Rights Reserved.