Le document suivant contient les résultats de l'inspection CPD CPD 5.3.5.
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/workflow/TaskDisableMyluteceDirectoryAccount.java | 61 |
fr/paris/lutece/plugins/mylutece/modules/directory/authentication/service/workflow/TaskEnableMyluteceDirectoryAccount.java | 61 |
public class TaskDisableMyluteceDirectoryAccount extends SimpleTask { // SERVICES @Inject private IResourceHistoryService _resourceHistoryService; private IMyluteceDirectoryService _myluteceDirectoryService = SpringContextService.getBean( MyluteceDirectoryService.BEAN_SERVICE ); /** * {@inheritDoc} */ @Override public void processTask( int nIdResourceHistory, HttpServletRequest request, Locale locale ) { ResourceHistory resourceHistory = _resourceHistoryService.findByPrimaryKey( nIdResourceHistory ); if ( ( resourceHistory != null ) && Record.WORKFLOW_RESOURCE_TYPE.equals( resourceHistory.getResourceType( ) ) ) { Plugin plugin=PluginService.getPlugin( MyluteceDirectoryPlugin.PLUGIN_NAME ); MyluteceDirectoryUser myluteceDirectoryUser = _myluteceDirectoryService.getMyluteceDirectoryUser( resourceHistory.getIdResource(),plugin); if ( myluteceDirectoryUser != null) { _myluteceDirectoryService.doDisableUser(myluteceDirectoryUser, plugin, locale); |