Class IJCUserLoginServiceImpl

  • All Implemented Interfaces:
    com.im.df.api.capabilities.IJCUserLoginService, com.im.df.api.capabilities.SchemaServiceCapability, com.im.df.api.ddl.DFCapability, IJCUserLoginServiceEx
    Direct Known Subclasses:
    IJCUserLoginServiceAdminImpl

    public class IJCUserLoginServiceImpl
    extends Object
    implements com.im.df.api.capabilities.IJCUserLoginService, IJCUserLoginServiceEx
    Author:
    Tim Dudgeon
    • Constructor Detail

      • IJCUserLoginServiceImpl

        public IJCUserLoginServiceImpl​(String schemaId,
                                       com.im.commons.db.DatabasePlatform platform)
        Creates a new instance of IJCUserLoginServiceImpl.
    • Method Detail

      • getDdlService

        protected final com.im.ijcs.api.ddl.DDLService getDdlService()
      • getSchemaId

        protected final String getSchemaId()
      • getAllLogins

        @Transactional(readOnly=true)
        public final List<com.im.df.api.support.DFUserLoginInfo> getAllLogins()
        Specified by:
        getAllLogins in interface com.im.df.api.capabilities.IJCUserLoginService
      • getLogin

        @Transactional(readOnly=true)
        public final com.im.df.api.support.DFUserLoginInfo getLogin​(String username)
        Specified by:
        getLogin in interface com.im.df.api.capabilities.IJCUserLoginService
      • whoAmI

        public final String whoAmI()
        Specified by:
        whoAmI in interface com.im.df.api.capabilities.IJCUserLoginService
      • getMyRoles

        public final org.springframework.security.core.GrantedAuthority[] getMyRoles()
        Specified by:
        getMyRoles in interface com.im.df.api.capabilities.IJCUserLoginService
      • getMe

        public final com.im.ijcs.api.util.DFUser getMe()
        Specified by:
        getMe in interface com.im.df.api.capabilities.IJCUserLoginService
      • injectWhoAmI

        public final void injectWhoAmI​(String username,
                                       org.springframework.security.core.GrantedAuthority[] roles)
        TODO P4 - This is internal implementation method and TEMPORARY solution only - it should be passed to constructor. Tim, is it possible to do it? We would probably need to update application context after user specifies username? [Petr H.] No, not a good solution, as this assumes username is known at the start and is constant throughout life cycle, which would be a bad assumption. This information should not be obtained from the service [Tim].
        Specified by:
        injectWhoAmI in interface IJCUserLoginServiceEx
      • invalidate

        public void invalidate()
        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
      • getUserLoginDao

        protected final com.chemaxon.ijc.db.dao.schema.api.IjcUserLoginDao getUserLoginDao()
      • getItemInventoryDao

        protected final com.chemaxon.ijc.db.dao.schema.api.IjcItemInventoryDao getItemInventoryDao()
      • findCurrentDDLLockOwner

        public final String findCurrentDDLLockOwner()
        Specified by:
        findCurrentDDLLockOwner in interface com.im.df.api.capabilities.IJCUserLoginService
      • setDdlService

        public final void setDdlService​(com.im.ijcs.api.ddl.DDLService ddlService)