com.atlassian.jira.crowd.embedded.ofbiz
Class OfBizUserDao

java.lang.Object
  extended by com.atlassian.jira.crowd.embedded.ofbiz.OfBizUserDao
All Implemented Interfaces:
com.atlassian.crowd.embedded.spi.UserDao

public class OfBizUserDao
extends Object
implements com.atlassian.crowd.embedded.spi.UserDao

Implementation of the user DAO that works with OfBiz


Constructor Summary
OfBizUserDao(org.ofbiz.core.entity.DelegatorInterface genericDelegator, com.atlassian.crowd.embedded.spi.DirectoryDao directoryDao, InternalMembershipDao membershipDao)
           
 
Method Summary
 com.atlassian.crowd.model.user.User add(com.atlassian.crowd.model.user.User user, com.atlassian.crowd.embedded.api.PasswordCredential credential)
           
 com.atlassian.crowd.util.BatchResult<com.atlassian.crowd.model.user.User> addAll(Set<com.atlassian.crowd.model.user.UserTemplateWithCredentialAndAttributes> users)
           
 com.atlassian.jira.crowd.embedded.ofbiz.OfBizUser findByName(long directoryId, String userName)
           
 com.atlassian.crowd.model.user.UserWithAttributes findByNameWithAttributes(long directoryId, String userName)
           
 void flushCache()
          Invoked by OfBizCacheFlushingManager to ensure caches are being flushed in the right order on XMLRestoreFinishedEvent
 com.atlassian.crowd.embedded.api.PasswordCredential getCredential(long directoryId, String userName)
           
 List<com.atlassian.crowd.embedded.api.PasswordCredential> getCredentialHistory(long directoryId, String userName)
           
 void remove(com.atlassian.crowd.model.user.User user)
           
 void removeAllUsers(long directoryId, Set<String> userNames)
           
 void removeAttribute(com.atlassian.crowd.model.user.User user, String attributeName)
           
 com.atlassian.crowd.model.user.User rename(com.atlassian.crowd.model.user.User user, String newName)
           
<T> List<T>
search(long directoryId, com.atlassian.crowd.search.query.entity.EntityQuery<T> query)
           
 void storeAttributes(com.atlassian.crowd.model.user.User user, Map<String,Set<String>> attributes)
           
 com.atlassian.crowd.model.user.User update(com.atlassian.crowd.model.user.User user)
           
 void updateCredential(com.atlassian.crowd.model.user.User user, com.atlassian.crowd.embedded.api.PasswordCredential credential, int credentialHistory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfBizUserDao

public OfBizUserDao(org.ofbiz.core.entity.DelegatorInterface genericDelegator,
                    com.atlassian.crowd.embedded.spi.DirectoryDao directoryDao,
                    InternalMembershipDao membershipDao)
Method Detail

findByName

public com.atlassian.jira.crowd.embedded.ofbiz.OfBizUser findByName(long directoryId,
                                                                    String userName)
                                                             throws com.atlassian.crowd.exception.UserNotFoundException
Specified by:
findByName in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException

findByNameWithAttributes

public com.atlassian.crowd.model.user.UserWithAttributes findByNameWithAttributes(long directoryId,
                                                                                  String userName)
                                                                           throws com.atlassian.crowd.exception.UserNotFoundException
Specified by:
findByNameWithAttributes in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException

getCredential

public com.atlassian.crowd.embedded.api.PasswordCredential getCredential(long directoryId,
                                                                         String userName)
                                                                  throws com.atlassian.crowd.exception.UserNotFoundException
Specified by:
getCredential in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException

getCredentialHistory

public List<com.atlassian.crowd.embedded.api.PasswordCredential> getCredentialHistory(long directoryId,
                                                                                      String userName)
                                                                               throws com.atlassian.crowd.exception.UserNotFoundException
Specified by:
getCredentialHistory in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException

addAll

public com.atlassian.crowd.util.BatchResult<com.atlassian.crowd.model.user.User> addAll(Set<com.atlassian.crowd.model.user.UserTemplateWithCredentialAndAttributes> users)
Specified by:
addAll in interface com.atlassian.crowd.embedded.spi.UserDao

add

public com.atlassian.crowd.model.user.User add(com.atlassian.crowd.model.user.User user,
                                               com.atlassian.crowd.embedded.api.PasswordCredential credential)
                                        throws com.atlassian.crowd.exception.UserAlreadyExistsException
Specified by:
add in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserAlreadyExistsException

storeAttributes

public void storeAttributes(com.atlassian.crowd.model.user.User user,
                            Map<String,Set<String>> attributes)
                     throws com.atlassian.crowd.exception.UserNotFoundException
Specified by:
storeAttributes in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException

removeAllUsers

public void removeAllUsers(long directoryId,
                           Set<String> userNames)
Specified by:
removeAllUsers in interface com.atlassian.crowd.embedded.spi.UserDao

update

public com.atlassian.crowd.model.user.User update(com.atlassian.crowd.model.user.User user)
                                           throws com.atlassian.crowd.exception.UserNotFoundException
Specified by:
update in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException

updateCredential

public void updateCredential(com.atlassian.crowd.model.user.User user,
                             com.atlassian.crowd.embedded.api.PasswordCredential credential,
                             int credentialHistory)
                      throws com.atlassian.crowd.exception.UserNotFoundException
Specified by:
updateCredential in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException

rename

public com.atlassian.crowd.model.user.User rename(com.atlassian.crowd.model.user.User user,
                                                  String newName)
Specified by:
rename in interface com.atlassian.crowd.embedded.spi.UserDao

removeAttribute

public void removeAttribute(com.atlassian.crowd.model.user.User user,
                            String attributeName)
                     throws com.atlassian.crowd.exception.UserNotFoundException
Specified by:
removeAttribute in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException

remove

public void remove(com.atlassian.crowd.model.user.User user)
            throws com.atlassian.crowd.exception.UserNotFoundException
Specified by:
remove in interface com.atlassian.crowd.embedded.spi.UserDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException

search

public <T> List<T> search(long directoryId,
                          com.atlassian.crowd.search.query.entity.EntityQuery<T> query)
Specified by:
search in interface com.atlassian.crowd.embedded.spi.UserDao

flushCache

public void flushCache()
Invoked by OfBizCacheFlushingManager to ensure caches are being flushed in the right order on XMLRestoreFinishedEvent



Copyright © 2002-2013 Atlassian. All Rights Reserved.