gran.app.adapter.kernel.user
Class BaseUserAdapter

java.lang.Object
  |
  +--gran.app.adapter.kernel.user.BaseUserAdapter
All Implemented Interfaces:
Adapter, KernelAdapter, UserAdapter

public class BaseUserAdapter
extends java.lang.Object
implements UserAdapter


Constructor Summary
BaseUserAdapter()
           
 
Method Summary
 gran.model.User authenticateImpl(java.lang.String login, java.lang.String password, gran.model.User result)
           
 void changePasswordImpl(java.lang.String id, java.lang.String password1, java.lang.String password2)
          Change password
 int countUDFImpl(java.lang.String id, int result)
           
 gran.model.User createUserImpl(java.lang.String parent, java.lang.String login, java.lang.String name, java.lang.String prstatus, gran.model.User result)
          Create new user
 void deleteUsersImpl(java.lang.String[] ids)
          Delete users
 java.util.HashMap getActionsHashImpl(java.lang.String user_id, java.util.HashMap result)
           
 java.util.Collection getChildrenImpl(java.lang.String id, java.util.Collection result)
           
 java.lang.String getDescription()
          Get description of adapter as plain text
 java.util.Collection getPossibleManagerImpl(java.lang.String userId, java.lang.String loggedUserId, java.util.Collection result)
           
 java.util.Collection getUserAndChildrenCollectionImpl(java.lang.String userId, java.util.Collection result)
           
 java.util.ArrayList getUserChainImpl(java.lang.String startid, java.lang.String stopid, java.util.ArrayList result)
           
 java.util.ArrayList getUserIdChainImpl(java.lang.String startid, java.lang.String stopid, java.util.ArrayList result)
           
 gran.app.slider.UserSlider getUserListImpl(java.lang.String managerId, int page, gran.app.slider.UserSlider result)
           
 boolean hasChildrenImpl(java.lang.String userid, boolean result)
           
 boolean init()
          Initialize adapter.
 boolean isParentOfImpl(java.lang.String parentid, java.lang.String childid, boolean result)
           
 void updateUserImpl(java.lang.String id, java.lang.String login, java.lang.String name, java.lang.String tel, java.lang.String email, java.lang.String smsmail, java.lang.String prstatus, java.lang.String manager, java.lang.String timezone, java.lang.String locale)
          Update user information
 boolean viewAllowedImpl(java.lang.String userId, java.lang.String loggedUserId, boolean result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseUserAdapter

public BaseUserAdapter()
Method Detail

init

public boolean init()
Description copied from interface: Adapter
Initialize adapter. TrackStudio calls this method during startup.

Specified by:
init in interface Adapter
Returns:
true when adapter initialized, false otherwise.

getDescription

public java.lang.String getDescription()
Description copied from interface: Adapter
Get description of adapter as plain text

Specified by:
getDescription in interface Adapter

createUserImpl

public gran.model.User createUserImpl(java.lang.String parent,
                                      java.lang.String login,
                                      java.lang.String name,
                                      java.lang.String prstatus,
                                      gran.model.User result)
                               throws gran.exception.CantCreateUserException,
                                      gran.exception.UsersLimitExceedException,
                                      gran.exception.GranException
Description copied from interface: UserAdapter
Create new user

Specified by:
createUserImpl in interface UserAdapter
Parameters:
parent - - id parent user-à.
login - - login
name - - name
prstatus - - user group
gran.exception.CantCreateUserException
gran.exception.UsersLimitExceedException
gran.exception.GranException

deleteUsersImpl

public void deleteUsersImpl(java.lang.String[] ids)
                     throws gran.exception.GranException
Description copied from interface: UserAdapter
Delete users

Specified by:
deleteUsersImpl in interface UserAdapter
gran.exception.GranException

changePasswordImpl

public void changePasswordImpl(java.lang.String id,
                               java.lang.String password1,
                               java.lang.String password2)
                        throws gran.exception.BadPasswordException,
                               gran.exception.GranException
Description copied from interface: UserAdapter
Change password

Specified by:
changePasswordImpl in interface UserAdapter
Parameters:
id - - user id
password1 - - new password
password2 - - password confirmation
gran.exception.BadPasswordException
gran.exception.GranException

updateUserImpl

public void updateUserImpl(java.lang.String id,
                           java.lang.String login,
                           java.lang.String name,
                           java.lang.String tel,
                           java.lang.String email,
                           java.lang.String smsmail,
                           java.lang.String prstatus,
                           java.lang.String manager,
                           java.lang.String timezone,
                           java.lang.String locale)
                    throws gran.exception.GranException
Description copied from interface: UserAdapter
Update user information

Specified by:
updateUserImpl in interface UserAdapter
gran.exception.GranException

getPossibleManagerImpl

public java.util.Collection getPossibleManagerImpl(java.lang.String userId,
                                                   java.lang.String loggedUserId,
                                                   java.util.Collection result)
                                            throws gran.exception.GranException
Specified by:
getPossibleManagerImpl in interface UserAdapter
gran.exception.GranException

authenticateImpl

public gran.model.User authenticateImpl(java.lang.String login,
                                        java.lang.String password,
                                        gran.model.User result)
                                 throws gran.exception.GranException,
                                        gran.exception.AuthException
Specified by:
authenticateImpl in interface UserAdapter
gran.exception.GranException
gran.exception.AuthException

viewAllowedImpl

public boolean viewAllowedImpl(java.lang.String userId,
                               java.lang.String loggedUserId,
                               boolean result)
                        throws gran.exception.GranException
Specified by:
viewAllowedImpl in interface UserAdapter
gran.exception.GranException

getActionsHashImpl

public java.util.HashMap getActionsHashImpl(java.lang.String user_id,
                                            java.util.HashMap result)
                                     throws gran.exception.GranException
Specified by:
getActionsHashImpl in interface UserAdapter
gran.exception.GranException

getUserListImpl

public gran.app.slider.UserSlider getUserListImpl(java.lang.String managerId,
                                                  int page,
                                                  gran.app.slider.UserSlider result)
                                           throws gran.exception.GranException
Specified by:
getUserListImpl in interface UserAdapter
gran.exception.GranException

getUserChainImpl

public java.util.ArrayList getUserChainImpl(java.lang.String startid,
                                            java.lang.String stopid,
                                            java.util.ArrayList result)
                                     throws gran.exception.GranException
Specified by:
getUserChainImpl in interface UserAdapter
gran.exception.GranException

getUserIdChainImpl

public java.util.ArrayList getUserIdChainImpl(java.lang.String startid,
                                              java.lang.String stopid,
                                              java.util.ArrayList result)
                                       throws gran.exception.GranException
Specified by:
getUserIdChainImpl in interface UserAdapter
gran.exception.GranException

hasChildrenImpl

public boolean hasChildrenImpl(java.lang.String userid,
                               boolean result)
                        throws gran.exception.GranException
Specified by:
hasChildrenImpl in interface UserAdapter
gran.exception.GranException

getUserAndChildrenCollectionImpl

public java.util.Collection getUserAndChildrenCollectionImpl(java.lang.String userId,
                                                             java.util.Collection result)
                                                      throws gran.exception.GranException
Specified by:
getUserAndChildrenCollectionImpl in interface UserAdapter
gran.exception.GranException

isParentOfImpl

public boolean isParentOfImpl(java.lang.String parentid,
                              java.lang.String childid,
                              boolean result)
                       throws gran.exception.GranException
Specified by:
isParentOfImpl in interface UserAdapter
gran.exception.GranException

countUDFImpl

public int countUDFImpl(java.lang.String id,
                        int result)
                 throws gran.exception.GranException
Specified by:
countUDFImpl in interface UserAdapter
gran.exception.GranException

getChildrenImpl

public java.util.Collection getChildrenImpl(java.lang.String id,
                                            java.util.Collection result)
                                     throws gran.exception.GranException
Specified by:
getChildrenImpl in interface UserAdapter
gran.exception.GranException


Copyright © 2002-2003 TrackStudio, Ltd. All Rights Reserved.