gran.app.adapter.kernel.user
Class BaseUserAdapter

java.lang.Object
  extended bygran.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
 java.lang.String authenticateImpl(java.lang.String login, java.lang.String password, java.lang.String 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.lang.String findByEmailNameProjectImpl(java.lang.String email, java.lang.String name, java.lang.String taskid, java.lang.String result)
           
 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 getEmailTypesImpl(java.util.Collection res)
           
 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.Slider getUserListImpl(java.lang.String managerId, int page, gran.app.slider.Slider 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, java.lang.String company, java.lang.String emailType, java.lang.String taskId, java.lang.String service, java.lang.String expire)
          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
Throws:
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
Throws:
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
Throws:
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,
                           java.lang.String company,
                           java.lang.String emailType,
                           java.lang.String taskId,
                           java.lang.String service,
                           java.lang.String expire)
                    throws gran.exception.GranException
Description copied from interface: UserAdapter
Update user information

Specified by:
updateUserImpl in interface UserAdapter
Throws:
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
Throws:
gran.exception.GranException

authenticateImpl

public java.lang.String authenticateImpl(java.lang.String login,
                                         java.lang.String password,
                                         java.lang.String result)
                                  throws gran.exception.GranException,
                                         gran.exception.AuthException
Specified by:
authenticateImpl in interface UserAdapter
Throws:
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
Throws:
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
Throws:
gran.exception.GranException

getUserListImpl

public gran.app.slider.Slider getUserListImpl(java.lang.String managerId,
                                              int page,
                                              gran.app.slider.Slider result)
                                       throws gran.exception.GranException
Specified by:
getUserListImpl in interface UserAdapter
Throws:
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
Throws:
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
Throws:
gran.exception.GranException

hasChildrenImpl

public boolean hasChildrenImpl(java.lang.String userid,
                               boolean result)
                        throws gran.exception.GranException
Specified by:
hasChildrenImpl in interface UserAdapter
Throws:
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
Throws:
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
Throws:
gran.exception.GranException

countUDFImpl

public int countUDFImpl(java.lang.String id,
                        int result)
                 throws gran.exception.GranException
Specified by:
countUDFImpl in interface UserAdapter
Throws:
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
Throws:
gran.exception.GranException

getEmailTypesImpl

public java.util.Collection getEmailTypesImpl(java.util.Collection res)
                                       throws gran.exception.GranException
Specified by:
getEmailTypesImpl in interface UserAdapter
Throws:
gran.exception.GranException

findByEmailNameProjectImpl

public java.lang.String findByEmailNameProjectImpl(java.lang.String email,
                                                   java.lang.String name,
                                                   java.lang.String taskid,
                                                   java.lang.String result)
                                            throws gran.exception.GranException
Specified by:
findByEmailNameProjectImpl in interface UserAdapter
Throws:
gran.exception.GranException


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