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 StringPERSISTENCE_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 voidaddUserIfAbsent(String userName)com.im.ijcs.api.util.DFUserauthenticateUser(org.springframework.security.core.Authentication token)voiddeleteSecurityConfig(com.im.commons.progress.DFEnvironmentRW env)booleandeleteUser(String username)This method should be used only by administrators to remove rows from logged users table.com.im.commons.progress.DFLockablegetLockable()com.im.df.api.support.DFServiceConfigurationgetSecurityConfig()com.im.df.api.support.DFServiceConfiguration[]getSecurityConfigTemplates()voidinvalidate()This method should be called when schema is beeing deleted.booleanisUsingDbAuthentication()voidlogoutUser(String username)voidupdateSecurityConfig(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:
logoutUserin interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
getSecurityConfig
public com.im.df.api.support.DFServiceConfiguration getSecurityConfig()
- Specified by:
getSecurityConfigin interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
deleteSecurityConfig
public void deleteSecurityConfig(com.im.commons.progress.DFEnvironmentRW env)
- Specified by:
deleteSecurityConfigin 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:
updateSecurityConfigin interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
getSecurityConfigTemplates
public com.im.df.api.support.DFServiceConfiguration[] getSecurityConfigTemplates()
- Specified by:
getSecurityConfigTemplatesin interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
getLockable
public com.im.commons.progress.DFLockable getLockable()
- Specified by:
getLockablein interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
invalidate
public void invalidate()
Description copied from class:IJCUserLoginServiceImplThis 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:
invalidatein interfaceIJCUserLoginServiceEx- Overrides:
invalidatein 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:
authenticateUserin interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin- Throws:
org.springframework.security.authentication.BadCredentialsException
-
addUserIfAbsent
@Secured("ROLE_ADMIN") public void addUserIfAbsent(String userName)- Specified by:
addUserIfAbsentin interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
isUsingDbAuthentication
public boolean isUsingDbAuthentication()
- Specified by:
isUsingDbAuthenticationin interfacecom.im.df.api.capabilities.IJCUserLoginServiceAdmin
-
-