Class IJCUserLoginServiceAdminImpl

  • All Implemented Interfaces:
    com.im.df.api.capabilities.IJCUserLoginService, com.im.df.api.capabilities.IJCUserLoginServiceAdmin, com.im.df.api.capabilities.SchemaServiceCapability, com.im.df.api.ddl.DFCapability, IJCUserLoginServiceEx

    public final class IJCUserLoginServiceAdminImpl
    extends IJCUserLoginServiceImpl
    implements com.im.df.api.capabilities.IJCUserLoginServiceAdmin
    Author:
    Tim Dudgeon
    • Constructor Detail

      • IJCUserLoginServiceAdminImpl

        public IJCUserLoginServiceAdminImpl​(String schemaId,
                                            com.im.commons.db.DatabasePlatform platform)
      • IJCUserLoginServiceAdminImpl

        public IJCUserLoginServiceAdminImpl​(String schemaId,
                                            com.im.commons.db.DatabasePlatform platform,
                                            List<IJCUserLoginServiceEx> loginServices)
    • Method Detail

      • deleteUser

        public boolean deleteUser​(String username)
        This method should be used only by administrators to remove rows from logged users table. And only when it is clear that user didn't logout properly himself. Should not be used in other cases!
        Parameters:
        username - user to delete
        Returns:
        whether the specified user was deleted
      • logoutUser

        public void logoutUser​(String username)
        Specified by:
        logoutUser in interface com.im.df.api.capabilities.IJCUserLoginServiceAdmin
      • getSecurityConfig

        public com.im.df.api.support.DFServiceConfiguration getSecurityConfig()
        Specified by:
        getSecurityConfig in interface com.im.df.api.capabilities.IJCUserLoginServiceAdmin
      • deleteSecurityConfig

        public void deleteSecurityConfig​(com.im.commons.progress.DFEnvironmentRW env)
        Specified by:
        deleteSecurityConfig in interface com.im.df.api.capabilities.IJCUserLoginServiceAdmin
      • updateSecurityConfig

        public void updateSecurityConfig​(com.im.df.api.support.DFServiceConfiguration config,
                                         com.im.commons.progress.DFEnvironmentRW env)
        Specified by:
        updateSecurityConfig in interface com.im.df.api.capabilities.IJCUserLoginServiceAdmin
      • getSecurityConfigTemplates

        public com.im.df.api.support.DFServiceConfiguration[] getSecurityConfigTemplates()
        Specified by:
        getSecurityConfigTemplates in interface com.im.df.api.capabilities.IJCUserLoginServiceAdmin
      • getLockable

        public com.im.commons.progress.DFLockable getLockable()
        Specified by:
        getLockable in interface com.im.df.api.capabilities.IJCUserLoginServiceAdmin
      • invalidate

        public void invalidate()
        Description copied from class: IJCUserLoginServiceImpl
        This method should be called when schema is beeing deleted. Once this flag is set then it's impossible to change it back to valid again. This validity flag is used during logout - invalid schema doesn't clean its DDL lock, because this is happening when the IJC metadata DB table is already deleted from database. See FS#6739
        Specified by:
        invalidate in interface IJCUserLoginServiceEx
        Overrides:
        invalidate in class IJCUserLoginServiceImpl
      • authenticateUser

        @Secured("ROLE_ADMIN")
        public com.im.ijcs.api.util.DFUser authenticateUser​(org.springframework.security.core.Authentication token)
                                                     throws org.springframework.security.authentication.BadCredentialsException
        Specified by:
        authenticateUser in interface com.im.df.api.capabilities.IJCUserLoginServiceAdmin
        Throws:
        org.springframework.security.authentication.BadCredentialsException
      • addUserIfAbsent

        @Secured("ROLE_ADMIN")
        public void addUserIfAbsent​(String userName)
        Specified by:
        addUserIfAbsent in interface com.im.df.api.capabilities.IJCUserLoginServiceAdmin
      • isUsingDbAuthentication

        public boolean isUsingDbAuthentication()
        Specified by:
        isUsingDbAuthentication in interface com.im.df.api.capabilities.IJCUserLoginServiceAdmin