Package fr.becpg.repo.authentication
Class BeCPGUserAccountService
java.lang.Object
fr.becpg.repo.authentication.BeCPGUserAccountService
BeCPGUserAccountService class.
- Version:
- $Id: $Id
- Author:
- matthieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.alfresco.service.cmr.security.MutableAuthenticationServiceprivate org.alfresco.service.cmr.security.AuthorityServiceprivate BeCPGMailServiceprivate DataSourceprivate IdentityServiceAccountProviderprivate static org.apache.commons.logging.Logprivate static final intprivate org.alfresco.service.cmr.repository.NodeServiceprivate static final StringConstantPATH_SEPARATOR="\\/"private org.alfresco.service.cmr.security.PersonServiceprivate org.alfresco.repo.policy.BehaviourFilterprivate org.alfresco.service.cmr.preference.PreferenceServiceprivate RepoServiceprivate org.alfresco.repo.security.authentication.MutableAuthenticationDaoprivate static final longprivate org.alfresco.repo.tenant.TenantAdminService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddAuthorityToIdsZone(String authority) private voidcreateAuthentication(BeCPGUserAccount userAccount, org.alfresco.service.cmr.repository.NodeRef personNodeRef) private StringcreateTenantAware(String userName) private org.alfresco.service.cmr.repository.NodeRefcreateUser(BeCPGUserAccount userAccount) voiddeleteUser(String username) deleteUser.private voidexecuteWithRetry(Connection connection, String sql, String oldUserName, String newUserName) voidgeneratePassword(String username) generatePassword.org.alfresco.service.cmr.repository.NodeRefgetOrCreateUser(BeCPGUserAccount userAccount, boolean createOnly) getOrCreateUser.private booleanisIdsUser(org.alfresco.service.cmr.repository.NodeRef personNodeRef) private voidrenameUser(BeCPGUserAccount userAccount, org.alfresco.service.cmr.repository.NodeRef personNodeRef) private voidsetIdsUser(BeCPGUserAccount userAccount, String userName, org.alfresco.service.cmr.repository.NodeRef personNodeRef, boolean shouldSynchronize) private voidsleep()voidsynchronizeWithIDS(String username) synchronizeSsoUser.private Stringprivate voidupdateActivitiTasks(String oldUserName, String newUserName) private voidupdateGroups(BeCPGUserAccount userAccount) private voidupdatePassword(String username, String newPassword, boolean notify) private voidupdateStatement(String oldUserName, String newUserName, Connection connection, String sql) private org.alfresco.service.cmr.repository.NodeRefupdateUser(BeCPGUserAccount userAccount)
-
Field Details
-
logger
private static org.apache.commons.logging.Log logger -
PATH_SEPARATOR
ConstantPATH_SEPARATOR="\\/"- See Also:
-
tenantAdminService
@Autowired private org.alfresco.repo.tenant.TenantAdminService tenantAdminService -
personService
@Autowired private org.alfresco.service.cmr.security.PersonService personService -
beCPGMailService
-
authorityService
@Autowired private org.alfresco.service.cmr.security.AuthorityService authorityService -
authenticationService
@Autowired private org.alfresco.service.cmr.security.MutableAuthenticationService authenticationService -
identityServiceAccountProvider
-
repositoryAuthenticationDao
@Autowired private org.alfresco.repo.security.authentication.MutableAuthenticationDao repositoryAuthenticationDao -
nodeService
@Autowired private org.alfresco.service.cmr.repository.NodeService nodeService -
policyBehaviourFilter
@Autowired private org.alfresco.repo.policy.BehaviourFilter policyBehaviourFilter -
preferenceService
@Autowired private org.alfresco.service.cmr.preference.PreferenceService preferenceService -
dataSource
-
repoService
-
MAX_RETRIES
private static final int MAX_RETRIES- See Also:
-
RETRY_DELAY_MS
private static final long RETRY_DELAY_MS- See Also:
-
-
Constructor Details
-
BeCPGUserAccountService
public BeCPGUserAccountService()
-
-
Method Details
-
getOrCreateUser
public org.alfresco.service.cmr.repository.NodeRef getOrCreateUser(BeCPGUserAccount userAccount, boolean createOnly) getOrCreateUser.
- Parameters:
userAccount- aBeCPGUserAccountobjectcreateOnly- a boolean- Returns:
- a
NodeRefobject
-
synchronizeWithIDS
synchronizeSsoUser.
- Parameters:
username- aStringobject
-
generatePassword
generatePassword.
- Parameters:
username- aStringobjectnotify- a boolean
-
deleteUser
deleteUser.
- Parameters:
username- aStringobject
-
updatePassword
-
createUser
-
updateGroups
-
updateUser
-
setIdsUser
private void setIdsUser(BeCPGUserAccount userAccount, String userName, org.alfresco.service.cmr.repository.NodeRef personNodeRef, boolean shouldSynchronize) -
renameUser
private void renameUser(BeCPGUserAccount userAccount, org.alfresco.service.cmr.repository.NodeRef personNodeRef) -
updateActivitiTasks
-
executeWithRetry
private void executeWithRetry(Connection connection, String sql, String oldUserName, String newUserName) throws SQLException - Throws:
SQLException
-
updateStatement
private void updateStatement(String oldUserName, String newUserName, Connection connection, String sql) throws SQLException - Throws:
SQLException
-
toUppercaseTableName
-
sleep
private void sleep() -
isIdsUser
private boolean isIdsUser(org.alfresco.service.cmr.repository.NodeRef personNodeRef) -
createAuthentication
private void createAuthentication(BeCPGUserAccount userAccount, org.alfresco.service.cmr.repository.NodeRef personNodeRef) -
addAuthorityToIdsZone
-
createTenantAware
-