Class DatabaseExpertUserSource

    • Method Detail

      • newLogger

        protected LoggerEx newLogger()
      • set

        protected void set​(User user,
                           Property<java.lang.String> prop,
                           Dataset dataset,
                           java.lang.String colName)
        Tries to extract information out of the dataset at row zero. If the column doesn't exist, fails silently
      • authenticate

        public AuthenticatedUser authenticate​(AuthChallenge challenge)
                                       throws java.lang.Exception
        Description copied from interface: UserSourceProfile
        Called to both verify authentication for a given username/password pair, and to find the security roles for that user.
        Returns:
        An AuthenticatedUser that contains the user's roles if authentication succeeded, or null if it did not.
        Throws:
        java.lang.Exception
      • findRoles

        @Nonnull
        protected java.util.List<java.lang.String> findRoles​(java.sql.Connection con,
                                                             java.lang.String uname)
                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • findContactInfo

        @Nonnull
        protected java.util.List<ContactInfo> findContactInfo​(SRConnection con,
                                                              java.lang.String uname)
                                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • findScheduleAdjustment

        protected java.util.List<ScheduleAdjustment> findScheduleAdjustment​(SRConnection con,
                                                                            java.lang.String uname)
                                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • findExtraProps

        protected PropertySet findExtraProps​(SRConnection con,
                                             java.lang.String uname)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getUsers

        @NotNull
        public @NotNull java.util.Collection<User> getUsers()
                                                     throws java.lang.Exception
        Description copied from interface: UserSourceProfile
        Retrieve all users from this profile. This can execute slowly (block) if need be. It will be called periodically by the manager and the results will be cached.
        Throws:
        java.lang.Exception
      • getRoles

        @NotNull
        @Nonnull
        public @NotNull java.util.Collection<java.lang.String> getRoles()
                                                                 throws java.lang.Exception
        Returns:
        a collection of all possible role names for this profile. May be empty
        Throws:
        java.lang.Exception
      • getConnection

        protected SRConnection getConnection()
                                      throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • setDatasource

        public void setDatasource​(long id)
      • setAuthenticateQuery

        public void setAuthenticateQuery​(java.lang.String string)
      • setAuthenticateBadgeQuery

        public void setAuthenticateBadgeQuery​(java.lang.String authenticateBadgeQuery)
      • setListRolesQuery

        public void setListRolesQuery​(java.lang.String string)
      • setListUserRolesQuery

        public void setListUserRolesQuery​(java.lang.String string)
      • setListExtraPropsQuery

        public void setListExtraPropsQuery​(java.lang.String listExtraPropsQuery)
      • setListContactInfoQuery

        public void setListContactInfoQuery​(java.lang.String listContactInfoQuery)
      • setListScheduleAdjustmentsQuery

        public void setListScheduleAdjustmentsQuery​(java.lang.String listScheduleAdjustmentsQuery)
      • setListUsersQuery

        public void setListUsersQuery​(java.lang.String listUsersQuery)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object