Package com.im.df.impl.db.persist
Class IJCUserLoginServiceAdminImpl
- java.lang.Object
-
- com.im.df.impl.db.persist.IJCUserLoginServiceImpl
-
- com.im.df.impl.db.persist.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
-
-
Field Summary
Fields Modifier and Type Field Description static String
PERSISTENCE_KEY
-
Fields inherited from class com.im.df.impl.db.persist.IJCUserLoginServiceImpl
SCHEMA_EDITING_LOCK_KEY
-
-
Constructor Summary
Constructors Constructor Description IJCUserLoginServiceAdminImpl(String schemaId, com.im.commons.db.DatabasePlatform platform)
IJCUserLoginServiceAdminImpl(String schemaId, com.im.commons.db.DatabasePlatform platform, List<IJCUserLoginServiceEx> loginServices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUserIfAbsent(String userName)
com.im.ijcs.api.util.DFUser
authenticateUser(org.springframework.security.core.Authentication token)
void
deleteSecurityConfig(com.im.commons.progress.DFEnvironmentRW env)
boolean
deleteUser(String username)
This method should be used only by administrators to remove rows from logged users table.com.im.commons.progress.DFLockable
getLockable()
com.im.df.api.support.DFServiceConfiguration
getSecurityConfig()
com.im.df.api.support.DFServiceConfiguration[]
getSecurityConfigTemplates()
void
invalidate()
This method should be called when schema is beeing deleted.boolean
isUsingDbAuthentication()
void
logoutUser(String username)
void
updateSecurityConfig(com.im.df.api.support.DFServiceConfiguration config, com.im.commons.progress.DFEnvironmentRW env)
-
Methods inherited from class com.im.df.impl.db.persist.IJCUserLoginServiceImpl
findCurrentDDLLockOwner, getAllLogins, getDdlService, getItemInventoryDao, getLogin, getMe, getMyRoles, getSchemaId, getUserLoginDao, injectWhoAmI, lockSchemaDDL, loginMe, logoutMe, setDdlService, unlockSchemaDDL, whoAmI
-
-
-
-
Field Detail
-
PERSISTENCE_KEY
public static final String PERSISTENCE_KEY
- See Also:
- Constant Field Values
-
-
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 interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
getSecurityConfig
public com.im.df.api.support.DFServiceConfiguration getSecurityConfig()
- Specified by:
getSecurityConfig
in interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
deleteSecurityConfig
public void deleteSecurityConfig(com.im.commons.progress.DFEnvironmentRW env)
- Specified by:
deleteSecurityConfig
in interfacecom.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 interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
getSecurityConfigTemplates
public com.im.df.api.support.DFServiceConfiguration[] getSecurityConfigTemplates()
- Specified by:
getSecurityConfigTemplates
in interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
getLockable
public com.im.commons.progress.DFLockable getLockable()
- Specified by:
getLockable
in interfacecom.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 interfaceIJCUserLoginServiceEx
- Overrides:
invalidate
in classIJCUserLoginServiceImpl
-
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 interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
- Throws:
org.springframework.security.authentication.BadCredentialsException
-
addUserIfAbsent
@Secured("ROLE_ADMIN") public void addUserIfAbsent(String userName)
- Specified by:
addUserIfAbsent
in interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
isUsingDbAuthentication
public boolean isUsingDbAuthentication()
- Specified by:
isUsingDbAuthentication
in interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
-