eXo JCR :: Ext :: Services 1.16.0-Alpha1

org.exoplatform.services.jcr.ext.organization
Class UserHandlerImpl

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.organization.JCROrgServiceHandler
      extended by org.exoplatform.services.jcr.ext.organization.UserHandlerImpl
All Implemented Interfaces:
org.exoplatform.services.organization.ExtendedUserHandler, org.exoplatform.services.organization.UserEventListenerHandler, org.exoplatform.services.organization.UserHandler

public class UserHandlerImpl
extends JCROrgServiceHandler
implements org.exoplatform.services.organization.UserHandler, org.exoplatform.services.organization.UserEventListenerHandler, org.exoplatform.services.organization.ExtendedUserHandler

Created by The eXo Platform SAS. Date: 24.07.2008

Version:
$Id: UserHandlerImpl.java 80140 2012-03-07 11:08:07Z aplotnikov $
Author:
Peter Nedonosko

Nested Class Summary
static class UserHandlerImpl.UserProperties
          Class contains the names of user properties only.
 
Field Summary
protected  List<org.exoplatform.services.organization.UserEventListener> listeners
          The list of listeners to broadcast the events.
 
Fields inherited from class org.exoplatform.services.jcr.ext.organization.JCROrgServiceHandler
cache, groupHandler, LOG, membershipHandler, service, typeHandler, userHandler, userProfileHandler, utils
 
Method Summary
 void addUserEventListener(org.exoplatform.services.organization.UserEventListener listener)
          
 boolean authenticate(String username, String password)
          
 boolean authenticate(String userName, String password, org.exoplatform.services.security.PasswordEncrypter pe)
          
 void createUser(org.exoplatform.services.organization.User user, boolean broadcast)
          
 org.exoplatform.services.organization.User createUserInstance()
          
 org.exoplatform.services.organization.User createUserInstance(String username)
          
 org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findAllUsers()
          
 org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findAllUsers(boolean enabledOnly)
          
 org.exoplatform.services.organization.User findUserByName(String userName)
          
 org.exoplatform.services.organization.User findUserByName(String userName, boolean enabledOnly)
          
 org.exoplatform.commons.utils.LazyPageList<org.exoplatform.services.organization.User> findUsers(org.exoplatform.services.organization.Query query)
          
 org.exoplatform.commons.utils.LazyPageList<org.exoplatform.services.organization.User> findUsersByGroup(String groupId)
          
 org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findUsersByGroupId(String groupId)
          
 org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findUsersByGroupId(String groupId, boolean enabledOnly)
          
 org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findUsersByQuery(org.exoplatform.services.organization.Query query)
          
 org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findUsersByQuery(org.exoplatform.services.organization.Query query, boolean enabledOnly)
          
 List<org.exoplatform.services.organization.UserEventListener> getUserListeners()
          
 org.exoplatform.commons.utils.LazyPageList<org.exoplatform.services.organization.User> getUserPageList(int pageSize)
          
 UserImpl readUser(javax.jcr.Node userNode)
          Read user properties from the node in the storage.
 org.exoplatform.services.organization.User removeUser(String userName, boolean broadcast)
          
 void removeUserEventListener(org.exoplatform.services.organization.UserEventListener listener)
          Remove registered listener.
 void saveUser(org.exoplatform.services.organization.User user, boolean broadcast)
          
 org.exoplatform.services.organization.User setEnabled(String userName, boolean enabled, boolean broadcast)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected final List<org.exoplatform.services.organization.UserEventListener> listeners
The list of listeners to broadcast the events.

Method Detail

authenticate

public boolean authenticate(String username,
                            String password)
                     throws Exception

Specified by:
authenticate in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

authenticate

public boolean authenticate(String userName,
                            String password,
                            org.exoplatform.services.security.PasswordEncrypter pe)
                     throws Exception

Specified by:
authenticate in interface org.exoplatform.services.organization.ExtendedUserHandler
Throws:
Exception

createUser

public void createUser(org.exoplatform.services.organization.User user,
                       boolean broadcast)
                throws Exception

Specified by:
createUser in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

createUserInstance

public org.exoplatform.services.organization.User createUserInstance()

Specified by:
createUserInstance in interface org.exoplatform.services.organization.UserHandler

createUserInstance

public org.exoplatform.services.organization.User createUserInstance(String username)

Specified by:
createUserInstance in interface org.exoplatform.services.organization.UserHandler

findUserByName

public org.exoplatform.services.organization.User findUserByName(String userName)
                                                          throws Exception

Specified by:
findUserByName in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

findUsers

public org.exoplatform.commons.utils.LazyPageList<org.exoplatform.services.organization.User> findUsers(org.exoplatform.services.organization.Query query)
                                                                                                 throws Exception

Specified by:
findUsers in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

findUsersByGroup

public org.exoplatform.commons.utils.LazyPageList<org.exoplatform.services.organization.User> findUsersByGroup(String groupId)
                                                                                                        throws Exception

Specified by:
findUsersByGroup in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

getUserPageList

public org.exoplatform.commons.utils.LazyPageList<org.exoplatform.services.organization.User> getUserPageList(int pageSize)
                                                                                                       throws Exception

Specified by:
getUserPageList in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

findAllUsers

public org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findAllUsers()
                                                                                                  throws Exception

Specified by:
findAllUsers in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

findUsersByGroupId

public org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findUsersByGroupId(String groupId)
                                                                                                        throws Exception

Specified by:
findUsersByGroupId in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

findUsersByQuery

public org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findUsersByQuery(org.exoplatform.services.organization.Query query)
                                                                                                      throws Exception

Specified by:
findUsersByQuery in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

removeUser

public org.exoplatform.services.organization.User removeUser(String userName,
                                                             boolean broadcast)
                                                      throws Exception

Specified by:
removeUser in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

saveUser

public void saveUser(org.exoplatform.services.organization.User user,
                     boolean broadcast)
              throws Exception

Specified by:
saveUser in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

setEnabled

public org.exoplatform.services.organization.User setEnabled(String userName,
                                                             boolean enabled,
                                                             boolean broadcast)
                                                      throws Exception,
                                                             UnsupportedOperationException

Specified by:
setEnabled in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception
UnsupportedOperationException

findUserByName

public org.exoplatform.services.organization.User findUserByName(String userName,
                                                                 boolean enabledOnly)
                                                          throws Exception

Specified by:
findUserByName in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

findUsersByGroupId

public org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findUsersByGroupId(String groupId,
                                                                                                               boolean enabledOnly)
                                                                                                        throws Exception

Specified by:
findUsersByGroupId in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

findAllUsers

public org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findAllUsers(boolean enabledOnly)
                                                                                                  throws Exception

Specified by:
findAllUsers in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

findUsersByQuery

public org.exoplatform.commons.utils.ListAccess<org.exoplatform.services.organization.User> findUsersByQuery(org.exoplatform.services.organization.Query query,
                                                                                                             boolean enabledOnly)
                                                                                                      throws Exception

Specified by:
findUsersByQuery in interface org.exoplatform.services.organization.UserHandler
Throws:
Exception

readUser

public UserImpl readUser(javax.jcr.Node userNode)
                  throws Exception
Read user properties from the node in the storage.

Parameters:
userNode - the node where user properties are stored
Returns:
User
Throws:
Exception

addUserEventListener

public void addUserEventListener(org.exoplatform.services.organization.UserEventListener listener)

Specified by:
addUserEventListener in interface org.exoplatform.services.organization.UserHandler

removeUserEventListener

public void removeUserEventListener(org.exoplatform.services.organization.UserEventListener listener)
Remove registered listener.

Specified by:
removeUserEventListener in interface org.exoplatform.services.organization.UserHandler
Parameters:
listener - The registered listener for remove

getUserListeners

public List<org.exoplatform.services.organization.UserEventListener> getUserListeners()

Specified by:
getUserListeners in interface org.exoplatform.services.organization.UserEventListenerHandler

eXo JCR :: Ext :: Services 1.16.0-Alpha1

Copyright © 2013 eXo Platform SAS. All Rights Reserved.