Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.acl
Class ACLUser

    java.lang.Object
      com.knowgate.dataobjs.DBPersist
          com.knowgate.acl.ACLUser

All Implemented Interfaces:
  java.io.Serializable, java.util.Map

    public final class ACLUser

extends DBPersist

Object mapping for k_users table registers

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Field Summary
`static short` | `ClassId`

Fields inherited from class com.knowgate.dataobjs.DBPersist
`AllVals, sAuditCls, sAuditUsr, sTransactId`

Constructor Summary
`ACLUser()` Default constructor.
`ACLUser(JDCConnection oConn, java.lang.String sUserGUID)` Constructs ACLUser and load attributes from k_users table
`ACLUser(java.lang.String sUserGUID)` Constructs ACLUser and set GUID Does not load any fields from database.

Method Summary
`int` | `addToACLGroups(JDCConnection oConn, java.lang.String sGroupList)` Add User to Groups.
`boolean` | `checkChallengeReply(JDCConnection oConn, java.lang.String sReply)` Check whether the given reply matches the challenge question anwser Comparison is case insensitive and ignores white spaces and accents
`static boolean` | `checkSignature(JDCConnection oConn, java.lang.String sUserId, java.lang.String sSign)` Checks if a given signature password matches the one previously assigned
`int` | `clearACLGroups(JDCConnection oConn)` Remove user from all security role groups
`static java.lang.String` | `create(JDCConnection oConn, java.lang.Object[] Values)` Shortcut for creating a new user
`static java.lang.String` | `create(JDCConnection oConn, java.lang.String sGuid, java.lang.Object[] Values)` Shortcut for creating a new user with a given GUID
`boolean` | `delete(JDCConnection oConn)` Delete a register from database The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method.
`static boolean` | `delete(JDCConnection oConn, java.lang.String sUserGUID)` Delete User Categories owned by this user are also deleted, but other data and references for user are not checked.
`DBSubset` | `getAddresses(JDCConnection oConn)` Get Addresses associated with user at k_x_addr_user table.
`static java.lang.String` | `getEmailFromId(JDCConnection oConn, java.lang.String sUserId)` Get User main e-mail from its GUID.
`java.lang.String` | `getFullName()` Get full name
`DBSubset` | `getGroups(JDCConnection oConn)` Get security role groups to witch this user belongs looking a k_x_group_user table.
`static java.lang.String` | `getIdFromEmail(java.sql.Connection oConn, java.lang.String sUserEMail)` Get User Unique Id. from its main e-mail address.
`static java.lang.String` | `getIdFromEmail(JDCConnection oConn, java.lang.String sUserEMail)` Get User Unique Id. from its main e-mail address.
`static java.lang.String` | `getIdFromNick(java.sql.Connection oConn, int iDomainId, java.lang.String sUserNick)` Get User Unique Id. from its nickname.
`static java.lang.String` | `getIdFromNick(java.sql.Connection oConn, java.lang.String sUserNick)` Get User Unique Id. from its nickname.
`static java.lang.String` | `getIdFromNick(JDCConnection oConn, int iDomainId, java.lang.String sUserNick)` Get User Unique Id. from its nickname.
`java.lang.String` | `getMailFolder(JDCConnection oConn, java.lang.String sFolderName)` Get GUID of user mail folder category The Inbox category is where messages downloaded from the mail server are cached by default.
`java.lang.String[]` | `getMailFolderNames(JDCConnection oConn)` Get name of all user mail folders
`java.lang.String[]` | `getMailFolders(JDCConnection oConn)` Get GUID of all user mail folders
`java.lang.String` | `getMailRoot(JDCConnection oConn)` Get GUID of user mail root category The user mail root category is always named DOMAIN_nickname_mail at nm_category field of k_categories.
`int` | `getRolesForApplication(JDCConnection oConn, int iIdApp, java.lang.String sGuWorkArea)` Get roles of this user for a given application and workarea
`boolean` | `isAdminForApplication(JDCConnection oConn, int iIdApp)` Find out if this user has administrator role in his default workarea over given application
`boolean` | `isAdminForApplication(JDCConnection oConn, int iIdApp, java.lang.String sGuWorkArea)` Find out if this user has administrator role over given application and workarea
`boolean` | `isDomainAdmin(JDCConnection oConn)` Find out is this user has administrator.
`boolean` | `isGuestForApplication(JDCConnection oConn, int iIdApp)` Find out if this user has guest role in his default workarea over given application
`boolean` | `isPowerUserForApplication(JDCConnection oConn, int iIdApp)` Find out if this user has power user role in his default workarea over given application
`boolean` | `isPowerUserForApplication(JDCConnection oConn, int iIdApp, java.lang.String sGuWorkArea)` Find out if this user has power user role over given application and workarea
`boolean` | `isUserForApplication(JDCConnection oConn, int iIdApp)` Find out if this user has plain user role in his default workarea over given application
`boolean` | `isUserForApplication(JDCConnection oConn, int iIdApp, java.lang.String sGuWorkArea)` Find out if this user has plain user role over given application and workarea
`int` | `removeFromACLGroup(JDCConnection oConn, java.lang.String sIdGroup)` Remove User from Group.
`static boolean` | `resetPassword(JDCConnection oConn, java.lang.String sUserId, java.lang.String sNewPwd)` Update tx_pwd password column at k_users table for given user Password expiration is not modified
`static boolean` | `resetPassword(JDCConnection oConn, java.lang.String sUserId, java.lang.String sNewPwd, java.util.Date dtExpire)` Update tx_pwd password column at k_users table for given user
`static boolean` | `resetPassword(JDCConnection oConn, java.lang.String sUserId, java.lang.String sNewPwd, java.util.Date dtExpire, DistributedCachePeer oCache)` Update tx_pwd password column at k_users table for given user and remove it from memory cache if it was previously cached.
`static boolean` | `resetPassword(JDCConnection oConn, java.lang.String sUserId, java.lang.String sNewPwd, DistributedCachePeer oCache)` Update tx_pwd password column at k_users table for given user and remove it from memory cache if it was previously cached.
`static boolean` | `resetSignature(JDCConnection oConn, java.lang.String sUserId, java.lang.String sNewSign)` Change signature password and delete any previous entries encrypted with former password
`boolean` | `store(JDCConnection oConn)` Store ACLUser If gu_user is not set then a new GUID is assigned.
`static java.lang.String` | `suggestNickForEmail(JDCConnection oConn, java.lang.String sEmail)` Suggest a unique nick name for a given e-mail If a user with given e-mail already exists at k_users table, then the nick name of that user is returned, else a new nick name unique for that e-mail is suggested

Methods inherited from class com.knowgate.dataobjs.DBPersist
`allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, size, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Field Detail

### ClassId

    public static final short ClassId

See Also:
  Constant Field Values

Constructor Detail

### ACLUser

    public ACLUser()

  Default constructor.

### ACLUser

    public ACLUser(java.lang.String sUserGUID)
            throws java.sql.SQLException

  Constructs ACLUser and set GUID

  Does not load any fields from database.

  Parameters:
    `sUserGUID` - user Unique Identifier (gu_user field at k_users table)
  Throws:
    `java.sql.SQLException`

### ACLUser

    public ACLUser(JDCConnection oConn,
                   java.lang.String sUserGUID)
            throws java.sql.SQLException

  Constructs ACLUser and load attributes from k_users table

  Parameters:
    `oConn` - Database Connection
    `sUserGUID` - user Unique Identifier (gu_user field at k_users table)
  Throws:
    `java.sql.SQLException`

Method Detail

### getFullName

    public java.lang.String getFullName()

  Get full name

  Returns:
    trim(nm_user+tx_surname1+tx_surname2)
  Since:
    4.0

### getAddresses

    public DBSubset getAddresses(JDCConnection oConn)
                          throws java.sql.SQLException

  Get Addresses associated with user at k_x_addr_user table.

  Parameters:
    `oConn` - Database Connection
  Returns:
    A `DBSubset` with a 3 columns containing Address Unique Identifier (gu_address), Address Ordinal Position (ix_address) and Address Location Type (tp_location).
  Throws:
    `java.sql.SQLException`
  See Also:
    `Address}`

### getGroups

    public DBSubset getGroups(JDCConnection oConn)
                       throws java.sql.SQLException

  Get security role groups to witch this user belongs looking a k_x_group_user table.

  Parameters:
    `oConn` - Database Connection
  Returns:
    A `DBSubset` with a 1 column containing each group unique identifier (gu_acl_group).
  Throws:
    `java.sql.SQLException`

### addToACLGroups

    public int addToACLGroups(JDCConnection oConn,
                              java.lang.String sGroupList)
                       throws java.sql.SQLException

  Add User to Groups.

  Insert new registers at k_x_group_user table.

  Parameters:
    `oConn` - Database Connection
    `sGroupList` - A string of comma delimited ACLGroup GUIDs to with this ACLUser must be added.
  Throws:
    `java.sql.SQLException` - May throw a primary key constraint violation if user already belongs to group.

### isDomainAdmin

    public boolean isDomainAdmin(JDCConnection oConn)
                          throws java.sql.SQLException,
                                 java.lang.IllegalStateException

  Find out is this user has administrator.

  A user may have administrator priviledges in two ways:
  1.- It can belong to the group gu_admins from k_domains table.
  2.- Its user identifier may be the one at gu_owner field of k_domains table.

  The domain owner is a special kind of administrator user that cannot be deleted from domain.

  Parameters:
    `oConn` - Database Connection
  Returns:
    true is user has adminsitrator priviledges, false otherwise.
  Throws:
    `java.lang.IllegalStateException` - if id_domain or gu_user is not set
    `java.sql.SQLException`

### store

    public boolean store(JDCConnection oConn)
                  throws java.sql.SQLException

  Store ACLUser

  If gu_user is not set then a new GUID is assigned.
  If dt_last_update is not set then current system date is assigned.
  If len_quota is not set then zero is assigned.
  If max_quota is not set then 100Mb assigned.
  Syntax for tx_main_email and tx_alt_email is verified if these fields are not null

  Overrides:
    `store` in class `DBPersist`
  Parameters:
    `oConn` - Database Connection
  Returns:
    boolean true if register was stored for the first time, false if register already existed.
  Throws:
    `java.sql.SQLException`

### delete

    public boolean delete(JDCConnection oConn)
                   throws java.sql.SQLException

  Description copied from class: `DBPersist`

  Delete a register from database

  The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method.

  Overrides:
    `delete` in class `DBPersist`
  Parameters:
    `oConn` - Database connection
  Returns:
    true if register was successfully erased, false if not.
  Throws:
    `java.sql.SQLException`

### clearACLGroups

    public int clearACLGroups(JDCConnection oConn)
                       throws java.sql.SQLException

  Remove user from all security role groups

  Parameters:
    `oConn` - Database Connection
  Returns:
    Count of groups from witch user was removed.
  Throws:
    `java.sql.SQLException`

### removeFromACLGroup

    public int removeFromACLGroup(JDCConnection oConn,
                                  java.lang.String sIdGroup)
                           throws java.sql.SQLException

  Remove User from Group.

  remove register from k_x_group_user table.

  Parameters:
    `oConn` - Database Connection
    `sIdGroup` - Group Unique Identifier.
  Throws:
    `java.sql.SQLException`

### getMailRoot

    public java.lang.String getMailRoot(JDCConnection oConn)
                                 throws java.sql.SQLException

  Get GUID of user mail root category

  The user mail root category is always named DOMAIN_nickname_mail at nm_category field of k_categories.
  If there is no category named DOMAIN_nickname_mail but the user has his gu_category field set at k_users table then this method tries to create a new mail root category.

  Parameters:
    `oConn` - Database Connection
  Returns:
    a gu_category value from k_categories or null if this user does not have a mail root category and a new one could not be created
  Throws:
    `java.sql.SQLException`

### getMailFolder

    public java.lang.String getMailFolder(JDCConnection oConn,
                                          java.lang.String sFolderName)
                                   throws java.sql.SQLException

  Get GUID of user mail folder category

  The Inbox category is where messages downloaded from the mail server are cached by default. The user mail inbox category is always named DOMAIN_nickname_inbox at nm_category field of k_categories.
  If there is no category named DOMAIN_nickname_inbox but the user has a mail root category then this method tries to create a new mail inbox category under mail root.

  Parameters:
    `oConn` - Database Connection
    `sFolderName` - One of { "inbox", "drafts", "deleted", "sent", "spam" }
  Returns:
    a gu_category value from k_categories or null if this user does not have a mail inbox category and a new one could not be created
  Throws:
    `java.sql.SQLException`
    `java.lang.NullPointerException` - if sFolderName is null or empty string

### getMailFolders

    public java.lang.String[] getMailFolders(JDCConnection oConn)
                                      throws java.sql.SQLException

  Get GUID of all user mail folders

  Returns:
    Array of Category GUIDs
  Throws:
    `java.sql.SQLException`
  Since:
    4.0

### getMailFolderNames

    public java.lang.String[] getMailFolderNames(JDCConnection oConn)
                                          throws java.sql.SQLException

  Get name of all user mail folders

  Returns:
    Array of Category Names
  Throws:
    `java.sql.SQLException`
  Since:
    4.0

### getRolesForApplication

    public int getRolesForApplication(JDCConnection oConn,
                                      int iIdApp,
                                      java.lang.String sGuWorkArea)
                               throws java.sql.SQLException

  Get roles of this user for a given application and workarea

  Parameters:
    `oConn` - JDCConnection
    `iIdApp` - int Id of application (from k_apps table)
    `sGuWorkArea` - String Guid of WorkArea (from k_workareas table)
  Returns:
    int Any bitwise OR combination of { ACL.ROLE_ADMIN || ACL.ROLE_POWERUSER || ACL.ROLE_USER || ACL.ROLE_GUEST }
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### isAdminForApplication

    public boolean isAdminForApplication(JDCConnection oConn,
                                         int iIdApp,
                                         java.lang.String sGuWorkArea)
                                  throws java.sql.SQLException

  Find out if this user has administrator role over given application and workarea

  Parameters:
    `oConn` - JDCConnection
    `iIdApp` - int Id of application (from k_apps table)
    `sGuWorkArea` - String Guid of WorkArea (from k_workareas table)
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### isPowerUserForApplication

    public boolean isPowerUserForApplication(JDCConnection oConn,
                                             int iIdApp,
                                             java.lang.String sGuWorkArea)
                                      throws java.sql.SQLException

  Find out if this user has power user role over given application and workarea

  Parameters:
    `oConn` - JDCConnection
    `iIdApp` - int Id of application (from k_apps table)
    `sGuWorkArea` - String Guid of WorkArea (from k_workareas table)
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### isUserForApplication

    public boolean isUserForApplication(JDCConnection oConn,
                                        int iIdApp,
                                        java.lang.String sGuWorkArea)
                                 throws java.sql.SQLException

  Find out if this user has plain user role over given application and workarea

  Parameters:
    `oConn` - JDCConnection
    `iIdApp` - int Id of application (from k_apps table)
    `sGuWorkArea` - String Guid of WorkArea (from k_workareas table)
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### isAdminForApplication

    public boolean isAdminForApplication(JDCConnection oConn,
                                         int iIdApp)
                                  throws java.sql.SQLException

  Find out if this user has administrator role in his default workarea over given application

  Parameters:
    `oConn` - JDCConnection
    `iIdApp` - int Id of application (from k_apps table)
    `sGuWorkArea` - String Guid of WorkArea (from k_workareas table)
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### isPowerUserForApplication

    public boolean isPowerUserForApplication(JDCConnection oConn,
                                             int iIdApp)
                                      throws java.sql.SQLException

  Find out if this user has power user role in his default workarea over given application

  Parameters:
    `oConn` - JDCConnection
    `iIdApp` - int Id of application (from k_apps table)
    `sGuWorkArea` - String Guid of WorkArea (from k_workareas table)
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### isUserForApplication

    public boolean isUserForApplication(JDCConnection oConn,
                                        int iIdApp)
                                 throws java.sql.SQLException

  Find out if this user has plain user role in his default workarea over given application

  Parameters:
    `oConn` - JDCConnection
    `iIdApp` - int Id of application (from k_apps table)
    `sGuWorkArea` - String Guid of WorkArea (from k_workareas table)
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### isGuestForApplication

    public boolean isGuestForApplication(JDCConnection oConn,
                                         int iIdApp)
                                  throws java.sql.SQLException

  Find out if this user has guest role in his default workarea over given application

  Parameters:
    `oConn` - JDCConnection
    `iIdApp` - int Id of application (from k_apps table)
    `sGuWorkArea` - String Guid of WorkArea (from k_workareas table)
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### checkChallengeReply

    public boolean checkChallengeReply(JDCConnection oConn,
                                       java.lang.String sReply)

  Check whether the given reply matches the challenge question anwser Comparison is case insensitive and ignores white spaces and accents

  Returns:
    true if reply matches stored anwser, false if either sReply is null or there is no previously stored answer

### getIdFromEmail

    public static java.lang.String getIdFromEmail(java.sql.Connection oConn,
                                                  java.lang.String sUserEMail)
                                           throws java.sql.SQLException

  Get User Unique Id. from its main e-mail address.

  This method calls k_get_user_from_email stored procedure.

  Parameters:
    `oConn` - Database Connection
    `sUserEMail` - User main e-mail (tx_main_email from k_users table)
  Returns:
    User Unique Id. or null if no user was found with such e-mail.
  Throws:
    `java.sql.SQLException`

### getIdFromEmail

    public static java.lang.String getIdFromEmail(JDCConnection oConn,
                                                  java.lang.String sUserEMail)
                                           throws java.sql.SQLException

  Get User Unique Id. from its main e-mail address.

  This method calls k_get_user_from_email stored procedure.

  Parameters:
    `oConn` - Database Connection
    `sUserEMail` - User main e-mail (tx_main_email from k_users table)
  Returns:
    User Unique Id. or null if no user was found with such e-mail.
  Throws:
    `java.sql.SQLException`

### getEmailFromId

    public static java.lang.String getEmailFromId(JDCConnection oConn,
                                                  java.lang.String sUserId)
                                           throws java.sql.SQLException

  Get User main e-mail from its GUID.

  Parameters:
    `oConn` - Database Connection
    `sUserId` - User GUID (gu_user from k_users table)
  Returns:
    User tx_main_email or null if no user was found with such GUID.
  Throws:
    `java.sql.SQLException`

### getIdFromNick

    public static java.lang.String getIdFromNick(java.sql.Connection oConn,
                                                 int iDomainId,
                                                 java.lang.String sUserNick)
                                          throws java.sql.SQLException

  Get User Unique Id. from its nickname.

  This method executes a SQL query with a ResultSet

  Parameters:
    `oConn` - Database Connection
    `iDomainId` - Domain Numeric Id. (id_domain from k_users table)
    `sUserNick` - User nickname (tx_nickname from k_users table)
  Returns:
    User Unique Id. or null if no user was found with such e-mail at given domain.
  Throws:
    `java.sql.SQLException`

### getIdFromNick

    public static java.lang.String getIdFromNick(java.sql.Connection oConn,
                                                 java.lang.String sUserNick)
                                          throws java.sql.SQLException

  Get User Unique Id. from its nickname.

  This method executes a SQL query with a ResultSet

  Parameters:
    `oConn` - Database Connection
    `sUserNick` - User nickname (tx_nickname from k_users table)
  Returns:
    User Unique Id. or null if no user was found with such e-mail at any domain.
  Throws:
    `java.sql.SQLException` - If more than one user is found with the same nickname at different domains.
  Since:
    5.0

### getIdFromNick

    public static java.lang.String getIdFromNick(JDCConnection oConn,
                                                 int iDomainId,
                                                 java.lang.String sUserNick)
                                          throws java.sql.SQLException

  Get User Unique Id. from its nickname.

  This method calls k_get_user_from_nick stored procedure.

  Parameters:
    `oConn` - Database Connection
    `iDomainId` - Domain Numeric Unique Identifier
    `sUserNick` - User nickname (tx_nickname from k_users table)
  Returns:
    User Unique Id. or null if no user was found with such e-mail.
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### delete

    public static boolean delete(JDCConnection oConn,
                                 java.lang.String sUserGUID)
                          throws java.sql.SQLException,
                                 java.io.IOException

  Delete User

  Categories owned by this user are also deleted, but other data and references for user are not checked.

  Parameters:
    `oConn` - Database Connection
    `sUserGUID` - User Unique Identifier
  Throws:
    `java.sql.SQLException`
    `java.io.IOException`

### create

    public static java.lang.String create(JDCConnection oConn,
                                          java.lang.String sGuid,
                                          java.lang.Object[] Values)
                                   throws java.sql.SQLException,
                                          java.lang.ClassCastException,
                                          java.lang.NullPointerException

  Shortcut for creating a new user with a given GUID

  Parameters:
    `oConn` - Database Connection
    `sGuid` - GUID of new user
    `Values` - User fields, all required, must be in this order { (Integer)id_domain, (String)tx_nickname, (String)tx_pwd, (Short)bo_active, (Short)bo_searchable, (Short)bo_change_pwd, (String)tx_main_email, (String)tx_alt_email, (String)nm_user, (String)tx_surname1, (String)tx_surname2, (String)tx_challenge, (String)tx_reply, (String)nm_company, (String)de_title, (String)gu_workarea, (String)tx_comments, (Date)dt_pwd_expires }
    Values up to and including tx_surname1 must be NOT NULL, values from tx_surname2 are required but may be null.
  Returns:
    New User Unique Identifier
  Throws:
    `java.sql.SQLException` - If another user with the same GUID already exists
    `java.lang.ClassCastException`
    `java.lang.NullPointerException`
  Since:
    6.0

### create

    public static java.lang.String create(JDCConnection oConn,
                                          java.lang.Object[] Values)
                                   throws java.sql.SQLException,
                                          java.lang.ClassCastException,
                                          java.lang.NullPointerException

  Shortcut for creating a new user

  Parameters:
    `oConn` - Database Connection
    `Values` - User fields, all required, must be in this order { (Integer)id_domain, (String)tx_nickname, (String)tx_pwd, (Short)bo_active, (Short)bo_searchable, (Short)bo_change_pwd, (String)tx_main_email, (String)tx_alt_email, (String)nm_user, (String)tx_surname1, (String)tx_surname2, (String)tx_challenge, (String)tx_reply, (String)nm_company, (String)de_title, (String)gu_workarea, (String)tx_comments, (Date)dt_pwd_expires }
    Values up to and including tx_surname1 must be NOT NULL, values from tx_surname2 are required but may be null.
  Returns:
    New User Unique Identifier
  Throws:
    `java.sql.SQLException`
    `java.lang.ClassCastException`
    `java.lang.NullPointerException`

### resetPassword

    public static boolean resetPassword(JDCConnection oConn,
                                        java.lang.String sUserId,
                                        java.lang.String sNewPwd,
                                        java.util.Date dtExpire)
                                 throws java.sql.SQLException,
                                        java.lang.NullPointerException

  Update tx_pwd password column at k_users table for given user

  Parameters:
    `oConn` - JDCConnection
    `sUserId` - String User GUID
    `sNewPwd` - String New password (up to 50 characters)
    `dtExpire` - Date of expiration of new password or null if password never expires
  Returns:
    true if password was actually reset or false if no user with given GUID was found
  Throws:
    `SQLxception`
    `java.lang.NullPointerException`
    `java.sql.SQLException`
  Since:
    4.0

### resetPassword

    public static boolean resetPassword(JDCConnection oConn,
                                        java.lang.String sUserId,
                                        java.lang.String sNewPwd)
                                 throws java.sql.SQLException,
                                        java.lang.NullPointerException

  Update tx_pwd password column at k_users table for given user Password expiration is not modified

  Parameters:
    `oConn` - JDCConnection
    `sUserId` - String User GUID
    `sNewPwd` - String New password (up to 50 characters)
  Returns:
    true if password was actually reset or false if no user with given GUID was found
  Throws:
    `SQLxception`
    `java.lang.NullPointerException`
    `java.sql.SQLException`
  Since:
    4.0

### resetPassword

    public static boolean resetPassword(JDCConnection oConn,
                                        java.lang.String sUserId,
                                        java.lang.String sNewPwd,
                                        DistributedCachePeer oCache)
                                 throws java.sql.SQLException,
                                        java.lang.NullPointerException,
                                        java.rmi.RemoteException

  Update tx_pwd password column at k_users table for given user and remove it from memory cache if it was previously cached. Password expiration is not modified

  Parameters:
    `oConn` - JDCConnection
    `sUserId` - String User GUID
    `sNewPwd` - String New password (up to 50 characters)
    `oCache` - DistributedCachePeer
  Returns:
    true if password was actually reset or false if no user with given GUID was found
  Throws:
    `SQLxception`
    `java.lang.NullPointerException`
    `java.sql.SQLException`
    `java.rmi.RemoteException`
  Since:
    4.0

### resetPassword

    public static boolean resetPassword(JDCConnection oConn,
                                        java.lang.String sUserId,
                                        java.lang.String sNewPwd,
                                        java.util.Date dtExpire,
                                        DistributedCachePeer oCache)
                                 throws java.sql.SQLException,
                                        java.lang.NullPointerException,
                                        java.rmi.RemoteException

  Update tx_pwd password column at k_users table for given user and remove it from memory cache if it was previously cached.

  Parameters:
    `oConn` - JDCConnection
    `sUserId` - String User GUID
    `sNewPwd` - String New password (up to 50 characters)
    `dtExpire` - Date of expiration of new password or null if password never expires
    `oCache` - DistributedCachePeer
  Returns:
    true if password was actually reset or false if no user with given GUID was found
  Throws:
    `SQLxception`
    `java.lang.NullPointerException`
    `java.sql.SQLException`
    `java.rmi.RemoteException`
  Since:
    4.0

### checkSignature

    public static boolean checkSignature(JDCConnection oConn,
                                         java.lang.String sUserId,
                                         java.lang.String sSign)
                                  throws java.sql.SQLException,
                                         java.lang.NullPointerException

  Checks if a given signature password matches the one previously assigned

  Parameters:
    `JDCConnection` -
    `sUserId` - User GUID
    `sSign` - Signature Password to be checked
  Throws:
    `java.sql.SQLException` - if no user with given GUID exists at the database
    `java.lang.NullPointerException` - is sSign is null
  Since:
    5.0

### resetSignature

    public static boolean resetSignature(JDCConnection oConn,
                                         java.lang.String sUserId,
                                         java.lang.String sNewSign)
                                  throws java.sql.SQLException

  Change signature password and delete any previous entries encrypted with former password

  Parameters:
    `JDCConnection` -
    `sUserId` - User GUID
    `sNewSign` - New Signature Password
  Throws:
    `java.sql.SQLException` - if no user with given GUID exists at the database
    `java.lang.NullPointerException` - is sSign is null

### suggestNickForEmail

    public static java.lang.String suggestNickForEmail(JDCConnection oConn,
                                                       java.lang.String sEmail)
                                                throws java.sql.SQLException,
                                                       java.lang.NullPointerException

  Suggest a unique nick name for a given e-mail

  If a user with given e-mail already exists at k_users table, then the nick name of that user is returned, else a new nick name unique for that e-mail is suggested

  Parameters:
    `JDCConnection` -
    `sEmail` -
  Throws:
    `java.sql.SQLException` - if no user with given GUID exists at the database
    `java.lang.NullPointerException` - is sEmail is null
  Since:
    5.5

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD