Interface IDsucUser

    • Method Detail

      • fromId

        IDsUserRecord fromId​(de.uplanet.jdbc.JdbcConnection p_conn,
                             int p_iId)
                      throws SQLException,
                             de.uplanet.lucy.usermanager.NotFoundException
        Reads a user from the database. The user is identified by userid.
        Parameters:
        p_conn - The database connection.
        p_iId - The user id.
        Returns:
        The newly created user.
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • fromId

        IDsUserRecord fromId​(de.uplanet.jdbc.JdbcConnection p_conn,
                             int p_iId,
                             boolean p_bWithDisabledObject)
                      throws SQLException,
                             de.uplanet.lucy.usermanager.NotFoundException
        Reads a user from the database. The user is identified by userid.
        Parameters:
        p_conn - The database connection.
        p_iId - The user id.
        Returns:
        The newly created user.
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • anonymousFromDb

        IDsUserRecord anonymousFromDb​(de.uplanet.jdbc.JdbcConnection p_conn)
                               throws SQLException,
                                      de.uplanet.lucy.usermanager.NotFoundException
        Reads an anonymous user from the database.
        Parameters:
        p_conn - The database connection.
        Returns:
        The newly created user.
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • fromGuid

        IDsUserRecord fromGuid​(de.uplanet.jdbc.JdbcConnection p_conn,
                               String p_strGuid)
                        throws SQLException,
                               de.uplanet.lucy.usermanager.NotFoundException
        Reads a user from the database. 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:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • fromGuid

        IDsUserRecord fromGuid​(de.uplanet.jdbc.JdbcConnection p_conn,
                               String p_strGuid,
                               boolean p_bWithDisabledObject)
                        throws SQLException,
                               de.uplanet.lucy.usermanager.NotFoundException
        Reads a user from the database. 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:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • exists

        boolean exists​(de.uplanet.jdbc.JdbcConnection p_conn,
                       Set<Integer> p_iUserId)
                throws SQLException
        Test if a user with the given ids exists.
        Parameters:
        p_conn - The database connection.
        p_iUserId - The user Ids to check
        Returns:
        true, if user exists, false otherwise.
        Throws:
        SQLException
      • exists

        boolean exists​(de.uplanet.jdbc.JdbcConnection p_conn,
                       int p_iUserId)
                throws SQLException
        Test if a user with the given id exists.
        Parameters:
        p_conn - The database connection.
        p_iUserId - The user id
        Returns:
        true, if user exists, false otherwise.
        Throws:
        SQLException
      • exists

        boolean exists​(de.uplanet.jdbc.JdbcConnection p_conn,
                       String p_strGuid,
                       boolean p_bIncludeDeleted)
                throws SQLException
        Test if a user with the given GUID exists.

        Note: This method is for internal use only.

        Parameters:
        p_conn - The database connection.
        p_strGuid - The user's unique identifier.
        p_bIncludeDeleted - Specifies if deleted users should be taken into account or not.
        Returns:
        true, if user exists, or false otherwise.
        Throws:
        SQLException
      • exists

        boolean exists​(de.uplanet.jdbc.JdbcConnection p_conn,
                       String p_strLoginName,
                       String p_strDomainName)
                throws SQLException
        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.
        Throws:
        SQLException
      • getDeleted

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

        Note: This method is for internal use only.

        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,
                                    String p_strLoginName,
                                    String p_strLoginDomain)
                             throws SQLException,
                                    de.uplanet.lucy.usermanager.NotFoundException
        Reads a user from the database.
        Parameters:
        p_conn - The database connection to be used.
        p_strLoginName - The loginname
        p_strLoginDomain - The domain name
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • fromLoginName

        IDsUserRecord fromLoginName​(de.uplanet.jdbc.JdbcConnection p_conn,
                                    String p_strLoginName,
                                    String p_strLoginDomain,
                                    boolean p_bWithDisabledObject)
                             throws SQLException,
                                    de.uplanet.lucy.usermanager.NotFoundException
        Reads a user from the database.
        Parameters:
        p_conn - The database connection to be used.
        p_strLoginName - The loginname
        p_strLoginDomain - The domain name
        p_bWithDisabledObject - false if deactivated users should be ignored, or true otherwise.
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • fromNotDeletedLoginName

        IDsUserRecord fromNotDeletedLoginName​(de.uplanet.jdbc.JdbcConnection p_conn,
                                              String p_strLoginName,
                                              String p_strLoginDomain)
                                       throws SQLException,
                                              de.uplanet.lucy.usermanager.NotFoundException
        Reads a user from the database. 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:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • getReplicatedFromLoginName

        IDsUserRecord getReplicatedFromLoginName​(de.uplanet.jdbc.JdbcConnection p_conn,
                                                 String p_strLoginName,
                                                 String p_strLoginDomain,
                                                 String p_strRplGuid)
                                          throws SQLException,
                                                 de.uplanet.lucy.usermanager.NotFoundException
        Reads a user from the database. 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:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • fromEmailAddress

        @Deprecated
        IDsUserRecord fromEmailAddress​(de.uplanet.jdbc.JdbcConnection p_conn,
                                       String p_strEmailAddress)
                                throws de.uplanet.lucy.usermanager.NotFoundException
        Deprecated.
        (not implemented!) Get a user by it's e-mail 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 e-mail address.
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
      • getAnonymousUserGuid

        String getAnonymousUserGuid()
                             throws de.uplanet.lucy.usermanager.NotFoundException
        Determine the anoymous user's unique identifier.
        Returns:
        The anonymous user's unique identifier, or null if no anonymous user is available.
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
      • getAnonymousUserId

        int getAnonymousUserId​(de.uplanet.jdbc.JdbcConnection p_conn)
                        throws SQLException,
                               de.uplanet.lucy.usermanager.NotFoundException
        Determine the anoymous user's integer id.
        Returns:
        The anonymous user's unique id, or 0 if no anonymous user is available.
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException - If a database error occurred.
      • getBossUserIdsForUserIds

        Set<Integer> getBossUserIdsForUserIds​(de.uplanet.jdbc.JdbcConnection p_conn,
                                              int p_iUserId)
                                       throws 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:
        SQLException
      • selectUserCount

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

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

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

        IDsUserRecord selectFullUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                     String p_strGuid)
                              throws SQLException
        Parameters:
        p_conn - The database connection
        p_strGuid - The user record GUID
        Returns:
        The full initialized user record
        Throws:
        SQLException
      • selectFullUser

        IDsUserRecord selectFullUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                     String p_strGuid,
                                     boolean p_bWithDisabledObject)
                              throws SQLException
        Parameters:
        p_conn - The database connection
        p_strGuid - The user record GUID
        Returns:
        The full initialized user record
        Throws:
        SQLException
      • selectUser

        IDsUserRecord selectUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                 String p_strGuid)
                          throws 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:
        SQLException
      • selectUser

        IDsUserRecord selectUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                 String p_strGuid,
                                 boolean p_bWithDisabledObject)
                          throws 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:
        SQLException
      • selectUser

        IDsUserRecord selectUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                 String p_strGuid,
                                 String... p_fieldGuids)
                          throws 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:
        SQLException
      • selectUser

        IDsUserRecord selectUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                 String p_strGuid,
                                 boolean p_bWithDisabledObject,
                                 String... p_fieldGuids)
                          throws 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:
        SQLException
      • selectFullUser

        IDsUserRecord selectFullUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                     int p_iUserId)
                              throws 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:
        SQLException
      • selectFullUser

        IDsUserRecord selectFullUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                     int p_iUserId,
                                     boolean p_bWithDisabledObject)
                              throws 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:
        SQLException
      • selectUser

        IDsUserRecord selectUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                 int p_iUserId)
                          throws 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:
        SQLException
      • selectUser

        IDsUserRecord selectUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                 int p_iUserId,
                                 boolean p_bWithDisabledObject)
                          throws 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:
        SQLException
      • selectUser

        IDsUserRecord selectUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                 int p_iUserId,
                                 String... p_fieldGuids)
                          throws 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:
        SQLException
      • selectUser

        IDsUserRecord selectUser​(de.uplanet.jdbc.JdbcConnection p_conn,
                                 int p_iUserId,
                                 boolean p_bWithDisabledObject,
                                 String... p_fieldGuids)
                          throws 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:
        SQLException
      • getAvailableDomainsAsList

        List<String> getAvailableDomainsAsList​(de.uplanet.jdbc.JdbcConnection p_conn)
                                        throws 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 (possibly empty) list of available domains, never null.
        Throws:
        SQLException
      • getServerSecretFromId

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

        Note: this method ignores the user's locked-status.

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

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

        Note: this method ignores the user's locked-status.

        Parameters:
        p_conn - The database connection to be used.
        p_strUserGuid - The user's unique identifier.
        Returns:
        The IntrexxServerSecret.
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
      • getServerSecretFromLoginName

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

        Note: this method ignores the user's locked-status.

        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:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException
      • getServerSecretFromSQLExpression

        @Deprecated
        de.uplanet.lucy.server.usermanager.IntrexxServerSecret getServerSecretFromSQLExpression​(de.uplanet.jdbc.JdbcConnection p_conn,
                                                                                                String p_strExpression)
                                                                                         throws de.uplanet.lucy.usermanager.NotFoundException
        Deprecated.
        Since this method is prone to SQL injection if the caller does not restrict the passed expressions to safe values.
        Get the IntrexxServerSecret using a SQL expression.

        Note: The caller is responsible for preventing SQL injection.

        Note: This method ignores the user's locked-status.

        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 OMUSER.
        Returns:
        The IntrexxServerSecret.
        Throws:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
      • find

        de.uplanet.lucy.server.usermanager.IntrexxServerSecret find​(de.uplanet.jdbc.JdbcConnection p_conn,
                                                                    String[][] p_variants,
                                                                    boolean p_bIgnoreDomain)
                                                             throws SQLException,
                                                                    de.uplanet.lucy.usermanager.NotFoundException
        Get the IntrexxServerSecret for the given login variants.

        Note: this method ignores the user's locked-status.

        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:
        de.uplanet.lucy.usermanager.NotFoundException - If no corresponding entry was found in the database.
        SQLException
      • verifyPassword

        @Deprecated
        boolean verifyPassword​(de.uplanet.jdbc.JdbcConnection p_conn,
                               int p_iUserId,
                               String p_strPassword)
        Deprecated.
        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,
                            String p_strUserGuid,
                            String p_strEncPassword,
                            Boolean p_boolMustChangePassword)
                     throws Exception
        Change a user's password data.
        Parameters:
        p_conn - The database connection to be used.
        p_strUserGuid - The user's unique identifier.
        p_strEncPassword - The password (in encrypted form) to be stored in the database.
        p_boolMustChangePassword - true if the user must change her or his password, or false otherwise. If null the current value is not affected.
        Throws:
        Exception - If an error occurred.
      • changePassword

        @Deprecated
        default void changePassword​(de.uplanet.jdbc.JdbcConnection p_conn,
                                    String p_strUserGuid,
                                    String p_strEncPassword,
                                    String p_strSalt,
                                    Boolean p_boolMustChangePassword)
                             throws Exception
        This method is provided for backwards compatibility reasons. It ignores the given salt value.
        Parameters:
        p_conn - The database connection to be used.
        p_strUserGuid - The user's unique identifier.
        p_strEncPassword - The password (in encrypted form) to be stored in the database.
        p_strSalt - Ignored.
        p_boolMustChangePassword - true if the user must change her or his password, or false otherwise. If null the current value is not affected.
        Throws:
        Exception - If an error occurred.
      • changePassword

        @Deprecated
        void changePassword​(de.uplanet.jdbc.JdbcConnection p_conn,
                            int p_iUserId,
                            String p_strPassword)
                     throws SQLException
        Deprecated.
        Change a user's 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:
        SQLException - If a database error occurred.
      • changePassword

        @Deprecated
        void changePassword​(de.uplanet.jdbc.JdbcConnection p_conn,
                            int p_iUserId,
                            String p_strPassword,
                            boolean p_bResetMustChangeFlag)
                     throws SQLException
        Deprecated.
        Change a user's 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.
        p_bResetMustChangeFlag - Reset the must change flag
        Throws:
        SQLException - If a database error occurred.
      • validatePassword

        @Deprecated
        String[] validatePassword​(de.uplanet.jdbc.JdbcConnection p_conn,
                                  int p_iUserId,
                                  String p_strPassword,
                                  String p_strMsgLang)
                           throws SQLException
        Deprecated.
        Validate a user's 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.
        p_strMsgLang - language of returned message text, if any
        Returns:
        String array of validation messages, or null, if everything was ok.
        Throws:
        SQLException - If a database error occurred.
      • validatePassword

        @Deprecated
        String[] validatePassword​(de.uplanet.jdbc.JdbcConnection p_conn,
                                  String p_strLoginName,
                                  String p_strPassword,
                                  String p_strMsgLang)
                           throws SQLException
        Deprecated.
        Validate a user's password. This version works unencrypted.
        Parameters:
        p_conn - The database connection to be used.
        p_strLoginName - user name, login name, if none is provided, user name is read from the user record
        p_strPassword - The password.
        p_strMsgLang - language of returned message text, if any
        Returns:
        String array of validation messages, or null, if everything was ok.
        Throws:
        SQLException - If a database error occurred.