de.uplanet.lucy.server.usermanager.usecases
Interface IDsucUser

All Superinterfaces:
IDsucObject

public interface IDsucUser
extends IDsucObject

Version:
$Revision: 86706 $

Method Summary
 IDsUserRecord anonymousFromDb(de.uplanet.jdbc.JdbcConnection p_conn)
          Reads an anonymous user from the db.
 void changePassword(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId, byte[] p_byteChangeInfo)
          Change a user's password.
 void changePassword(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId, java.lang.String p_strPassword)
          Change a users password.
 boolean exists(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId)
          Test if a user with the given id exits.
 boolean exists(de.uplanet.jdbc.JdbcConnection p_conn, java.util.Set<java.lang.Integer> p_iUserId)
          Test if a user with the given ids exits.
 boolean exists(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strLoginName, java.lang.String p_strDomainName)
          Test if a user exits.
 de.uplanet.lucy.server.usermanager.IntrexxServerSecret find(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String[][] p_variants, boolean p_bIgnoreDomain)
           
 IDsUserRecord fromEmailAddress(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strEmailAddress)
          Deprecated. 
 IDsUserRecord fromGuid(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid)
          Reads a user from the db.
 IDsUserRecord fromId(de.uplanet.jdbc.JdbcConnection p_conn, int p_iId)
          Reads a user from the db.
 IDsUserRecord fromLoginName(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strLoginName, java.lang.String p_strLoginDomain)
          Reads a user from the db.
 IDsUserRecord fromNotDeletedLoginName(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strLoginName, java.lang.String p_strLoginDomain)
          Reads a user from the db.
 java.lang.String getAnonymousUserGuid()
          Determine the anoymous user's unique identifier.
 int getAnonymousUserId(de.uplanet.jdbc.JdbcConnection p_conn)
          Determine the anoymous user's integer id.
 java.lang.String[] getAvailableDomains(de.uplanet.jdbc.JdbcConnection p_conn)
          Returns the list of all available login domains.
 java.util.List<java.lang.String> getAvailableDomainsAsList(de.uplanet.jdbc.JdbcConnection p_conn)
          Returns the list of all available login domains.
 java.util.Set<java.lang.Integer> getBossUserIdsForUserIds(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId)
          returns a a set of bosses for the given user
 IDsUserRecord getDeleted(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strLoginName, java.lang.String p_strDomainName)
          Return an existing deleted user or null, if he's not exisiting
 IDsUserRecord getReplicatedFromLoginName(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strLoginName, java.lang.String p_strLoginDomain, java.lang.String p_strRplGuid)
          Reads a user from the db.
 de.uplanet.lucy.server.usermanager.IntrexxServerSecret getServerSecretFromId(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId)
          Get the IntrexxServerSecret for the given user.
 de.uplanet.lucy.server.usermanager.IntrexxServerSecret getServerSecretFromId(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strUserId)
          Get the IntrexxServerSecret for the given user.
 de.uplanet.lucy.server.usermanager.IntrexxServerSecret getServerSecretFromLoginName(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strLoginName, java.lang.String p_strLoginDomain, boolean p_bIgnoreDomain)
          Get the IntrexxServerSecret for the given user.
 de.uplanet.lucy.server.usermanager.IntrexxServerSecret getServerSecretFromSQLExpression(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strExpression)
          Get the IntrexxServerSecret using a SQL expression.
 IDsUserRecord selectFullUser(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId)
           
 IDsUserRecord selectFullUser(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid)
           
 IDsUserRecord selectOneUser(de.uplanet.jdbc.JdbcConnection p_conn, IDsSelectFilter p_filter)
           
 java.util.List<IDsUserRecord> selectUser(de.uplanet.jdbc.JdbcConnection p_conn, IDsSelectFilter p_filter)
           
 IDsUserRecord selectUser(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId)
           
 IDsUserRecord selectUser(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId, java.lang.String... p_fieldGuids)
          /**
 IDsUserRecord selectUser(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid)
           
 IDsUserRecord selectUser(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid, java.lang.String... p_fieldGuids)
           
 int selectUserCount(de.uplanet.jdbc.JdbcConnection p_conn, IDsSelectFilter p_filter)
           
 boolean verifyPassword(de.uplanet.jdbc.JdbcConnection p_conn, int p_iUserId, java.lang.String p_strPassword)
          Verify a user's password.
 
Methods inherited from interface de.uplanet.lucy.server.usermanager.usecases.IDsucObject
append, delete, fromGuid, fromGuid, getLastSQLStatement, guidToId, idToGuid, move, select, selectCount, selectFullObject, selectObject, selectObject, selectObject, selectObjectCount, update
 

Method Detail

fromId

IDsUserRecord fromId(de.uplanet.jdbc.JdbcConnection p_conn,
                     int p_iId)
                     throws java.sql.SQLException,
                            NotFoundException
Reads a user from the db. The user is identified by userid.

Parameters:
p_conn - The database connection.
p_iId - The user id.
Returns:
The newly created user.
Throws:
NotFoundException - If no corresponding entry was found in the database.
java.sql.SQLException - If a database error occurred.

anonymousFromDb

IDsUserRecord anonymousFromDb(de.uplanet.jdbc.JdbcConnection p_conn)
                              throws java.sql.SQLException,
                                     NotFoundException
Reads an anonymous user from the db.

Parameters:
p_conn - The database connection.
Returns:
The newly created user.
Throws:
NotFoundException - If no corresponding entry was found in the database.
java.sql.SQLException - If a database error occurred.

fromGuid

IDsUserRecord fromGuid(de.uplanet.jdbc.JdbcConnection p_conn,
                       java.lang.String p_strGuid)
                       throws java.sql.SQLException,
                              NotFoundException
Reads a user from the db. The user is identified by it's guid.

Parameters:
p_conn - The database connection.
p_strGuid - The user's unique identifier.
Returns:
The newly created user.
Throws:
NotFoundException - If no corresponding entry was found in the database.
java.sql.SQLException - If a database error occurred.

exists

boolean exists(de.uplanet.jdbc.JdbcConnection p_conn,
               java.util.Set<java.lang.Integer> p_iUserId)
               throws java.sql.SQLException
Test if a user with the given ids exits.

Parameters:
p_conn - The database connection.
p_iUserId - The user Ids to check
Returns:
true, if user exists, false otherwise.
Throws:
java.sql.SQLException

exists

boolean exists(de.uplanet.jdbc.JdbcConnection p_conn,
               int p_iUserId)
               throws java.sql.SQLException
Test if a user with the given id exits.

Parameters:
p_conn - The database connection.
p_iUserId - The user id
Returns:
true, if user exists, false otherwise.
Throws:
java.sql.SQLException

exists

boolean exists(de.uplanet.jdbc.JdbcConnection p_conn,
               java.lang.String p_strLoginName,
               java.lang.String p_strDomainName)
Test if a user exits.

Parameters:
p_conn - The database connection.
p_strLoginName - login name
p_strDomainName - domain name
Returns:
true, if user exists, false otherwise.

getDeleted

IDsUserRecord getDeleted(de.uplanet.jdbc.JdbcConnection p_conn,
                         java.lang.String p_strLoginName,
                         java.lang.String p_strDomainName)
Return an existing deleted user or null, if he's not exisiting

Parameters:
p_conn - The database connection to be used.
p_strLoginName - login name
p_strDomainName - domain name
Returns:
user object or null

fromLoginName

IDsUserRecord fromLoginName(de.uplanet.jdbc.JdbcConnection p_conn,
                            java.lang.String p_strLoginName,
                            java.lang.String p_strLoginDomain)
                            throws java.sql.SQLException,
                                   NotFoundException
Reads a user from the db.

Parameters:
p_conn - The database connection to be used.
p_strLoginName - The loginname
p_strLoginDomain - The domain name
Throws:
NotFoundException - If no corresponding entry was found in the database.
java.sql.SQLException - If a database error occurred.

fromNotDeletedLoginName

IDsUserRecord fromNotDeletedLoginName(de.uplanet.jdbc.JdbcConnection p_conn,
                                      java.lang.String p_strLoginName,
                                      java.lang.String p_strLoginDomain)
                                      throws java.sql.SQLException,
                                             NotFoundException
Reads a user from the db. The user is identified by loginname and domain if the user exists but is marked as deleted null will be returned

Parameters:
p_conn - The database connection to be used.
p_strLoginName - The user's login name.
p_strLoginDomain - The user's domain name.
Returns:
The newly created user. (or null if user not found or is marked as deleted)
Throws:
NotFoundException - If no corresponding entry was found in the database.
java.sql.SQLException - If a database error occurred.

getReplicatedFromLoginName

IDsUserRecord getReplicatedFromLoginName(de.uplanet.jdbc.JdbcConnection p_conn,
                                         java.lang.String p_strLoginName,
                                         java.lang.String p_strLoginDomain,
                                         java.lang.String p_strRplGuid)
                                         throws java.sql.SQLException,
                                                NotFoundException
Reads a user from the db. The user is identified by loginname and domain. Only replicated users are returned.

Parameters:
p_conn - The database connection to be used.
p_strLoginName - The user's login name.
p_strLoginDomain - The user's domain name.
p_strRplGuid - replication job guid
Returns:
The newly created user.
Throws:
NotFoundException - If no corresponding entry was found in the database.
java.sql.SQLException - If a database error occurred.

fromEmailAddress

@Deprecated
IDsUserRecord fromEmailAddress(de.uplanet.jdbc.JdbcConnection p_conn,
                                          java.lang.String p_strEmailAddress)
                               throws NotFoundException
Deprecated. 

(not implemented!) Get a user by it's email address. Always throws a UnsupportedOperationException since this method is not implemented yet.

Parameters:
p_conn - The database connection to be used.
p_strEmailAddress - The user's email adress.
Throws:
NotFoundException - If no corresponding entry was found in the database.

getAnonymousUserGuid

java.lang.String getAnonymousUserGuid()
                                      throws NotFoundException
Determine the anoymous user's unique identifier.

Returns:
The anonymous user's unique identifier, or null if no anonymous user is available.
Throws:
NotFoundException - If no corresponding entry was found in the database.

getAnonymousUserId

int getAnonymousUserId(de.uplanet.jdbc.JdbcConnection p_conn)
                       throws java.sql.SQLException,
                              NotFoundException
Determine the anoymous user's integer id.

Returns:
The anonymous user's unique id, or 0 if no anonymous user is available.
Throws:
NotFoundException - If no corresponding entry was found in the database.
java.sql.SQLException - If a database error occurred.

getBossUserIdsForUserIds

java.util.Set<java.lang.Integer> getBossUserIdsForUserIds(de.uplanet.jdbc.JdbcConnection p_conn,
                                                          int p_iUserId)
                                                          throws java.sql.SQLException
returns a a set of bosses for the given user

Parameters:
p_conn - The database connection
p_iUserId - The user id
Returns:
set of boss ids
Throws:
java.sql.SQLException

selectUserCount

int selectUserCount(de.uplanet.jdbc.JdbcConnection p_conn,
                    IDsSelectFilter p_filter)
                    throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_filter - The filter (could be null)
Returns:
the count of records
Throws:
java.sql.SQLException

selectUser

java.util.List<IDsUserRecord> selectUser(de.uplanet.jdbc.JdbcConnection p_conn,
                                         IDsSelectFilter p_filter)
                                         throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_filter - The filter (could be null)
Returns:
List of user records
Throws:
java.sql.SQLException

selectFullUser

IDsUserRecord selectFullUser(de.uplanet.jdbc.JdbcConnection p_conn,
                             java.lang.String p_strGuid)
                             throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_strGuid - The user record guid
Returns:
The full initialized user record
Throws:
java.sql.SQLException

selectUser

IDsUserRecord selectUser(de.uplanet.jdbc.JdbcConnection p_conn,
                         java.lang.String p_strGuid)
                         throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_strGuid - The user guid
Returns:
The user record (only the id, guid, containerid, typeid and the name attribute will be initialized).
Throws:
java.sql.SQLException

selectUser

IDsUserRecord selectUser(de.uplanet.jdbc.JdbcConnection p_conn,
                         java.lang.String p_strGuid,
                         java.lang.String... p_fieldGuids)
                         throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_strGuid - The user guid
p_fieldGuids - The field guids that should be initialized.
Returns:
The user record or null if not found.
Throws:
java.sql.SQLException

selectFullUser

IDsUserRecord selectFullUser(de.uplanet.jdbc.JdbcConnection p_conn,
                             int p_iUserId)
                             throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_iUserId - THe user id
Returns:
The full initialized user record or null if no user for the id found.
Throws:
java.sql.SQLException

selectUser

IDsUserRecord selectUser(de.uplanet.jdbc.JdbcConnection p_conn,
                         int p_iUserId)
                         throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_iUserId - The user id
Returns:
The user record (only the id, guid, containerid, typeid and the name attribute will be initialized).
Throws:
java.sql.SQLException

selectUser

IDsUserRecord selectUser(de.uplanet.jdbc.JdbcConnection p_conn,
                         int p_iUserId,
                         java.lang.String... p_fieldGuids)
                         throws java.sql.SQLException
/**

Parameters:
p_conn - The database connection
p_iUserId - The user id
p_fieldGuids - The field guids, only that fields will be initialized.
Returns:
The user record or null if not found.
Throws:
java.sql.SQLException

selectOneUser

IDsUserRecord selectOneUser(de.uplanet.jdbc.JdbcConnection p_conn,
                            IDsSelectFilter p_filter)
                            throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_filter - The filter
Returns:
an IDsUserRecord, or null if no record found.
Throws:
java.sql.SQLException

getAvailableDomains

java.lang.String[] getAvailableDomains(de.uplanet.jdbc.JdbcConnection p_conn)
                                       throws java.sql.SQLException
Returns the list of all available login domains. This is the list evaluated from the user and group table.

Parameters:
p_conn - The database connection to be used.
Returns:
available domain array
Throws:
java.sql.SQLException

getAvailableDomainsAsList

java.util.List<java.lang.String> getAvailableDomainsAsList(de.uplanet.jdbc.JdbcConnection p_conn)
                                                           throws java.sql.SQLException
Returns the list of all available login domains. This is the list evaluated from the user and group table.

Parameters:
p_conn - The database connection to be used.
Returns:
a list of available domains
Throws:
java.sql.SQLException

getServerSecretFromId

de.uplanet.lucy.server.usermanager.IntrexxServerSecret getServerSecretFromId(de.uplanet.jdbc.JdbcConnection p_conn,
                                                                             int p_iUserId)
                                                                             throws NotFoundException
Get the IntrexxServerSecret for the given user.

Parameters:
p_conn - The database connection to be used.
p_iUserId - The user's integer identifier.
Returns:
The IntrexxServerSecret.
Throws:
NotFoundException - If no corresponding entry was found in the database.

getServerSecretFromId

de.uplanet.lucy.server.usermanager.IntrexxServerSecret getServerSecretFromId(de.uplanet.jdbc.JdbcConnection p_conn,
                                                                             java.lang.String p_strUserId)
                                                                             throws NotFoundException
Get the IntrexxServerSecret for the given user.

Parameters:
p_conn - The database connection to be used.
p_strUserId - The user's unique identifier.
Returns:
The IntrexxServerSecret.
Throws:
NotFoundException - If no corresponding entry was found in the database.

getServerSecretFromLoginName

de.uplanet.lucy.server.usermanager.IntrexxServerSecret getServerSecretFromLoginName(de.uplanet.jdbc.JdbcConnection p_conn,
                                                                                    java.lang.String p_strLoginName,
                                                                                    java.lang.String p_strLoginDomain,
                                                                                    boolean p_bIgnoreDomain)
                                                                                    throws java.sql.SQLException,
                                                                                           NotFoundException
Get the IntrexxServerSecret for the given user.

Parameters:
p_conn - The database connection to be used.
p_strLoginName - The user's login name.
p_strLoginDomain - The user's login domain.
p_bIgnoreDomain - Flag indicating if the login domain should be ignored or not.
Returns:
The IntrexxServerSecret.
Throws:
NotFoundException - If no corresponding entry was found in the database.
java.sql.SQLException - If a database error occurred.

getServerSecretFromSQLExpression

de.uplanet.lucy.server.usermanager.IntrexxServerSecret getServerSecretFromSQLExpression(de.uplanet.jdbc.JdbcConnection p_conn,
                                                                                        java.lang.String p_strExpression)
                                                                                        throws NotFoundException
Get the IntrexxServerSecret using a SQL expression.

Parameters:
p_conn - The database connection to be used.
p_strExpression - An SQL expression that's being used as an additional filter in the WHERE clause when querying DSUSER.
Returns:
The IntrexxServerSecret.
Throws:
NotFoundException - If no corresponding entry was found in the database.

find

de.uplanet.lucy.server.usermanager.IntrexxServerSecret find(de.uplanet.jdbc.JdbcConnection p_conn,
                                                            java.lang.String[][] p_variants,
                                                            boolean p_bIgnoreDomain)
                                                            throws java.sql.SQLException,
                                                                   NotFoundException
Parameters:
p_conn - The database connection to be used.
p_variants - The login variants as an array of (login name, login domain) pairs.
p_bIgnoreDomain - Flag indicating if the login domain should be ignored or not.
Returns:
An IntrexxServerSecret object.
Throws:
NotFoundException - If no corresponding entry was found in the database.
java.sql.SQLException

verifyPassword

boolean verifyPassword(de.uplanet.jdbc.JdbcConnection p_conn,
                       int p_iUserId,
                       java.lang.String p_strPassword)
Verify a user's password.

Parameters:
p_conn - The database connection to be used.
p_iUserId - The user's integer identifier.
p_strPassword - The user's password.
Returns:
true if the password was correct, or false if the password was incorrect or an error occurred.

changePassword

void changePassword(de.uplanet.jdbc.JdbcConnection p_conn,
                    int p_iUserId,
                    java.lang.String p_strPassword)
                    throws java.sql.SQLException
Change a users password. This version works unencrypted.

Parameters:
p_conn - The database connection to be used.
p_iUserId - The user's integer identifier.
p_strPassword - The password.
Throws:
java.sql.SQLException - If a database error occurred.

changePassword

void changePassword(de.uplanet.jdbc.JdbcConnection p_conn,
                    int p_iUserId,
                    byte[] p_byteChangeInfo)
                    throws java.lang.Exception
Change a user's password.

Parameters:
p_conn - The database connetion to be used.
p_iUserId - The user's integer identifier.
p_byteChangeInfo - The information needed to change the password.
Throws:
java.lang.Exception - If an error occurred.


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.