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

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

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

Created by The eXo Platform SAS. Date: 24.07.2008

Version:
$Id: UserHandlerImpl.java 46897 2010-04-28 08:41:47Z tolusha $
Author:
Peter Nedonosko

Field Summary
static java.lang.String EXO_CREATED_DATE
          The user property that contain the date of creation.
static java.lang.String EXO_EMAIL
          The user property that contain email.
static java.lang.String EXO_FIRST_NAME
          The user property that contain fist name.
static java.lang.String EXO_LAST_LOGIN_TIME
          The user property that contain last login time.
static java.lang.String EXO_LAST_NAME
          The user property that contain last name.
static java.lang.String EXO_MEMBERSHIP
          The child node to storage membership properties.
static java.lang.String EXO_PASSWORD
          The user property that contain password.
static java.lang.String EXO_PROFILE
          The child node to storage user addition information.
protected  java.util.List<org.exoplatform.services.organization.UserEventListener> listeners
          The list of listeners to broadcast the events.
protected static org.apache.commons.logging.Log log
          Log.
protected  JCROrganizationServiceImpl service
          Organization service implementation covering the handler.
static java.lang.String STORAGE_EXO_USERS
          The node to storage users.
 
Fields inherited from interface org.exoplatform.services.organization.UserHandler
POST_CREATE_USER_EVENT, POST_DELETE_USER_EVENT, POST_UPDATE_USER_EVENT, PRE_CREATE_USER_EVENT, PRE_DELETE_USER_EVENT, PRE_UPDATE_USER_EVENT
 
Method Summary
 void addUserEventListener(org.exoplatform.services.organization.UserEventListener listener)
          
 boolean authenticate(java.lang.String username, java.lang.String password)
          
 void createUser(org.exoplatform.services.organization.User user, boolean broadcast)
          
 org.exoplatform.services.organization.User createUserInstance()
          
 org.exoplatform.services.organization.User createUserInstance(java.lang.String username)
          
 org.exoplatform.services.organization.User findUserByName(java.lang.String userName)
          
 org.exoplatform.commons.utils.PageList findUsers(org.exoplatform.services.organization.Query query)
          
 org.exoplatform.commons.utils.PageList findUsersByGroup(java.lang.String groupId)
          
 java.util.List<org.exoplatform.services.organization.UserEventListener> getUserListeners()
          
 org.exoplatform.commons.utils.PageList getUserPageList(int pageSize)
          
 org.exoplatform.services.organization.User removeUser(java.lang.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)
          
 
Methods inherited from class org.exoplatform.services.jcr.ext.organization.CommonHandler
readDateProperty, readStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXO_CREATED_DATE

public static final java.lang.String EXO_CREATED_DATE
The user property that contain the date of creation.

See Also:
Constant Field Values

EXO_EMAIL

public static final java.lang.String EXO_EMAIL
The user property that contain email.

See Also:
Constant Field Values

EXO_FIRST_NAME

public static final java.lang.String EXO_FIRST_NAME
The user property that contain fist name.

See Also:
Constant Field Values

EXO_LAST_LOGIN_TIME

public static final java.lang.String EXO_LAST_LOGIN_TIME
The user property that contain last login time.

See Also:
Constant Field Values

EXO_LAST_NAME

public static final java.lang.String EXO_LAST_NAME
The user property that contain last name.

See Also:
Constant Field Values

EXO_MEMBERSHIP

public static final java.lang.String EXO_MEMBERSHIP
The child node to storage membership properties.

See Also:
Constant Field Values

EXO_PASSWORD

public static final java.lang.String EXO_PASSWORD
The user property that contain password.

See Also:
Constant Field Values

EXO_PROFILE

public static final java.lang.String EXO_PROFILE
The child node to storage user addition information.

See Also:
Constant Field Values

STORAGE_EXO_USERS

public static final java.lang.String STORAGE_EXO_USERS
The node to storage users.

See Also:
Constant Field Values

listeners

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


service

protected final JCROrganizationServiceImpl service
Organization service implementation covering the handler.


log

protected static org.apache.commons.logging.Log log
Log.

Method Detail

addUserEventListener

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

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

authenticate

public boolean authenticate(java.lang.String username,
                            java.lang.String password)
                     throws java.lang.Exception

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

createUser

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

Specified by:
createUser in interface org.exoplatform.services.organization.UserHandler
Throws:
java.lang.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(java.lang.String username)

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

findUserByName

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

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

findUsers

public org.exoplatform.commons.utils.PageList findUsers(org.exoplatform.services.organization.Query query)
                                                 throws java.lang.Exception

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

findUsersByGroup

public org.exoplatform.commons.utils.PageList findUsersByGroup(java.lang.String groupId)
                                                        throws java.lang.Exception

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

getUserPageList

public org.exoplatform.commons.utils.PageList getUserPageList(int pageSize)
                                                       throws java.lang.Exception

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

removeUser

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

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

removeUserEventListener

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

Parameters:
listener - The registered listener for remove

saveUser

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

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

getUserListeners

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

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


Copyright © 2011 eXo Platform SAS. All Rights Reserved.